]> 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 10:57:57 +0000 (10:57 +0000)
committerGary V. Vaughan <gary@gnu.org>
Mon, 29 Sep 2003 10:57:57 +0000 (10:57 +0000)
found.

ChangeLog
libltdl/ltdl.c

index 0c897b6cd215d8d01f430c310367b396a254f7c6..fe113c92f0edbaa274b6ded4b3ecf48327a7ad8d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-09-29  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