From 456f74501f49094548766a267c54542201e2c74c Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Fri, 9 Jun 1995 10:38:29 +0000 Subject: [PATCH] error.c (ss_error): remove const declaration from local variable. (it is used with free is called on the contents). ss_internal.h: Include stdlib.h if present on system. If is present, don't redeclare malloc. configure.in: Check for stdlib.h before including blindly. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5998 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/ss/ChangeLog | 10 ++++++++++ src/util/ss/configure.in | 2 +- src/util/ss/error.c | 2 +- src/util/ss/ss_internal.h | 4 ++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/util/ss/ChangeLog b/src/util/ss/ChangeLog index 335018e8d..9135d0731 100644 --- a/src/util/ss/ChangeLog +++ b/src/util/ss/ChangeLog @@ -1,3 +1,13 @@ +Fri Jun 9 06:20:37 1995 Ezra Peisach + + * error.c (ss_error): remove const declaration from local + variable. (it is used with free is called on the contents). + + * ss_internal.h: Include stdlib.h if present on system. If is + present, don't redeclare malloc. + + * configure.in: Check for stdlib.h before including blindly. + Thu Jun 8 23:22:07 1995 * list_req.c, ss_internal.h: Clean up -Wall flames. diff --git a/src/util/ss/configure.in b/src/util/ss/configure.in index 4c020419e..e8375d715 100644 --- a/src/util/ss/configure.in +++ b/src/util/ss/configure.in @@ -18,7 +18,7 @@ CHECK_WAIT_TYPE CHECK_SIGNALS CHECK_SIGPROCMASK AC_RETSIGTYPE -AC_CHECK_HEADERS(stdarg.h) +AC_CHECK_HEADERS(stdarg.h stdlib.h) CopySrcHeader(ss.h,$(BUILDTOP)/include/ss) CopySrcHeader(mit-sipb-copyright.h,$(BUILDTOP)/include/ss) CopyHeader(ss_err.h,$(BUILDTOP)/include/ss) diff --git a/src/util/ss/error.c b/src/util/ss/error.c index 2f0f9e5a2..0274bce61 100644 --- a/src/util/ss/error.c +++ b/src/util/ss/error.c @@ -69,7 +69,7 @@ void ss_error (va_alist) va_dcl #endif { - register char const *whoami; + register char *whoami; va_list pvar; #ifndef HAVE_STDARG_H int sci_idx; diff --git a/src/util/ss/ss_internal.h b/src/util/ss/ss_internal.h index 47c194b8e..54046df28 100644 --- a/src/util/ss/ss_internal.h +++ b/src/util/ss/ss_internal.h @@ -9,7 +9,9 @@ #include #include #include +#ifdef HAVE_STDLIB_H #include +#endif #ifdef __STDC__ @@ -107,9 +109,11 @@ void ss_page_stdin(); extern ss_data **_ss_table; extern char *ss_et_msgs[]; +#ifndef HAVE_STDLIB_H extern pointer malloc PROTOTYPE((unsigned)); extern pointer realloc PROTOTYPE((pointer, unsigned)); extern pointer calloc PROTOTYPE((unsigned, unsigned)); +#endif #ifdef USE_SIGPROCMASK /* fake sigmask, sigblock, sigsetmask */ -- 2.26.2