summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@oracle.com>2010-11-17 17:42:28 +0100
committerJon Olav Hauglid <jon.hauglid@oracle.com>2010-11-17 17:42:28 +0100
commitb5ec36073121454ed5924ce701588c0432a2e886 (patch)
tree762cc277bfc28d7e965b69131fc67ef23d9775d8 /include
parent1e9f239e8f191b3060fa1a7aee0b1448af20316e (diff)
parent36ab257491c3021680c4d845c4690e3e294c2436 (diff)
downloadmariadb-git-b5ec36073121454ed5924ce701588c0432a2e886.tar.gz
Merge from mysql-5.5-bugteam to mysql-5.5-runtime
No conflicts
Diffstat (limited to 'include')
-rw-r--r--include/m_string.h4
-rw-r--r--include/my_compiler.h5
2 files changed, 8 insertions, 1 deletions
diff --git a/include/m_string.h b/include/m_string.h
index 2ec4eb64c8e..6557ae36c9b 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -76,7 +76,9 @@ extern "C" {
extern void *(*my_str_malloc)(size_t);
extern void (*my_str_free)(void *);
-#if defined(HAVE_STPCPY)
+#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4)
+#define strmov(A,B) __builtin_stpcpy((A),(B))
+#elif defined(HAVE_STPCPY)
#define strmov(A,B) stpcpy((A),(B))
#ifndef stpcpy
extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */
diff --git a/include/my_compiler.h b/include/my_compiler.h
index c7d334999d0..5f898621159 100644
--- a/include/my_compiler.h
+++ b/include/my_compiler.h
@@ -76,6 +76,11 @@
/**
Generic (compiler-independent) features.
*/
+
+#ifndef MY_GNUC_PREREQ
+# define MY_GNUC_PREREQ(maj, min) (0)
+#endif
+
#ifndef MY_ALIGNOF
# ifdef __cplusplus
template<typename type> struct my_alignof_helper { char m1; type m2; };