summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@toad.com>1995-03-18 03:15:26 +0000
committerJohn Gilmore <gnu@toad.com>1995-03-18 03:15:26 +0000
commit013d8756ccc5074dcb6ed28ffec55e2f9776bbb9 (patch)
treed554021fba43cb9577222e5418060816ef27943f /src
parentb268959c70649c0cb2bc048810629a13c3335394 (diff)
downloadkrb5-013d8756ccc5074dcb6ed28ffec55e2f9776bbb9.tar.gz
krb5-013d8756ccc5074dcb6ed28ffec55e2f9776bbb9.tar.xz
krb5-013d8756ccc5074dcb6ed28ffec55e2f9776bbb9.zip
* k5-config.h: Move <sys/types.h> handling from ../krb5.h to
here, because we need <sys/types.h> or the u_* types to be defined before we include the Unix socket include files a little later in k5-config.h. We actually add this code twice, once in the MSDOS section and once in the Unix/Mac section. (NEED_SOCKETS): Also include <net/if.h>, for localaddr.c. * Makefile.in (clean-mac): Add. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5155 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/include/krb5/ChangeLog10
-rw-r--r--src/include/krb5/Makefile.in2
-rw-r--r--src/include/krb5/k5-config.h34
3 files changed, 45 insertions, 1 deletions
diff --git a/src/include/krb5/ChangeLog b/src/include/krb5/ChangeLog
index 11e9758526..80569ba9ac 100644
--- a/src/include/krb5/ChangeLog
+++ b/src/include/krb5/ChangeLog
@@ -1,3 +1,13 @@
+Fri Mar 17 19:12:13 1995 John Gilmore (gnu at toad.com)
+
+ * k5-config.h: Move <sys/types.h> handling from ../krb5.h to
+ here, because we need <sys/types.h> or the u_* types to be defined
+ before we include the Unix socket include files a little later in
+ k5-config.h. We actually add this code twice, once in the MSDOS
+ section and once in the Unix/Mac section.
+ (NEED_SOCKETS): Also include <net/if.h>, for localaddr.c.
+ * Makefile.in (clean-mac): Add.
+
Tue Mar 14 16:50:54 1995 <tytso@rsx-11.mit.edu>
* Makefile.in: Delete definition for KRB5ROOT and KRB5_INCDIR,
diff --git a/src/include/krb5/Makefile.in b/src/include/krb5/Makefile.in
index c21a836bcd..4d77c085a3 100644
--- a/src/include/krb5/Makefile.in
+++ b/src/include/krb5/Makefile.in
@@ -60,5 +60,5 @@ clean:: clean-$(WHAT)
clean-unix::
$(RM) $(ET_HEADERS)
-
+clean-mac::
clean-windows::
diff --git a/src/include/krb5/k5-config.h b/src/include/krb5/k5-config.h
index 868c3b99bd..0ba42c7a5e 100644
--- a/src/include/krb5/k5-config.h
+++ b/src/include/krb5/k5-config.h
@@ -61,12 +61,32 @@ typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
+/* FIXME, Keith! I'm not sure how it ever worked.
+ Typedeffing u_long and u_char twice will break. Please eliminate either
+ the DOS-only _U_TYPES_DEFINED stuff, or the HAVE_SYS_TYPES_H stuff in
+ the DOS section of this file. The KRB5_SYSTYPES section below was
+ previously in ../krb5.h, but I moved it into k5-config.h because
+ there was an interaction on Unix needing <sys/types.h> before
+ defining the networking include files in k5-config.h. */
#ifndef _U_TYPES_DEFINED
typedef unsigned long u_long;
typedef unsigned char u_char;
#define _U_LONG_DEFINED
#endif
+#ifndef KRB5_SYSTYPES__
+#define KRB5_SYSTYPES__
+
+#ifdef HAVE_SYS_TYPES_H /* From autoconf.h */
+#include <sys/types.h>
+#else /* HAVE_SYS_TYPES_H */
+typedef unsigned long u_long;
+typedef unsigned int u_int;
+typedef unsigned short u_short;
+typedef unsigned char u_char;
+#endif /* HAVE_SYS_TYPES_H */
+#endif /* KRB5_SYSTYPES__ */
+
#ifndef INTERFACE
#define INTERFACE __far __export __pascal
#define INTERFACE_C __far __export __cdecl
@@ -155,6 +175,19 @@ typedef unsigned char u_char;
#include "autoconf.h"
#endif
+#ifndef KRB5_SYSTYPES__
+#define KRB5_SYSTYPES__
+
+#ifdef HAVE_SYS_TYPES_H /* From autoconf.h */
+#include <sys/types.h>
+#else /* HAVE_SYS_TYPES_H */
+typedef unsigned long u_long;
+typedef unsigned int u_int;
+typedef unsigned short u_short;
+typedef unsigned char u_char;
+#endif /* HAVE_SYS_TYPES_H */
+#endif /* KRB5_SYSTYPES__ */
+
#ifdef SYSV
/* Change srandom and random to use rand and srand */
/* Taken from the Sandia changes. XXX We should really just include */
@@ -229,6 +262,7 @@ typedef unsigned char u_char;
#include <sys/param.h> /* For MAXHOSTNAMELEN */
#include <sys/socket.h> /* For SOCK_*, AF_*, etc */
#include <sys/time.h> /* For struct timeval */
+#include <net/if.h> /* For struct ifconf, for localaddr.c */
#endif /* HAVE_MACSOCK_H */
#endif /* NEED_SOCKETS */