From 57a4805b88d7215da28cd13bcb589151d18d9eaa Mon Sep 17 00:00:00 2001 From: Bob Friesenhahn Date: Mon, 29 Sep 2003 11:00:57 +0000 Subject: [PATCH] * libltdl/ltdl.c: Only include malloc.h if stdlib.h can not be found. --- ChangeLog | 7 +++++++ libltdl/ltdl.c | 10 ++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index f961c0d76..f1416cd46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,11 @@ +2003-09-22 Bob Friesenhahn , + Dalibor Topic + + * libltdl/ltdl.c: Only include malloc.h if stdlib.h can not be + found. + 2003-09-26 Alfred M. Szmidt + * mdemo2/Makefile.am (INCLUDES): Include `$(top_srcdir)/../libltdl' instead of `../libltdl'. diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 7fbb4a495..ce8108430 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -37,8 +37,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # include #endif +/* Include the header defining malloc. On K&R C compilers, + that's , on ANSI C and ISO C compilers, that's . */ #if HAVE_STDLIB_H # include +#else +# if HAVE_MALLOC_H +# include +# endif #endif #if HAVE_STRING_H @@ -53,10 +59,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # include #endif -#if HAVE_MALLOC_H -# include -#endif - #if HAVE_MEMORY_H # include #endif -- 2.47.3