* include/am_defs.h: Don't include malloc.h if stdlib.h exists,
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 6 Jan 2004 22:34:58 +0000 (22:34 +0000)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 6 Jan 2004 22:34:58 +0000 (22:34 +0000)
because modern systems (e.g., BSD) complain if you use malloc.h
instead of stdlib.h.  Let's hope there are no systems out
there that need both.

ChangeLog
NEWS
include/am_defs.h

index 2448d61a4d8126e6a509d93e65df6af75bb67e9f..2811d99007e717641cb53463b32b4f0384c5a6f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-01-06  Erez Zadok  <ezk@cs.sunysb.edu>
+
+       * include/am_defs.h: Don't include malloc.h if stdlib.h exists,
+       because modern systems (e.g., BSD) complain if you use malloc.h
+       instead of stdlib.h.  Let's hope there are no systems out
+       there that need both.
+
 2004-01-05  Erez Zadok  <ezk@cs.sunysb.edu>
 
        * MIRRORS.{txt,html}: verify each mirror site, update to new
diff --git a/NEWS b/NEWS
index 7439f786500a29f4f1bb260f73c5de415f026d13..e53bd45abf7ab7ce12a5be2366f1bb49b9faa095 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@
        ia64-unknown-linux-rh2.1AS (Red Hat Itanium Advanced Server)
        i386-unknown-freebsd5.0 (5.0-RELEASE)
        sparc64-unknown-linux-suse7.3
+       i386-unknown-freebsd4.9
 
 - bug fixes:
        rename log() in fsinfo to avoid glibc/gcc-3.3 conflict
index c450182f1023433b2adae786cc58a69fb30da3a7..ba18143da4dc2824418b6a120b897a90caf697de 100644 (file)
@@ -38,7 +38,7 @@
  *
  *      %W% (Berkeley) %G%
  *
- * $Id: am_defs.h,v 1.15.2.14 2004/01/06 03:15:23 ezk Exp $
+ * $Id: am_defs.h,v 1.15.2.15 2004/01/06 22:34:58 ezk Exp $
  *
  */
 
@@ -275,10 +275,13 @@ typedef bool_t (*xdrproc_t) __P ((XDR *, __ptr_t, ...));
 
 /*
  * Actions to take if <malloc.h> exists.
+ * Don't include malloc.h if stdlib.h exists, because modern
+ * systems complain if you use malloc.h instead of stdlib.h.
+ * XXX: let's hope there are no systems out there that need both.
  */
-#ifdef HAVE_MALLOC_H
+#if defined(HAVE_MALLOC_H) && !defined(HAVE_STDLIB_H)
 # include <malloc.h>
-#endif /* HAVE_MALLOC_H */
+#endif /* defined(HAVE_MALLOC_H) && !defined(HAVE_STDLIB_H) */
 
 /*
  * Actions to take if <mntent.h> exists.