diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-05-11 09:18:00 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-05-11 09:18:00 +0200 |
commit | 329daad2d32730c1aade8134d1709383fe072309 (patch) | |
tree | 46a1f86728b6fc8f1a760251c0c0fe2d232a7431 /include | |
parent | 1185420da0964b2f06d9fd91bd02d067b0a359de (diff) | |
download | mariadb-git-329daad2d32730c1aade8134d1709383fe072309.tar.gz |
more portable fix for lp:942266 - 5.5 builds fail with systemtap-sdt-dev installed on Ubuntu
include <limits> early, before min/max macros are defined.
Diffstat (limited to 'include')
-rw-r--r-- | include/my_global.h | 4 | ||||
-rw-r--r-- | include/probes_mysql.h | 20 |
2 files changed, 4 insertions, 20 deletions
diff --git a/include/my_global.h b/include/my_global.h index 8170ce381af..a5fa57dbfe3 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -1429,6 +1429,10 @@ static inline char *dlerror(void) /* Length of decimal number represented by INT64. */ #define MY_INT64_NUM_DECIMAL_DIGITS 21 +#ifdef __cplusplus +#include <limits> /* should be included before min/max macros */ +#endif + /* Define some useful general macros (should be done after all headers). */ #if !defined(max) #define max(a, b) ((a) > (b) ? (a) : (b)) diff --git a/include/probes_mysql.h b/include/probes_mysql.h index cc47c59b62d..6d44b972cb3 100644 --- a/include/probes_mysql.h +++ b/include/probes_mysql.h @@ -18,28 +18,8 @@ #define PROBES_MYSQL_H - #if defined(HAVE_DTRACE) && !defined(DISABLE_DTRACE) - -#ifdef __linux__ -/* - On Linux, generated probes header may include C++ header - <limits> which conflicts with min and max macros from my_global.h . - To fix, temporarily undefine the macros. -*/ -#pragma push_macro("min") -#pragma push_macro("max") -#undef min -#undef max -#endif - #include "probes_mysql_dtrace.h" - -#ifdef __linux__ -#pragma pop_macro("min") -#pragma pop_macro("max") -#endif - #else /* no dtrace */ #include "probes_mysql_nodtrace.h" #endif |