From 0120342539d5bf6314175d43c74ad2a8fb1ce920 Mon Sep 17 00:00:00 2001 From: John Gilmore Date: Tue, 28 Feb 1995 09:10:59 +0000 Subject: [PATCH] Avoid includes git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5014 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 4 ++++ src/lib/krb5/os/an_to_ln.c | 12 +----------- src/lib/krb5/os/ccdefname.c | 6 +----- src/lib/krb5/os/def_realm.c | 5 +---- src/lib/krb5/os/free_hstrl.c | 6 +----- src/lib/krb5/os/free_krbhs.c | 5 +---- src/lib/krb5/os/full_ipadr.c | 6 +----- src/lib/krb5/os/gen_port.c | 6 +----- src/lib/krb5/os/gen_rname.c | 7 +------ src/lib/krb5/os/get_krbhst.c | 4 +--- src/lib/krb5/os/hst_realm.c | 7 +------ src/lib/krb5/os/init_os_ctx.c | 5 +---- src/lib/krb5/os/krbfileio.c | 7 +------ src/lib/krb5/os/ktdefname.c | 6 +----- src/lib/krb5/os/kuserok.c | 8 +------- src/lib/krb5/os/localaddr.c | 5 +---- src/lib/krb5/os/locate_kdc.c | 8 +------- src/lib/krb5/os/lock_file.c | 7 +------ src/lib/krb5/os/net_read.c | 4 +--- src/lib/krb5/os/net_write.c | 4 +--- src/lib/krb5/os/osconfig.c | 5 +---- src/lib/krb5/os/port2ip.c | 7 +------ src/lib/krb5/os/read_msg.c | 9 +-------- src/lib/krb5/os/read_pwd.c | 6 +----- src/lib/krb5/os/realm_dom.c | 6 +----- src/lib/krb5/os/sendto_kdc.c | 9 +-------- src/lib/krb5/os/sn2princ.c | 5 +---- src/lib/krb5/os/timeofday.c | 4 +--- src/lib/krb5/os/unlck_file.c | 6 +----- src/lib/krb5/os/ustime.c | 6 +----- src/lib/krb5/os/write_msg.c | 8 +------- 31 files changed, 34 insertions(+), 159 deletions(-) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index c5d032b5a..d1e55452d 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,7 @@ +Tue Feb 28 01:07:37 1995 John Gilmore (gnu at toad.com) + + * *.c: Avoid includes. + Fri Feb 3 08:24:18 1995 Theodore Y. Ts'o (tytso@dcl) * gmt_mktime.c (gmt_mktime): Don't double count the leap day in a diff --git a/src/lib/krb5/os/an_to_ln.c b/src/lib/krb5/os/an_to_ln.c index de4633c9a..a96fb4c18 100644 --- a/src/lib/krb5/os/an_to_ln.c +++ b/src/lib/krb5/os/an_to_ln.c @@ -24,17 +24,7 @@ * krb5_aname_to_localname() */ - -#include - -#include -#include -#include - -#include -#ifdef USE_DBM_LNAME -#include -#endif +#include "k5-int.h" #ifndef min #define min(a,b) ((a) > (b) ? (b) : (a)) diff --git a/src/lib/krb5/os/ccdefname.c b/src/lib/krb5/os/ccdefname.c index dde631c71..3b00b6df5 100644 --- a/src/lib/krb5/os/ccdefname.c +++ b/src/lib/krb5/os/ccdefname.c @@ -24,12 +24,8 @@ * Return default cred. cache name. */ - -#include - +#include "k5-int.h" #include -#include -#include char *krb5_cc_default_name(context) krb5_context context; diff --git a/src/lib/krb5/os/def_realm.c b/src/lib/krb5/os/def_realm.c index 0685d2081..f32061ec3 100644 --- a/src/lib/krb5/os/def_realm.c +++ b/src/lib/krb5/os/def_realm.c @@ -24,10 +24,7 @@ * krb5_get_default_realm() function. */ - -#include -#include - +#include "k5-int.h" #include /* diff --git a/src/lib/krb5/os/free_hstrl.c b/src/lib/krb5/os/free_hstrl.c index 4945dab56..f112041e4 100644 --- a/src/lib/krb5/os/free_hstrl.c +++ b/src/lib/krb5/os/free_hstrl.c @@ -24,12 +24,8 @@ * krb5_free_host_realm() */ - -#include - -#include +#include "k5-int.h" #include -#include /* Frees the storage taken by a realm list returned by krb5_get_local_realm. diff --git a/src/lib/krb5/os/free_krbhs.c b/src/lib/krb5/os/free_krbhs.c index c0326d612..066acfcbf 100644 --- a/src/lib/krb5/os/free_krbhs.c +++ b/src/lib/krb5/os/free_krbhs.c @@ -24,10 +24,7 @@ * krb5_free_krbhst() function */ - -#include - -#include +#include "k5-int.h" /* Frees the storage taken by a host list returned by krb5_get_krbhst. diff --git a/src/lib/krb5/os/full_ipadr.c b/src/lib/krb5/os/full_ipadr.c index 10d26eb2d..d5539e454 100644 --- a/src/lib/krb5/os/full_ipadr.c +++ b/src/lib/krb5/os/full_ipadr.c @@ -24,14 +24,10 @@ * Take an IP addr & port and generate a full IP address. */ - -#include -#include +#include "k5-int.h" #ifdef KRB5_USE_INET -#include -#include #include "os-proto.h" #include diff --git a/src/lib/krb5/os/gen_port.c b/src/lib/krb5/os/gen_port.c index 33ebd3d44..a5eb91bca 100644 --- a/src/lib/krb5/os/gen_port.c +++ b/src/lib/krb5/os/gen_port.c @@ -24,11 +24,7 @@ * Take an IP addr & port and generate a full IP address. */ - -#include -#include -#include -#include +#include "k5-int.h" #include "os-proto.h" krb5_error_code diff --git a/src/lib/krb5/os/gen_rname.c b/src/lib/krb5/os/gen_rname.c index 26c770fcd..59bd7daca 100644 --- a/src/lib/krb5/os/gen_rname.c +++ b/src/lib/krb5/os/gen_rname.c @@ -25,12 +25,7 @@ * a replay cache tag string. */ - -#include -#include - -#include -#include +#include "k5-int.h" #include "os-proto.h" #ifdef KRB5_USE_INET #include diff --git a/src/lib/krb5/os/get_krbhst.c b/src/lib/krb5/os/get_krbhst.c index a779936b4..2445c1bde 100644 --- a/src/lib/krb5/os/get_krbhst.c +++ b/src/lib/krb5/os/get_krbhst.c @@ -24,9 +24,7 @@ * krb5_get_krbhst() function. */ - -#include -#include +#include "k5-int.h" #include #include diff --git a/src/lib/krb5/os/hst_realm.c b/src/lib/krb5/os/hst_realm.c index 3f1768b77..1cbe9aead 100644 --- a/src/lib/krb5/os/hst_realm.c +++ b/src/lib/krb5/os/hst_realm.c @@ -62,13 +62,8 @@ * host names should be in the usual form (e.g. FOO.BAR.BAZ) */ - -#include -#include -#include -#include +#include "k5-int.h" #include - #include /* for old Unixes and friends ... */ diff --git a/src/lib/krb5/os/init_os_ctx.c b/src/lib/krb5/os/init_os_ctx.c index 59c7c28ff..4c92c6775 100644 --- a/src/lib/krb5/os/init_os_ctx.c +++ b/src/lib/krb5/os/init_os_ctx.c @@ -23,10 +23,7 @@ * krb5_init_contex() */ -#include -#include -#include -#include +#include "k5-int.h" krb5_error_code krb5_os_init_context(ctx) diff --git a/src/lib/krb5/os/krbfileio.c b/src/lib/krb5/os/krbfileio.c index 139493e62..44521dd9b 100644 --- a/src/lib/krb5/os/krbfileio.c +++ b/src/lib/krb5/os/krbfileio.c @@ -33,14 +33,9 @@ static char *VersionID = "@(#)krbfileio.c 2 - 08/22/91"; #endif -#include -#include -#include - +#include "k5-int.h" #include - #include -#include #ifdef NEED_SYS_FCNTL_H #include #endif diff --git a/src/lib/krb5/os/ktdefname.c b/src/lib/krb5/os/ktdefname.c index bc0bf48c3..2e944d0e2 100644 --- a/src/lib/krb5/os/ktdefname.c +++ b/src/lib/krb5/os/ktdefname.c @@ -24,11 +24,7 @@ * Return default keytab file name. */ - -#include -#include - -#include +#include "k5-int.h" extern char *krb5_defkeyname; diff --git a/src/lib/krb5/os/kuserok.c b/src/lib/krb5/os/kuserok.c index e7fa04ad0..900f8c0be 100644 --- a/src/lib/krb5/os/kuserok.c +++ b/src/lib/krb5/os/kuserok.c @@ -24,13 +24,7 @@ * krb5_kuserok() */ - -#include -#include -#include -#include -#include - +#include "k5-int.h" #include #include diff --git a/src/lib/krb5/os/localaddr.c b/src/lib/krb5/os/localaddr.c index 45b91695a..1e35ca4ec 100644 --- a/src/lib/krb5/os/localaddr.c +++ b/src/lib/krb5/os/localaddr.c @@ -27,10 +27,7 @@ */ -#include -#include - -#include +#include "k5-int.h" /* needed for solaris, harmless elsewhere... */ #define BSD_COMP diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c index fa1f5e04e..99e6fdcfe 100644 --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -24,14 +24,8 @@ * get socket addresses for KDC. */ - -#include -#include - -#include +#include "k5-int.h" #include -#include - #include #include #ifdef KRB5_USE_INET diff --git a/src/lib/krb5/os/lock_file.c b/src/lib/krb5/os/lock_file.c index 9e342f429..86368d80e 100644 --- a/src/lib/krb5/os/lock_file.c +++ b/src/lib/krb5/os/lock_file.c @@ -24,14 +24,10 @@ * libos: krb5_lock_file routine */ - #if HAVE_UNISTD_H #include #endif - -#include -#include - +#include "k5-int.h" #include #ifdef POSIX_FILE_LOCKS @@ -48,7 +44,6 @@ #endif #include -#include extern int errno; diff --git a/src/lib/krb5/os/net_read.c b/src/lib/krb5/os/net_read.c index 89394d564..caa85ff78 100644 --- a/src/lib/krb5/os/net_read.c +++ b/src/lib/krb5/os/net_read.c @@ -22,9 +22,7 @@ * */ - -#include -#include +#include "k5-int.h" /* * krb5_net_read() reads from the file descriptor "fd" to the buffer diff --git a/src/lib/krb5/os/net_write.c b/src/lib/krb5/os/net_write.c index 5d07fd415..9cf3bb5e7 100644 --- a/src/lib/krb5/os/net_write.c +++ b/src/lib/krb5/os/net_write.c @@ -22,9 +22,7 @@ * */ - -#include -#include +#include "k5-int.h" /* * krb5_net_write() writes "len" bytes from "buf" to the file diff --git a/src/lib/krb5/os/osconfig.c b/src/lib/krb5/os/osconfig.c index d7da6315f..84ec68c2f 100644 --- a/src/lib/krb5/os/osconfig.c +++ b/src/lib/krb5/os/osconfig.c @@ -24,10 +24,7 @@ * Definition of default configuration parameters. */ - -#include -#include - +#include "k5-int.h" char *krb5_config_file = DEFAULT_CONFIG_FILENAME; char *krb5_trans_file = DEFAULT_TRANS_FILENAME; diff --git a/src/lib/krb5/os/port2ip.c b/src/lib/krb5/os/port2ip.c index 77750752f..b6883d782 100644 --- a/src/lib/krb5/os/port2ip.c +++ b/src/lib/krb5/os/port2ip.c @@ -24,14 +24,9 @@ * Take an ADDRPORT address and split into IP addr & port. */ - -#include -#include +#include "k5-int.h" #ifdef KRB5_USE_INET - -#include -#include #include "os-proto.h" #include diff --git a/src/lib/krb5/os/read_msg.c b/src/lib/krb5/os/read_msg.c index 08232a5be..2d49249dc 100644 --- a/src/lib/krb5/os/read_msg.c +++ b/src/lib/krb5/os/read_msg.c @@ -24,15 +24,8 @@ * Write a message to the network */ - -#include -#include -#include -#include +#include "k5-int.h" #include - -#include -#include #include krb5_error_code diff --git a/src/lib/krb5/os/read_pwd.c b/src/lib/krb5/os/read_pwd.c index 98d9ce47f..3ca73fbbe 100644 --- a/src/lib/krb5/os/read_pwd.c +++ b/src/lib/krb5/os/read_pwd.c @@ -24,9 +24,7 @@ * libos: krb5_read_password for BSD 4.3 */ - -#include - +#include "k5-int.h" #include #include #include @@ -36,8 +34,6 @@ #include #endif -#include - /* POSIX_* are auto-magically defined in at source configuration time. */ diff --git a/src/lib/krb5/os/realm_dom.c b/src/lib/krb5/os/realm_dom.c index 8acf7be9b..dd146825a 100644 --- a/src/lib/krb5/os/realm_dom.c +++ b/src/lib/krb5/os/realm_dom.c @@ -38,12 +38,8 @@ * This was hacked together from krb5_get_host_realm(). */ -#include -#include -#include -#include +#include "k5-int.h" #include - #include /* for old Unixes and friends ... */ diff --git a/src/lib/krb5/os/sendto_kdc.c b/src/lib/krb5/os/sendto_kdc.c index 55c85603d..24022ad6b 100644 --- a/src/lib/krb5/os/sendto_kdc.c +++ b/src/lib/krb5/os/sendto_kdc.c @@ -25,16 +25,11 @@ * as necessary. */ - -#include -#include -#include +#include "k5-int.h" #include #include #include - -#include #include "os-proto.h" #ifdef _AIX @@ -50,10 +45,8 @@ * * The storage for 'reply' is allocated and should be freed by the caller * when finished. - * */ - extern int krb5_max_dgram_size; extern int krb5_max_skdc_timeout; extern int krb5_skdc_timeout_shift; diff --git a/src/lib/krb5/os/sn2princ.c b/src/lib/krb5/os/sn2princ.c index 41bfb7a06..97509717b 100644 --- a/src/lib/krb5/os/sn2princ.c +++ b/src/lib/krb5/os/sn2princ.c @@ -25,10 +25,7 @@ * form. */ - -#include -#include -#include +#include "k5-int.h" #include #include #include diff --git a/src/lib/krb5/os/timeofday.c b/src/lib/krb5/os/timeofday.c index dc431502a..5197809d3 100644 --- a/src/lib/krb5/os/timeofday.c +++ b/src/lib/krb5/os/timeofday.c @@ -28,9 +28,7 @@ #include #include /* needed for libos-proto.h */ -#include -#include -#include +#include "k5-int.h" #ifdef POSIX_TYPES #define timetype time_t diff --git a/src/lib/krb5/os/unlck_file.c b/src/lib/krb5/os/unlck_file.c index 681f3c8e6..900073e09 100644 --- a/src/lib/krb5/os/unlck_file.c +++ b/src/lib/krb5/os/unlck_file.c @@ -24,12 +24,8 @@ * libos: krb5_lock_file routine */ - #include - -#include -#include -#include +#include "k5-int.h" krb5_error_code krb5_unlock_file(context, filep, pathname) diff --git a/src/lib/krb5/os/ustime.c b/src/lib/krb5/os/ustime.c index 9e3c7ae5b..1d5014691 100644 --- a/src/lib/krb5/os/ustime.c +++ b/src/lib/krb5/os/ustime.c @@ -24,11 +24,7 @@ * krb5_mstimeofday for BSD 4.3 */ - -#include -#include -#include -#include +#include "k5-int.h" extern int errno; diff --git a/src/lib/krb5/os/write_msg.c b/src/lib/krb5/os/write_msg.c index f1c2f8f4a..e9f615412 100644 --- a/src/lib/krb5/os/write_msg.c +++ b/src/lib/krb5/os/write_msg.c @@ -24,14 +24,8 @@ * convenience sendauth/recvauth functions */ - -#include -#include -#include +#include "k5-int.h" #include - -#include -#include #include krb5_error_code -- 2.26.2