summaryrefslogtreecommitdiff
path: root/include/m_string.h
diff options
context:
space:
mode:
authorSeppo Jaakola <seppo.jaakola@codership.com>2013-05-26 11:26:58 +0300
committerSeppo Jaakola <seppo.jaakola@codership.com>2013-05-26 11:26:58 +0300
commitbd0eae595fc5d050913ea01bd4c6a8e47f379176 (patch)
treedc2915fa2f49d6c015d7f6f4d54fda9ae0ae046e /include/m_string.h
parent9d1546fe2cdced5efb4af831fa2e560b7f80fb54 (diff)
parentcb246b20d6e0dad16797b9e09bef6f0431b88d37 (diff)
downloadmariadb-git-bd0eae595fc5d050913ea01bd4c6a8e47f379176.tar.gz
References: MDEV-4572 - merge with mariaDB 5.5.31
bzr merge lp:maria/5.5 -rtag:mariadb-5.5.31 Text conflict in cmake/cpack_rpm.cmake Text conflict in debian/dist/Debian/control Text conflict in debian/dist/Ubuntu/control Text conflict in sql/CMakeLists.txt Conflict adding file sql/db.opt. Moved existing file to sql/db.opt.moved. Conflict adding file sql/db.opt.moved. Moved existing file to sql/db.opt.moved.moved. Text conflict in sql/mysqld.cc Text conflict in support-files/mysql.spec.sh 8 conflicts encountered.
Diffstat (limited to 'include/m_string.h')
-rw-r--r--include/m_string.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/m_string.h b/include/m_string.h
index 9efa0376942..1f59fd06084 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2011, Oracle and/or its affiliates.
+ Copyright (c) 2000, 2012, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -108,6 +108,15 @@ extern char *strcend(const char *, pchar);
extern char *strfill(char * s,size_t len,pchar fill);
extern char *strmake(char *dst,const char *src,size_t length);
+#if !defined(__GNUC__) || (__GNUC__ < 4)
+#define strmake_buf(D,S) strmake(D, S, sizeof(D) - 1)
+#else
+#define strmake_buf(D,S) ({ \
+ compile_time_assert(sizeof(D) != sizeof(char*)); \
+ strmake(D, S, sizeof(D) - 1); \
+ })
+#endif
+
#ifndef strmov
extern char *strmov(char *dst,const char *src);
#endif