summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-11-10 19:14:47 -0200
committerDavi Arnaut <davi.arnaut@oracle.com>2010-11-10 19:14:47 -0200
commit80246ac8b8d0d2db08feae2a643a3dc89f9022d6 (patch)
tree47ce960f9bf094be0d4331b1cf1e69691bf1b3a9 /include
parent5bbe83f6d676f4ae95e855c1877bc1b6aa07b9c6 (diff)
downloadmariadb-git-80246ac8b8d0d2db08feae2a643a3dc89f9022d6.tar.gz
Bug#58057: 5.1 libmysql/libmysql.c unused variable/compile failure
Bug#57995: Compiler flag change build error on OSX 10.4: my_getncpus.c Bug#57996: Compiler flag change build error on OSX 10.5 : bind.c Bug#57994: Compiler flag change build error : my_redel.c Bug#57993: Compiler flag change build error on FreeBsd 7.0 : regexec.c Bug#57992: Compiler flag change build error on FreeBsd : mf_keycache.c Bug#57997: Compiler flag change build error on OSX 10.6: debug_sync.cc Fix assorted compiler generated warnings.
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 3e5cd063b7b..933da84c336 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -73,7 +73,9 @@ extern "C" {
extern void *(*my_str_malloc)(size_t);
extern void (*my_str_free)(void *);
-#if defined(HAVE_STPCPY)
+#if MY_GNUC_PREREQ(3, 4)
+#define strmov(dest, src) __builtin_stpcpy(dest, src)
+#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; };