From: Tor Didriksen Date: November 3 2011 4:11pm Subject: bzr push into mysql-trunk branch (tor.didriksen:3553 to 3554) Bug#12711108 List-Archive: http://lists.mysql.com/commits/141720 X-Bug: 12711108 Message-Id: <201111031611.pA3GBLs5020941@acsmt357.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3554 Tor Didriksen 2011-11-03 Bug#12711108 61708: INCORRECT HANDLING OF C-COMPILER THAT DOES NOT SUPPORT INLINE KEYWORD All currently supported C compilers have 'inline'. If the cmake test for inline fails, then there's something else going wrong, and doing #define inline is not the right solution: changing the meaning of reserved words is undefined behaviour. modified: config.h.cmake configure.cmake 3553 Jimmy Yang 2011-11-03 [merge] Merge from mysql-5.5 to mysql-trunk === modified file 'config.h.cmake' --- a/config.h.cmake 2011-09-21 11:01:41 +0000 +++ b/config.h.cmake 2011-11-03 16:10:53 +0000 @@ -395,8 +395,9 @@ #cmakedefine WORDS_BIGENDIAN 1 #endif -/* Define to `__inline__' or `__inline' if that's what the C compiler calls - it, or to nothing if 'inline' is not supported under any name. */ +/* + Define to `__inline__' or `__inline' if that's what the C compiler calls it. +*/ #cmakedefine C_HAS_inline 1 #if !(C_HAS_inline) #ifndef __cplusplus === modified file 'configure.cmake' --- a/configure.cmake 2011-09-21 11:01:41 +0000 +++ b/configure.cmake 2011-11-03 16:10:53 +0000 @@ -769,7 +769,9 @@ IF(NOT HAVE_FCNTL_NONBLOCK) ENDIF() # -# Test for how the C compiler does inline, if at all +# Test for how the C compiler does inline. +# If both of these tests fail, then there is probably something wrong +# in the environment (flags and/or compiling and/or linking). # CHECK_C_SOURCE_COMPILES(" static inline int foo(){return 0;} @@ -783,6 +785,12 @@ IF(NOT C_HAS_inline) SET(C_INLINE __inline) ENDIF() +IF(NOT C_HAS_inline AND NOT C_HAS___inline) + MESSAGE(FATAL_ERROR "It seems like ${CMAKE_C_COMPILER} does not support " + "inline or __inline. Please verify compiler and flags. " + "See CMakeFiles/CMakeError.log for why the test failed to compile/link.") +ENDIF() + IF(NOT CMAKE_CROSSCOMPILING AND NOT MSVC) STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} processor) IF(processor MATCHES "86" OR processor MATCHES "amd64" OR processor MATCHES "x64") No bundle (reason: useless for push emails).