From d947ad71678c34ac91a155250faa99331e0886d2 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 27 Dec 2005 19:15:12 +0000 Subject: [PATCH] Partial fix for bug #32937, Bogdan Nicula. 2005-12-27 Matthias Clasen Partial fix for bug #32937, Bogdan Nicula. * configure.in: Check for malloc.h * glib/gslice.c: Don't include malloc.h unconditionally. --- ChangeLog | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-12 | 7 +++++++ configure.in | 5 +++-- glib/gslice.c | 2 ++ 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 76c116080..db038ee2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-12-27 Matthias Clasen + + Partial fix for bug #32937, Bogdan Nicula. + + * configure.in: Check for malloc.h + * glib/gslice.c: Don't include malloc.h unconditionally. + 2005-12-27 Manish Singh * tests/run-collate-tests.sh: export LC_COLLATE so it takes. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 76c116080..db038ee2d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +2005-12-27 Matthias Clasen + + Partial fix for bug #32937, Bogdan Nicula. + + * configure.in: Check for malloc.h + * glib/gslice.c: Don't include malloc.h unconditionally. + 2005-12-27 Manish Singh * tests/run-collate-tests.sh: export LC_COLLATE so it takes. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 76c116080..db038ee2d 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,10 @@ +2005-12-27 Matthias Clasen + + Partial fix for bug #32937, Bogdan Nicula. + + * configure.in: Check for malloc.h + * glib/gslice.c: Don't include malloc.h unconditionally. + 2005-12-27 Manish Singh * tests/run-collate-tests.sh: export LC_COLLATE so it takes. diff --git a/configure.in b/configure.in index 04d9b36e1..b4fae1bd0 100644 --- a/configure.in +++ b/configure.in @@ -789,8 +789,9 @@ AM_CONDITIONAL(HAVE_GNUC_VISIBILITY, [test x$g_have_gnuc_visibility = xyes]) AC_C_BIGENDIAN # check for header files -AC_CHECK_HEADERS([dirent.h float.h limits.h pwd.h sys/param.h sys/poll.h sys/select.h sys/types.h]) -AC_CHECK_HEADERS([sys/time.h sys/times.h sys/wait.h unistd.h values.h stdint.h sched.h]) +AC_CHECK_HEADERS([dirent.h float.h limits.h pwd.h sys/param.h sys/poll.h]) +AC_CHECK_HEADERS([sys/time.h sys/times.h sys/wait.h unistd.h values.h]) +AC_CHECK_HEADERS([sys/select.h sys/types.h stdint.h sched.h malloc.h]) # Checks for libcharset jm_LANGINFO_CODESET diff --git a/glib/gslice.c b/glib/gslice.c index 1061589a5..fdfa15196 100644 --- a/glib/gslice.c +++ b/glib/gslice.c @@ -993,7 +993,9 @@ slab_allocator_free_chunk (gsize chunk_size, } /* --- memalign implementation --- */ +#ifdef HAVE_MALLOC_H #include /* memalign() */ +#endif /* from config.h: * define HAVE_POSIX_MEMALIGN 1 // if free(posix_memalign(3)) works,