Check for stdlib.h and if present, include, otherwise declare malloc
authorEzra Peisach <epeisach@mit.edu>
Sun, 21 May 1995 02:38:47 +0000 (02:38 +0000)
committerEzra Peisach <epeisach@mit.edu>
Sun, 21 May 1995 02:38:47 +0000 (02:38 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5831 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin.v4/server/ChangeLog
src/kadmin.v4/server/configure.in
src/kadmin.v4/server/kadm_stream.c

index ae7b52243dc09c31364f85ff8fbe27b609dec007..bed14b2f95ff9c1a330293378c1d44d4368b7d87 100644 (file)
@@ -1,3 +1,10 @@
+Sat May 20 22:33:58 1995  Ezra Peisach  <epeisach@kangaroo.mit.edu>
+
+       * kadm_stream.c: Based on presence of stdlib.h, include or declare
+               malloc. 
+
+       * configure.in: Check for stdlib.h
+
 Sun May  7 13:49:54 1995  Ezra Peisach  <epeisach@kangaroo.mit.edu>
 
        * admin_server.c: Avoid warning of redeclaring POSIX_SIGNALS if
index 009b866c750dec404d01ad98273617d29960ae7e..d510046416aca799d585fe58e76634c23da0c5d3 100644 (file)
@@ -7,6 +7,9 @@ WITH_NETLIB
 AC_CHECK_LIB(ndbm,main)
 AC_CHECK_LIB(dbm,main)
 AC_HAVE_HEADERS(unistd.h)
+dnl Could check for full stdc environment, but will only test
+dnl for stdlib.h
+AC_HEADER_CHECK(stdlib.h,AC_DEFINE(HAS_STDLIB_H))
 CHECK_WAIT_TYPE
 CHECK_FCNTL
 CHECK_SIGNALS
index f09222af57cc8b38e2f925620d4d53e18476141d..8c5c9ff5068df0f551f17644d6be5ac2ede4ef37 100644 (file)
 
 #include <mit-copyright.h>
 #include <string.h>
+
+#ifdef HAS_STDLIB_H
+#include <stdlib.h>
+#else
+extern char *malloc(), *calloc(), *realloc();
+#endif
+
 /*
   kadm_stream.c
   this holds the stream support routines for the kerberos administration server