summaryrefslogtreecommitdiff
path: root/include/m_string.h
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-11-17 07:41:29 -0200
committerDavi Arnaut <davi.arnaut@oracle.com>2010-11-17 07:41:29 -0200
commitaaa370f5d7fa08b4b6c7fb56bd54f84829626e07 (patch)
tree57397dad8dc8425c049b1741cd67a87bef009720 /include/m_string.h
parent80246ac8b8d0d2db08feae2a643a3dc89f9022d6 (diff)
downloadmariadb-git-aaa370f5d7fa08b4b6c7fb56bd54f84829626e07.tar.gz
Bug#57994: Compiler flag change build error : my_redel.c
Use __builtin_stpcpy only if the system supports stpcpy. This is necessary as in some cases a call to stpcpy will be emitted if the built-in can not optimized.
Diffstat (limited to 'include/m_string.h')
-rw-r--r--include/m_string.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/m_string.h b/include/m_string.h
index 933da84c336..c963e605501 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -73,8 +73,8 @@ extern "C" {
extern void *(*my_str_malloc)(size_t);
extern void (*my_str_free)(void *);
-#if MY_GNUC_PREREQ(3, 4)
-#define strmov(dest, src) __builtin_stpcpy(dest, src)
+#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