[Commits] Rev 4352: MDEV-6862 "#error <my_config.h>" and third-party libraries in lp:~maria-captains/maria/5.5

Sergei Golubchik serg at mariadb.org
Mon Nov 17 10:42:52 EET 2014


At lp:~maria-captains/maria/5.5

------------------------------------------------------------
revno: 4352
revision-id: sergii at pisem.net-20141110181739-brks1ibabfvz1x0s
parent: sergii at pisem.net-20141108185442-mx9qgahna78egmzm
committer: Sergei Golubchik <sergii at pisem.net>
branch nick: 5.5
timestamp: Mon 2014-11-10 19:17:39 +0100
message:
  MDEV-6862 "#error <my_config.h>" and third-party libraries
  
  only enforce the include order if SAFE_MUTEX is defined
  (that is, in MariaDB source builds in debug mode)
=== modified file 'config.h.cmake'
--- a/config.h.cmake	2014-10-02 09:57:40 +0000
+++ b/config.h.cmake	2014-11-10 18:17:39 +0000
@@ -648,9 +648,13 @@
   included first (or at least before <features.h> - so, practically,
   before including any system headers).
 
-  __GLIBC__ is defined in <features.h>
+  Check the include order by looking at __GLIBC__ (defined in <features.h>)
+
+  But we cannot force all third-party clients/connectors to include
+  my_config.h first. So, their crashes are their responsibility,
+  we enable this check only for MariaDB sources (SAFE_MUTEX check).
 */
-#ifdef __GLIBC__
+#if defined(__GLIBC__) && defined(SAFE_MUTEX)
 #error <my_config.h> MUST be included first!
 #endif
 



More information about the commits mailing list