* configure, configure.in, sdcc_vc_in.h, sdcconf.h,
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 4 Nov 2003 13:47:38 +0000 (13:47 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 4 Nov 2003 13:47:38 +0000 (13:47 +0000)
  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

ChangeLog
as/hc08/lklibr.c
as/mcs51/lklibr.c
as/z80/aslist.c
as/z80/assym.c
configure
configure.in
sdcc_vc_in.h
sdccconf_in.h
support/Util/NewAlloc.c

index c2fd9c5e217f9f11444d4f97809d55d2f26904ff..64a345ebfdf916d94a9a032bf467cfa96382d7b3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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:
index 3982e03e3f88795b9feb38e0045d3151b5725023..2481d9f02a8e312f005e6bdf83a2467b82b453bf 100644 (file)
 #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>
index 808dfc64c4682b51366ccb77d10fa43ed492f90f..2e9bfe437bafd7e04406e137c451504b21327603 100644 (file)
 #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>
index 3a7d0a7f21abd8da4fbd3ef81bb4d7956e2fda01..997bb4c9b91747ed7bcbf210b8eb94348ab285c6 100644 (file)
 #include <sys/types.h>
 #include <sys/malloc.h>
 #else
+#ifdef HAVE_MALLOC_H
 #include <malloc.h>
 #endif
+#endif
 
 
 #include "asm.h"
index dadce441f877dc1f2c63538fbbd4f8355910222f..3a9ac0a4c2337e7c10670e4be3d47cd62a76c982 100644 (file)
 #include <sys/types.h>
 #include <sys/malloc.h>
 #else
+#ifdef HAVE_MALLOC_H
 #include <malloc.h>
 #endif
+#endif
 #include "asm.h"
 
 /*)Module      assym.c
index ee771beda6caa9fb787b8afb00b999159121b438..1f6392b5cf89c995afec312d990c95df89c536e7 100755 (executable)
--- a/configure
+++ b/configure
@@ -3893,7 +3893,8 @@ done
 
 
 
-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
index e1172242c682de881fc2a77ac4aee27b4c8cf9bf..c7ca5c5f7249d8c6f9175278bc49dd01ca39b503 100755 (executable)
@@ -69,7 +69,7 @@ AC_LANG([C])
 
 # Checking for header files.
 # ===========================================================================
-AC_CHECK_HEADERS(sys/socket.h)
+AC_CHECK_HEADERS(sys/socket.h malloc.h)
 
 
 # Checking for functions
index 4c482f6f73774f8950b46ce36b86850cc39e4b50..840ffe9b54d255050fd68b85c3e6211d9c8d9fee 100644 (file)
 #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
index aa501882b0b84464ee23913fee3c2280e5c1a902..a7221d871c921cb368913ae5026afd8b6d647248 100644 (file)
@@ -40,6 +40,7 @@
 #undef STD_XA51_LIB
 
 #undef HAVE_SYS_SOCKET_H
+#undef HAVE_MALLOC_H
 
 #undef HAVE_STRERROR
 #undef HAVE_VSNPRINTF
index 264311bb1e6af9f599777aee44d4d6f89234c9f8..86e78e430c798072a34b23fc7e013550c875c249 100644 (file)
@@ -30,9 +30,11 @@ functions.
 #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>
@@ -48,7 +50,7 @@ functions.
    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