From: Bob Friesenhahn Date: Mon, 29 Sep 2003 11:00:57 +0000 (+0000) Subject: * libltdl/ltdl.c: Only include malloc.h if stdlib.h can not be X-Git-Tag: release-1-5-2~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=57a4805b88d7215da28cd13bcb589151d18d9eaa;p=thirdparty%2Flibtool.git * libltdl/ltdl.c: Only include malloc.h if stdlib.h can not be found. --- 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