From 6120cc96c9090634211a87260dc82f8aa54521c4 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 31 Mar 2009 10:06:51 +0200 Subject: [PATCH] Fix build error after last push with --with-debug=full due to SAFEMALLOC now being defined in my_config.h (as opposed to in CFLAGS before.) mysys/my_malloc.c: Need to include my_global.h before messing with SAFEMALLOC, as now that macro may be re-defined in my_config.h, which is included from my_global.h mysys/my_once.c: Need to include my_global.h before messing with SAFEMALLOC, as now that macro may be re-defined in my_config.h, which is included from my_global.h mysys/my_realloc.c: Need to include my_global.h before messing with SAFEMALLOC, as now that macro may be re-defined in my_config.h, which is included from my_global.h --- mysys/my_malloc.c | 3 +++ mysys/my_once.c | 3 +++ mysys/my_realloc.c | 3 +++ 3 files changed, 9 insertions(+) diff --git a/mysys/my_malloc.c b/mysys/my_malloc.c index 12793ad451b..12af5603a93 100644 --- a/mysys/my_malloc.c +++ b/mysys/my_malloc.c @@ -13,6 +13,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* my_global.h may define SAFEMALLOC (through my_config.h). */ +#include + #ifdef SAFEMALLOC /* We don't need SAFEMALLOC here */ #undef SAFEMALLOC #endif diff --git a/mysys/my_once.c b/mysys/my_once.c index b6f6656fce2..73bdd0166e6 100644 --- a/mysys/my_once.c +++ b/mysys/my_once.c @@ -15,6 +15,9 @@ /* Not MT-SAFE */ +/* my_global.h may define SAFEMALLOC (through my_config.h). */ +#include + #ifdef SAFEMALLOC /* We don't need SAFEMALLOC here */ #undef SAFEMALLOC #endif diff --git a/mysys/my_realloc.c b/mysys/my_realloc.c index 828890a0dc2..7e49a482884 100644 --- a/mysys/my_realloc.c +++ b/mysys/my_realloc.c @@ -13,6 +13,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* my_global.h may define SAFEMALLOC (through my_config.h). */ +#include + #ifdef SAFEMALLOC /* We don't need SAFEMALLOC here */ #undef SAFEMALLOC #endif