From 27dbb4d0a209eef5f7afa770cbfd7c0b4ccf53e8 Mon Sep 17 00:00:00 2001 From: Nathan Neulinger Date: Wed, 16 May 2001 00:28:09 +0000 Subject: [PATCH] afsconfig-updates-20010515 updates to and to use afsconfig.h --- src/afsconfig.h.in | 18 ++++++++++++++++++ src/des/Makefile | 4 ++-- src/des/andrew-conf.h | 1 + src/des/cksum.c | 7 ++++--- src/des/crypt.c | 5 +++++ src/des/des_conf.h | 1 + src/des/new_rnd_key.c | 9 +++++++-- src/des/read_pssword.c | 16 +++++++++------- src/des/strng_to_key.c | 7 ++++++- src/des/weak_key.c | 7 ++++++- src/libafsrpc/Makefile | 2 +- 11 files changed, 60 insertions(+), 17 deletions(-) diff --git a/src/afsconfig.h.in b/src/afsconfig.h.in index 851120400..8cccb5748 100644 --- a/src/afsconfig.h.in +++ b/src/afsconfig.h.in @@ -13,6 +13,7 @@ #define HAVE_STRING_H #ifdef AFS_NT40_ENV +#define HAVE_WINDOWS_H #define HAVE_MALLOC_H #define HAVE_WINSOCK2_H #define HAVE_DIRECT_H @@ -51,4 +52,21 @@ #define HAVE_SYS_MOUNT_H #endif +#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX22_ENV) +#define HAVE_STRINGS_H +#define HAVE_STRING_H +#else +#define HAVE_STRING_H +#endif + +#if defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV) +#define HAVE_TERMIOS_H +#elif defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) +#define HAVE_TERMIOS_H +#endif + +#if defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) +#define HAVE_SIGNAL_H +#endif + #endif /* AFSCONFIG_H */ diff --git a/src/des/Makefile b/src/des/Makefile index 5cb0fc2d7..51013f81d 100644 --- a/src/des/Makefile +++ b/src/des/Makefile @@ -36,8 +36,8 @@ DBG = GPROF = # by default do not try to hide entry points F_CC = -c ${GPROF} ${DBG} ${XCFLAGS} -F_CPP = -I${K_INC} -I. -MK_STR = " \$${CC} -I\$${SRC} \$${F_CPP} \$${F_CC}" +F_CPP = -I${K_INC} -I. -I${TOP_SRCDIR}/config +MK_STR = " \$${CC} -I\$${SRC} \$${F_CPP} \$${F_CC}" -I${TOP_SRCDIR}/config LDFLAGS = ${XLDFLAGS} # dont use optimizer, since it pessimizes on uvax2, diff --git a/src/des/andrew-conf.h b/src/des/andrew-conf.h index 74a316dfd..ed4cc4ab8 100644 --- a/src/des/andrew-conf.h +++ b/src/des/andrew-conf.h @@ -3,6 +3,7 @@ */ #include +#include #ifdef vax #include "conf-bsdvax.h" #else diff --git a/src/des/cksum.c b/src/des/cksum.c index e85add710..224435666 100644 --- a/src/des/cksum.c +++ b/src/des/cksum.c @@ -20,11 +20,12 @@ #include #include #include -#if defined(AFS_SUN5_ENV) || defined(AFS_NT40_ENV) -#include -#else +#if defined(HAVE_STRINGS_H) #include #endif +#if defined(HAVE_STRING_H) +#include +#endif #include #include "des_internal.h" diff --git a/src/des/crypt.c b/src/des/crypt.c index d16e2cce9..d60375c50 100644 --- a/src/des/crypt.c +++ b/src/des/crypt.c @@ -42,7 +42,12 @@ static char sccsid[] = "@(#)crypt.c 5.11 (Berkeley) 6/25/91"; #include #endif #include +#if defined(HAVE_STRINGS_H) +#include +#endif +#if defined(HAVE_STRING_H) #include +#endif /* * UNIX password, and DES, encryption. diff --git a/src/des/des_conf.h b/src/des/des_conf.h index 8bdbe90d7..a643fb3e2 100644 --- a/src/des/des_conf.h +++ b/src/des/des_conf.h @@ -16,6 +16,7 @@ */ #include +#include #include /* Machine-type and OS-type based configuration */ diff --git a/src/des/new_rnd_key.c b/src/des/new_rnd_key.c index 2461ab95d..557a8fec9 100644 --- a/src/des/new_rnd_key.c +++ b/src/des/new_rnd_key.c @@ -16,12 +16,17 @@ #include #include +#include +#include "des_internal.h" #ifdef AFS_PTHREAD_ENV #include #endif +#if defined(HAVE_STRINGS_H) +#include +#endif +#if defined(HAVE_STRING_H) #include -#include -#include "des_internal.h" +#endif #include "stats.h" extern void des_fixup_key_parity(); diff --git a/src/des/read_pssword.c b/src/des/read_pssword.c index 9871c2701..8eb307b70 100644 --- a/src/des/read_pssword.c +++ b/src/des/read_pssword.c @@ -17,10 +17,12 @@ #include "conf.h" #include -#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) +#if defined(HAVE_STRINGS_H) #include #endif +#if defined(HAVE_STRING_H) #include +#endif #ifdef BSDUNIX #ifdef AFS_SUN5_ENV @@ -34,8 +36,11 @@ #include #endif -#if defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) +#ifdef HAVE_SIGNAL_H #include +#endif + +#ifdef HAVE_UNISTD_H #include #endif @@ -46,14 +51,11 @@ static int intrupt; #endif -#if defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV) +#ifdef HAVE_TERMIOS_H #include #endif -#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) -#include -#endif -#ifdef AFS_NT40_ENV +#ifdef HAVE_WINDOWS_H #include #endif diff --git a/src/des/strng_to_key.c b/src/des/strng_to_key.c index 550372cf5..43ee72bc4 100644 --- a/src/des/strng_to_key.c +++ b/src/des/strng_to_key.c @@ -22,10 +22,15 @@ #include #include -#include #include #include #include "des_internal.h" +#if defined(HAVE_STRINGS_H) +#include +#endif +#if defined(HAVE_STRING_H) +#include +#endif extern int des_debug; extern int des_debug_print(); diff --git a/src/des/weak_key.c b/src/des/weak_key.c index 0ebe45aaa..0b6b4d7e3 100644 --- a/src/des/weak_key.c +++ b/src/des/weak_key.c @@ -12,9 +12,14 @@ * Originally written 8/85 by Steve Miller, MIT Project Athena. */ -#include #include #include "des_internal.h" +#if defined(HAVE_STRINGS_H) +#include +#endif +#if defined(HAVE_STRING_H) +#include +#endif /* * The following are the weak DES keys: diff --git a/src/libafsrpc/Makefile b/src/libafsrpc/Makefile index 543e3c007..5140265da 100644 --- a/src/libafsrpc/Makefile +++ b/src/libafsrpc/Makefile @@ -13,7 +13,7 @@ include ../config/Makefile.${SYS_NAME} CC=${MT_CC} INCLUDES = -I${SRCDIR}include -I.. -I../rx -CFLAGS = ${OPTMZ} ${DBG} ${INCLUDES} -DRXDEBUG ${MT_CFLAGS} +CFLAGS = ${OPTMZ} ${DBG} ${INCLUDES} -DRXDEBUG ${MT_CFLAGS} -I${TOP_SRCDIR}/config SFLAGS=-P -I${SRCDIR}include RX = ../rx CCRULE = ${CC} ${CFLAGS} -c $? -- 2.39.5