+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'.
# 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
# include <ctype.h>
#endif
-#if HAVE_MALLOC_H
-# include <malloc.h>
-#endif
-
#if HAVE_MEMORY_H
# include <memory.h>
#endif