[Commits] Rev 4345: 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 10 20:17:39 EET 2014

At lp:~maria-captains/maria/5.5

revno: 4345
revision-id: sergii at pisem.net-20141110181739-ii9u07ktenup2j5i
parent: sergii at pisem.net-20141108185442-who1t38g0y7eghih
committer: Sergei Golubchik <sergii at pisem.net>
branch nick: 5.5
timestamp: Mon 2014-11-10 19:17:39 +0100
  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!

More information about the commits mailing list