summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>1995-05-09 02:11:22 +0000
committerEzra Peisach <epeisach@mit.edu>1995-05-09 02:11:22 +0000
commitbd68af5cea494a63697e89a322b70cf6c5dfd10e (patch)
tree8676b9e2759012592ea77a49f28b6ca27755ffc7 /src/lib
parentea061aba3f0de13935362ae0ab436ad4f5c8d85e (diff)
downloadkrb5-bd68af5cea494a63697e89a322b70cf6c5dfd10e.tar.gz
krb5-bd68af5cea494a63697e89a322b70cf6c5dfd10e.tar.xz
krb5-bd68af5cea494a63697e89a322b70cf6c5dfd10e.zip
Add string.h if necessary to define strlen, etc.
Add stdlib.h if present & necessary for malloc definition. (otherwise define ourselves) - based on other code present. Change ifdef POSIX to ifdef HAS_STDLIB_H Check for stdlib.h in configure.in git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5757 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb4/ChangeLog22
-rw-r--r--src/lib/krb4/configure.in4
-rw-r--r--src/lib/krb4/g_pw_in_tkt.c1
-rw-r--r--src/lib/krb4/g_svc_in_tkt.c1
-rw-r--r--src/lib/krb4/memcache.c2
-rw-r--r--src/lib/krb4/mk_auth.c3
-rw-r--r--src/lib/krb4/mk_preauth.c7
-rw-r--r--src/lib/krb4/rd_preauth.c2
-rw-r--r--src/lib/krb4/realmofhost.c2
-rw-r--r--src/lib/krb4/send_to_kdc.c2
10 files changed, 42 insertions, 4 deletions
diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog
index 93f5bfda9..c59459df2 100644
--- a/src/lib/krb4/ChangeLog
+++ b/src/lib/krb4/ChangeLog
@@ -1,3 +1,25 @@
+Sun May 7 08:05:56 1995 Ezra Peisach <epeisach@kangaroo.mit.edu>
+
+ * mk_preauth.c: Add <string.h> and either <stdlib.h> or provide
+ prototypes for malloc.
+
+ * g_svc_in_tkt.c: Add <string.h>
+
+
+ * rd_preauth.c: Add <string.h>
+
+ * mk_auth.c: Include "krb4-proto.h" for get_phost definition.
+
+ * g_pw_in_tkt.c (stub_key): Add <string.h>
+
+ * send_to_kdc.c: Ifdef on HAS_STDLIB_H not POSIX
+
+ * realmofhost.c: Ifdef on HAS_STDLIB_H not POSIX
+
+ * memcache.c: Ifdef on HAS_STDLIB_H not POSIX
+
+ * configure.in: Check for stdlib.h
+
Thu May 4 10:03:22 1995 Tom Yu (tlyu@dragons-lair)
* put_svc_key.c (put_svc_key): remove spurious & in front of fkey
diff --git a/src/lib/krb4/configure.in b/src/lib/krb4/configure.in
index cb83a794f..dd118adda 100644
--- a/src/lib/krb4/configure.in
+++ b/src/lib/krb4/configure.in
@@ -12,6 +12,10 @@ AC_CONST
CHECK_FCNTL
KRB5_POSIX_LOCKS
AC_HEADER_CHECK(unistd.h,AC_DEFINE(HAS_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))
+
dnl need MSBFIRST, LSBFIRST, BITS16, BITS32
AC_MSG_CHECKING([if system is msbfirst])
AC_CACHE_VAL(krb5_cv_is_msbfirst,
diff --git a/src/lib/krb4/g_pw_in_tkt.c b/src/lib/krb4/g_pw_in_tkt.c
index 213540e69..079704b49 100644
--- a/src/lib/krb4/g_pw_in_tkt.c
+++ b/src/lib/krb4/g_pw_in_tkt.c
@@ -10,6 +10,7 @@
#include "mit-copyright.h"
#include "krb.h"
#include "prot.h"
+#include <string.h>
#ifndef NULL
#define NULL 0
diff --git a/src/lib/krb4/g_svc_in_tkt.c b/src/lib/krb4/g_svc_in_tkt.c
index 72fae3be7..8006587c3 100644
--- a/src/lib/krb4/g_svc_in_tkt.c
+++ b/src/lib/krb4/g_svc_in_tkt.c
@@ -10,6 +10,7 @@
#include "mit-copyright.h"
#include "krb.h"
#include "prot.h"
+#include <string.h>
#ifndef NULL
#define NULL 0
diff --git a/src/lib/krb4/memcache.c b/src/lib/krb4/memcache.c
index 3e622eb10..46376885c 100644
--- a/src/lib/krb4/memcache.c
+++ b/src/lib/krb4/memcache.c
@@ -29,7 +29,7 @@
#include <stdio.h>
#include <errno.h>
-#ifdef POSIX
+#ifdef HAS_STDLIB_H
#include <stdlib.h>
#else
extern char *malloc (), *realloc ();
diff --git a/src/lib/krb4/mk_auth.c b/src/lib/krb4/mk_auth.c
index 60444dcf1..2b0928094 100644
--- a/src/lib/krb4/mk_auth.c
+++ b/src/lib/krb4/mk_auth.c
@@ -12,9 +12,10 @@
#include "mit-copyright.h"
#define DEFINE_SOCKADDR /* Ask for sockets declarations from krb.h. */
+#include <stdio.h>
#include "krb.h"
+#include "krb4-proto.h"
#include <errno.h>
-#include <stdio.h>
#include <string.h>
#define KRB_SENDAUTH_VERS "AUTHV0.1" /* MUST be KRB_SENDAUTH_VLEN chars */
diff --git a/src/lib/krb4/mk_preauth.c b/src/lib/krb4/mk_preauth.c
index 3f4830747..5f26111c3 100644
--- a/src/lib/krb4/mk_preauth.c
+++ b/src/lib/krb4/mk_preauth.c
@@ -13,6 +13,13 @@
*/
#include "krb.h"
+#include <string.h>
+
+#ifdef HAS_STDLIB_H
+#include <stdlib.h>
+#else
+extern char *malloc(), *calloc(), *realloc();
+#endif
/* Define a couple of function types including parameters. These
are needed on MS-Windows to convert arguments of the function pointers
diff --git a/src/lib/krb4/rd_preauth.c b/src/lib/krb4/rd_preauth.c
index 65c2dcc71..a34d713ef 100644
--- a/src/lib/krb4/rd_preauth.c
+++ b/src/lib/krb4/rd_preauth.c
@@ -16,6 +16,8 @@
#include "krb_db.h"
#include "prot.h"
#include "des.h"
+#include <string.h>
+
/* #define KERB_ERR_PREAUTH_SHORT 11 */
/* #define KERB_ERR_PREAUTH_MISMATCH 12 */
diff --git a/src/lib/krb4/realmofhost.c b/src/lib/krb4/realmofhost.c
index 3841e6a94..cff11cc8e 100644
--- a/src/lib/krb4/realmofhost.c
+++ b/src/lib/krb4/realmofhost.c
@@ -13,7 +13,7 @@
#include <string.h>
#include <stdio.h>
#include <ctype.h>
-#ifdef POSIX
+#ifdef HAS_STDLIB_H
#include <stdlib.h>
#else
extern char *malloc();
diff --git a/src/lib/krb4/send_to_kdc.c b/src/lib/krb4/send_to_kdc.c
index f6bec2881..c3219fb6c 100644
--- a/src/lib/krb4/send_to_kdc.c
+++ b/src/lib/krb4/send_to_kdc.c
@@ -18,7 +18,7 @@
#define S_AD_SZ sizeof(struct sockaddr_in)
-#ifdef POSIX
+#ifdef HAS_STDLIB_H
#include <stdlib.h>
#else
extern char *malloc(), *calloc(), *realloc();