List:Commits« Previous MessageNext Message »
From:Mauritz Sundell Date:November 22 2012 11:23am
Subject:bzr push into mysql-5.1-telco-7.0 branch (mauritz.sundell:5044 to 5045)
View as plain text  
 5045 Mauritz Sundell	2012-11-22
      backport from 5.5
      
      define GCC_VERSION if not defined in my_attribute.h since
      it is needed to determine if __attribute__ should be 
      redefined.

    modified:
      include/my_attribute.h
      storage/ndb/include/ndbapi/Ndb.hpp
 5044 Mauritz Sundell	2012-11-22
      ndb - remove false unused warning for NDB_STATIC_ASSERT
      
      In module there my_attribute.h is included but not my_global.h,
      __attribute__ will be redefined and the
      definitions of compile_time_assert will produce an unused variable warning.

    modified:
      storage/ndb/include/ndbapi/Ndb.hpp
=== modified file 'include/my_attribute.h'
--- a/include/my_attribute.h	2009-05-26 18:53:34 +0000
+++ b/include/my_attribute.h	2012-11-22 11:15:48 +0000
@@ -24,6 +24,14 @@
 #ifndef _my_attribute_h
 #define _my_attribute_h
 
+#ifndef MCP_BACKPORT55
+#if defined(__GNUC__)
+# ifndef GCC_VERSION
+#  define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
+# endif
+#endif
+#endif
+
 /*
   Disable __attribute__() on gcc < 2.7, g++ < 3.4, and non-gcc compilers.
   Some forms of __attribute__ are actually supported in earlier versions of

=== modified file 'storage/ndb/include/ndbapi/Ndb.hpp'
--- a/storage/ndb/include/ndbapi/Ndb.hpp	2012-11-22 09:34:24 +0000
+++ b/storage/ndb/include/ndbapi/Ndb.hpp	2012-11-22 11:15:48 +0000
@@ -2056,11 +2056,6 @@ private:
 #endif
 
 #ifdef VM_TRACE
-/**
- * my_attribute.h need GCC_VERSION defined from my_global.h,
- * otherwise it will redefine __attribute__
- */
-#include <my_global.h>
 #include <my_attribute.h>
   void printState(const char* fmt, ...)
     ATTRIBUTE_FORMAT(printf, 2, 3);

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (mauritz.sundell:5044 to 5045) Mauritz Sundell22 Nov