]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/ltdl.c: Only include malloc.h if stdlib.h can not be
authorBob Friesenhahn <bfriesen@simple.dallas.tx.us>
Mon, 29 Sep 2003 11:00:57 +0000 (11:00 +0000)
committerGary V. Vaughan <gary@gnu.org>
Mon, 29 Sep 2003 11:00:57 +0000 (11:00 +0000)
found.

ChangeLog
libltdl/ltdl.c

index f961c0d76e7ec6328c721dfe4d0565fb84225392..f1416cd465fef6b1e384615a961d7e51e1115a15 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,11 @@
+2003-09-22  Bob Friesenhahn <bfriesen@simple.dallas.tx.us>,
+            Dalibor Topic <robilad@kaffe.org>
+
+       * libltdl/ltdl.c: Only include malloc.h if stdlib.h can not be
+       found.
+
 2003-09-26  Alfred M. Szmidt  <ams@kemisten.nu>
+
        * mdemo2/Makefile.am (INCLUDES): Include `$(top_srcdir)/../libltdl'
        instead of `../libltdl'.
 
index 7fbb4a4954a30e90bdb8f9b470439e5af22d850f..ce81084308fefb02a935d2deb3ba1afceca72270 100644 (file)
@@ -37,8 +37,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 #  include <stdio.h>
 #endif
 
+/* Include the header defining malloc.  On K&R C compilers,
+   that's <malloc.h>, on ANSI C and ISO C compilers, that's <stdlib.h>.  */
 #if HAVE_STDLIB_H
 #  include <stdlib.h>
+#else
+#  if HAVE_MALLOC_H
+#    include <malloc.h>
+#  endif
 #endif
 
 #if HAVE_STRING_H
@@ -53,10 +59,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 #  include <ctype.h>
 #endif
 
-#if HAVE_MALLOC_H
-#  include <malloc.h>
-#endif
-
 #if HAVE_MEMORY_H
 #  include <memory.h>
 #endif