support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
transferred to configure
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2991
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2003-11-04 Borut Razem <borut.razem@siol.net>
+
+ * configure, configure.in, sdcc_vc_in.h, sdcconf.h,
+ support/Util/NewAlloc.c, as/hc08/lklibr.c, as/mcs51/lklibr.c,
+ as/z80/aslist.c, as/z80/assym.c: decision to include malloc.h
+ transferred to configure
+
2003-11-03 Bernhard Held <bernhard@bernhardheld.de>
Use headers defined in the C[++] standards:
#if defined(__APPLE__) && defined(__MACH__)
#include <sys/types.h>
#include <sys/malloc.h>
-#elseif !defined(__FreeBSD__)
+#else
+#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if defined(__APPLE__) && defined(__MACH__)
#include <sys/types.h>
#include <sys/malloc.h>
-#elseif !defined(__FreeBSD__)
+#else
+#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/malloc.h>
#else
+#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
+#endif
#include "asm.h"
#include <sys/types.h>
#include <sys/malloc.h>
#else
+#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
+#endif
#include "asm.h"
/*)Module assym.c
-for ac_header in sys/socket.h
+
+for ac_header in sys/socket.h malloc.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
# Checking for header files.
# ===========================================================================
-AC_CHECK_HEADERS(sys/socket.h)
+AC_CHECK_HEADERS(sys/socket.h malloc.h)
# Checking for functions
#define STD_FP_LIB "libfloat"
#define STD_DS390_LIB "libds390"
#define STD_DS400_LIB "libds400"
-// #undef STD_XA51_LIB
+/* #undef STD_XA51_LIB */
-// #undef HAVE_SYS_SOCKET_H
+/* #undef HAVE_SYS_SOCKET_H */
+#define HAVE_MALLOC_H
#undef HAVE_STRERROR
#define HAVE_VSNPRINTF
#undef STD_XA51_LIB
#undef HAVE_SYS_SOCKET_H
+#undef HAVE_MALLOC_H
#undef HAVE_STRERROR
#undef HAVE_VSNPRINTF
#include <stdio.h>
#if defined(__APPLE__) && defined(__MACH__)
#include <sys/malloc.h>
-#elseif !defined(__FreeBSD__)
+#else
+#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
+#endif
#include <stdlib.h>
#include <string.h>
#include <memory.h>
allocated with malloc() then the program will segfault. Might as
well drop it and let the garbase collector take care of things.
*/
-#define FREE(_a)
+#define FREE(_a)
#else