MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:November 17 2010 9:41am
Subject:bzr commit into mysql-5.1-bugteam branch (davi:3508) Bug#57994
View as plain text  
# At a local mysql-5.1-bugteam repository of davi

 3508 Davi Arnaut	2010-11-17
      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.
     @ include/m_string.h
        The expansion of stpcpy (in glibc) causes warnings if the
        return value of strmov is not being used. Since stpcpy is
        a GNU extension and the expansion ends up using a built-in
        provided by GCC, use the compiler provided built-in directly
        when possible. Nonetheless, the C library must have stpcpy
        as a call be emitted if the built-in can not optimized.

    modified:
      include/m_string.h
=== modified file 'include/m_string.h'
--- a/include/m_string.h	2010-11-10 21:14:47 +0000
+++ b/include/m_string.h	2010-11-17 09:41:29 +0000
@@ -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


Attachment: [text/bzr-bundle] bzr/davi.arnaut@oracle.com-20101117094129-ibvsezsj0nth3bw9.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (davi:3508) Bug#57994Davi Arnaut17 Nov