From 8393b0976e62dabee909fbf22274c539e3e60815 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Sun, 21 May 1995 02:38:47 +0000 Subject: [PATCH] Check for stdlib.h and if present, include, otherwise declare malloc git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5831 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin.v4/server/ChangeLog | 7 +++++++ src/kadmin.v4/server/configure.in | 3 +++ src/kadmin.v4/server/kadm_stream.c | 7 +++++++ 3 files changed, 17 insertions(+) diff --git a/src/kadmin.v4/server/ChangeLog b/src/kadmin.v4/server/ChangeLog index ae7b52243..bed14b2f9 100644 --- a/src/kadmin.v4/server/ChangeLog +++ b/src/kadmin.v4/server/ChangeLog @@ -1,3 +1,10 @@ +Sat May 20 22:33:58 1995 Ezra Peisach + + * 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 * admin_server.c: Avoid warning of redeclaring POSIX_SIGNALS if diff --git a/src/kadmin.v4/server/configure.in b/src/kadmin.v4/server/configure.in index 009b866c7..d51004641 100644 --- a/src/kadmin.v4/server/configure.in +++ b/src/kadmin.v4/server/configure.in @@ -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 diff --git a/src/kadmin.v4/server/kadm_stream.c b/src/kadmin.v4/server/kadm_stream.c index f09222af5..8c5c9ff50 100644 --- a/src/kadmin.v4/server/kadm_stream.c +++ b/src/kadmin.v4/server/kadm_stream.c @@ -12,6 +12,13 @@ #include #include + +#ifdef HAS_STDLIB_H +#include +#else +extern char *malloc(), *calloc(), *realloc(); +#endif + /* kadm_stream.c this holds the stream support routines for the kerberos administration server -- 2.26.2