From 56fec7c4ed0eff697a18f5df2e023209eb99d0a3 Mon Sep 17 00:00:00 2001 From: John Gilmore Date: Tue, 28 Feb 1995 07:58:41 +0000 Subject: * Makefile.in (osconf.h): Remove temp file osconf.new * base-defs.h, dbm.h, error_def.h, sysincl.h: Avoid #include form; use "..." form. * config.h: Rename to k5-config.h. This is too common a name, now that we use -I..../include/krb5. * free.h: Rename to k5-free.h. * configure.in (AC_INIT): Use another file (not krb5.h) as src test. [Didn't check in the removal of yet, til I check in the other changes throughout the tree that make it work.] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5004 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/krb5/ChangeLog | 18 ++++++ src/include/krb5/Makefile.in | 2 +- src/include/krb5/base-defs.h | 2 +- src/include/krb5/config.h | 137 ------------------------------------------- src/include/krb5/dbm.h | 2 +- src/include/krb5/error_def.h | 10 ++-- src/include/krb5/free.h | 36 ------------ src/include/krb5/k5-config.h | 137 +++++++++++++++++++++++++++++++++++++++++++ src/include/krb5/k5-free.h | 36 ++++++++++++ src/include/krb5/sysincl.h | 2 +- 10 files changed, 200 insertions(+), 182 deletions(-) delete mode 100644 src/include/krb5/config.h delete mode 100644 src/include/krb5/free.h create mode 100644 src/include/krb5/k5-config.h create mode 100644 src/include/krb5/k5-free.h (limited to 'src/include') diff --git a/src/include/krb5/ChangeLog b/src/include/krb5/ChangeLog index 92bb602de..2602e9a2c 100644 --- a/src/include/krb5/ChangeLog +++ b/src/include/krb5/ChangeLog @@ -1,3 +1,21 @@ +Mon Feb 27 23:47:58 1995 John Gilmore (gnu at toad.com) + + * Makefile.in (osconf.h): Remove temp file osconf.new. + + * krb5.h: Rename to ../krb5.h so it can be #included by end users + without the use of slashes or extra -I options. First step in + making it stand alone without a train of a dozen other include + files tagging along behind. + + * base-defs.h, dbm.h, error_def.h, sysincl.h: Avoid #include + form; use "..." form. + + * config.h: Rename to k5-config.h. This is too common a + name, now that we use -I..../include/krb5. + * free.h: Rename to k5-free.h. + + * configure.in (AC_INIT): Use another file (not krb5.h) as src test. + Mon Feb 27 11:35:49 1995 Keith Vetter (keithv@fusion.com) * config.h: added windows interface keyword for varargs functions, diff --git a/src/include/krb5/Makefile.in b/src/include/krb5/Makefile.in index 6eb9c3cc8..fe0aabea1 100644 --- a/src/include/krb5/Makefile.in +++ b/src/include/krb5/Makefile.in @@ -57,7 +57,7 @@ OSCONFSRC = $(srcdir)/stock/osconf.h osconf.h: $(OSCONFSRC) cat $(OSCONFSRC) | sed $(PROCESS_REPLACE) > osconf.new @if cmp -s osconf.new osconf.h ; then :; \ - else (set -x; $(RM) osconf.h ; $(CP) osconf.new osconf.h) fi + else (set -x; $(RM) osconf.h ; $(CP) osconf.new osconf.h; $(RM) osconf.new) fi clean:: clean-$(WHAT) $(RM) osconf.new $(BUILT_HEADERS) diff --git a/src/include/krb5/base-defs.h b/src/include/krb5/base-defs.h index 05638ebd0..eb2f5cfc1 100644 --- a/src/include/krb5/base-defs.h +++ b/src/include/krb5/base-defs.h @@ -27,7 +27,7 @@ #ifndef KRB5_BASE_DEFS__ #define KRB5_BASE_DEFS__ -#include +#include "wordsize.h" #ifndef FALSE #define FALSE 0 diff --git a/src/include/krb5/config.h b/src/include/krb5/config.h deleted file mode 100644 index 3f03ddae8..000000000 --- a/src/include/krb5/config.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright 1990,1991,1994,1995 by the Massachusetts Institute of Technology. - * All Rights Reserved. - * - * Export of this software from the United States of America may - * require a specific license from the United States Government. - * It is the responsibility of any person or organization contemplating - * export to obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and - * distribute this software and its documentation for any purpose and - * without fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, and that - * the name of M.I.T. not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" without express - * or implied warranty. - * - * Configuration definition file. - */ - - -#ifndef KRB5_CONFIG__ -#define KRB5_CONFIG__ - -#ifdef _MSDOS -/* - * Machine-type definitions: PC Clone 386 running Microloss Windows - */ - -#define KRB5_DBM_COMPAT__ /* Don't load dbm.h */ -#define KRB5_KDB5__ /* Don't load kdb.h */ -#define KRB5_KDB5_DBM__ /* Don't load kdb_dbm.h */ - -#define BITS16 -#define SIZEOF_INT 2 -#define SIZEOF_SHORT 2 -#define SIZEOF_LONG 4 - -#define USE_STRING_H -#define HAVE_SRAND -#define HAVE_ERRNO - -#ifndef _SIZE_T_DEFINED -typedef unsigned int size_t; -#define _SIZE_T_DEFINED -#endif - -#ifndef _U_TYPES_DEFINED -typedef unsigned long u_long; -typedef unsigned char u_char; -#define _U_LONG_DEFINED -#endif - -#ifndef INTERFACE -#define INTERFACE __far __export __pascal -#define INTERFACE_C __far __export __cdecl -#endif -#define FAR __far - -/* - * The following defines are needed to make work - * in stdc mode (/Za flag). Winsock.h needs . - */ -#define _far __far -#define _near __near -#define _pascal __pascal -#define _cdecl __cdecl -#define _huge __huge - -#else /* Rest of include file is for non-Microloss-Windows */ - -#ifndef KRB5_AUTOCONF__ -#define KRB5_AUTOCONF__ -#include "krb5/autoconf.h" -#endif - -#ifdef SYSV -/* Change srandom and random to use rand and srand */ -/* Taken from the Sandia changes. XXX We should really just include */ -/* srandom and random into Kerberos release, since rand() is a really */ -/* bad random number generator.... [tytso:19920616.2231EDT] */ -#define random() rand() -#define srandom(a) srand(a) -#ifndef unicos61 -#define utimes(a,b) utime(a,b) -#endif /* unicos61 */ -#endif /* SYSV */ - -/* XXX these should be parameterized soon... */ -#define PROVIDE_DES_CBC_MD5 -#define PROVIDE_DES_CBC_CRC -#define PROVIDE_RAW_DES_CBC -#define PROVIDE_CRC32 -#define PROVIDE_DES_CBC_CKSUM -#define PROVIDE_RSA_MD4 -#define PROVIDE_RSA_MD5 - -#define DEFAULT_PWD_STRING1 "Enter password:" -#define DEFAULT_PWD_STRING2 "Re-enter password for verification:" - -#define KRB5_KDB_MAX_LIFE (60*60*24) /* one day */ -#define KRB5_KDB_MAX_RLIFE (60*60*24*7) /* one week */ -#define KRB5_KDB_EXPIRATION 2145830400 /* Thu Jan 1 00:00:00 2038 UTC */ - -/* - * For paranoid DOE types that don't want to give helpful error - * messages to the client....er, attacker - */ -#undef KRBCONF_VAGUE_ERRORS - -/* - * Define this if you want the KDC to modify the Kerberos database; - * this allows the last request information to be updated, as well as - * the failure count information. - * - * Note that this doesn't work if you're using slave servers!!! It - * also causes the database to be modified (and thus need to be - * locked) frequently. - */ -#undef KRBCONF_KDC_MODIFIES_KDB - -/* - * Windows requires a different api interface to each function. Here - * just define it as NULL. - */ -#define INTERFACE -#define INTERFACE_C -#define FAR -#define labs(x) abs(x) - -#endif /* __windows__ */ - -#endif /* KRB5_CONFIG__ */ - diff --git a/src/include/krb5/dbm.h b/src/include/krb5/dbm.h index 4453dbd8d..9d0c6d9de 100644 --- a/src/include/krb5/dbm.h +++ b/src/include/krb5/dbm.h @@ -28,7 +28,7 @@ #ifndef KRB5_DBM_COMPAT__ #define KRB5_DBM_COMPAT__ -#include +#include "osconf.h" #ifndef ODBM #include diff --git a/src/include/krb5/error_def.h b/src/include/krb5/error_def.h index 8f0b687db..ef69a2cb7 100644 --- a/src/include/krb5/error_def.h +++ b/src/include/krb5/error_def.h @@ -28,13 +28,13 @@ #ifndef KRB5_ERROR_DEF__ #define KRB5_ERROR_DEF__ -#include -#include -#include +#include "krb5_err.h" +#include "kdb5_err.h" +#include "kv5m_err.h" #ifndef KRB5_USE_ISODE -#include +#include "asn1_err.h" #else -#include +#include "isode_err.h" #endif #include diff --git a/src/include/krb5/free.h b/src/include/krb5/free.h deleted file mode 100644 index 600f3cd7c..000000000 --- a/src/include/krb5/free.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * include/krb5/free.h - * - * Copyright 1990 by the Massachusetts Institute of Technology. - * All Rights Reserved. - * - * Export of this software from the United States of America may - * require a specific license from the United States Government. - * It is the responsibility of any person or organization contemplating - * export to obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and - * distribute this software and its documentation for any purpose and - * without fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, and that - * the name of M.I.T. not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" without express - * or implied warranty. - * - * - * definitions for free routines - */ - - -#ifndef KRB5_FREE__ -#define KRB5_FREE__ - -/* to keep lint happy */ -#define krb5_xfree(val) free((char *)(val)) - -#define krb5_free_data(context, val) { krb5_xfree((val)->data); krb5_xfree(val);} - -#endif /* KRB5_FREE__ */ diff --git a/src/include/krb5/k5-config.h b/src/include/krb5/k5-config.h new file mode 100644 index 000000000..3f03ddae8 --- /dev/null +++ b/src/include/krb5/k5-config.h @@ -0,0 +1,137 @@ +/* + * Copyright 1990,1991,1994,1995 by the Massachusetts Institute of Technology. + * All Rights Reserved. + * + * Export of this software from the United States of America may + * require a specific license from the United States Government. + * It is the responsibility of any person or organization contemplating + * export to obtain such a license before exporting. + * + * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and + * distribute this software and its documentation for any purpose and + * without fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation, and that + * the name of M.I.T. not be used in advertising or publicity pertaining + * to distribution of the software without specific, written prior + * permission. M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" without express + * or implied warranty. + * + * Configuration definition file. + */ + + +#ifndef KRB5_CONFIG__ +#define KRB5_CONFIG__ + +#ifdef _MSDOS +/* + * Machine-type definitions: PC Clone 386 running Microloss Windows + */ + +#define KRB5_DBM_COMPAT__ /* Don't load dbm.h */ +#define KRB5_KDB5__ /* Don't load kdb.h */ +#define KRB5_KDB5_DBM__ /* Don't load kdb_dbm.h */ + +#define BITS16 +#define SIZEOF_INT 2 +#define SIZEOF_SHORT 2 +#define SIZEOF_LONG 4 + +#define USE_STRING_H +#define HAVE_SRAND +#define HAVE_ERRNO + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +#ifndef _U_TYPES_DEFINED +typedef unsigned long u_long; +typedef unsigned char u_char; +#define _U_LONG_DEFINED +#endif + +#ifndef INTERFACE +#define INTERFACE __far __export __pascal +#define INTERFACE_C __far __export __cdecl +#endif +#define FAR __far + +/* + * The following defines are needed to make work + * in stdc mode (/Za flag). Winsock.h needs . + */ +#define _far __far +#define _near __near +#define _pascal __pascal +#define _cdecl __cdecl +#define _huge __huge + +#else /* Rest of include file is for non-Microloss-Windows */ + +#ifndef KRB5_AUTOCONF__ +#define KRB5_AUTOCONF__ +#include "krb5/autoconf.h" +#endif + +#ifdef SYSV +/* Change srandom and random to use rand and srand */ +/* Taken from the Sandia changes. XXX We should really just include */ +/* srandom and random into Kerberos release, since rand() is a really */ +/* bad random number generator.... [tytso:19920616.2231EDT] */ +#define random() rand() +#define srandom(a) srand(a) +#ifndef unicos61 +#define utimes(a,b) utime(a,b) +#endif /* unicos61 */ +#endif /* SYSV */ + +/* XXX these should be parameterized soon... */ +#define PROVIDE_DES_CBC_MD5 +#define PROVIDE_DES_CBC_CRC +#define PROVIDE_RAW_DES_CBC +#define PROVIDE_CRC32 +#define PROVIDE_DES_CBC_CKSUM +#define PROVIDE_RSA_MD4 +#define PROVIDE_RSA_MD5 + +#define DEFAULT_PWD_STRING1 "Enter password:" +#define DEFAULT_PWD_STRING2 "Re-enter password for verification:" + +#define KRB5_KDB_MAX_LIFE (60*60*24) /* one day */ +#define KRB5_KDB_MAX_RLIFE (60*60*24*7) /* one week */ +#define KRB5_KDB_EXPIRATION 2145830400 /* Thu Jan 1 00:00:00 2038 UTC */ + +/* + * For paranoid DOE types that don't want to give helpful error + * messages to the client....er, attacker + */ +#undef KRBCONF_VAGUE_ERRORS + +/* + * Define this if you want the KDC to modify the Kerberos database; + * this allows the last request information to be updated, as well as + * the failure count information. + * + * Note that this doesn't work if you're using slave servers!!! It + * also causes the database to be modified (and thus need to be + * locked) frequently. + */ +#undef KRBCONF_KDC_MODIFIES_KDB + +/* + * Windows requires a different api interface to each function. Here + * just define it as NULL. + */ +#define INTERFACE +#define INTERFACE_C +#define FAR +#define labs(x) abs(x) + +#endif /* __windows__ */ + +#endif /* KRB5_CONFIG__ */ + diff --git a/src/include/krb5/k5-free.h b/src/include/krb5/k5-free.h new file mode 100644 index 000000000..600f3cd7c --- /dev/null +++ b/src/include/krb5/k5-free.h @@ -0,0 +1,36 @@ +/* + * include/krb5/free.h + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * All Rights Reserved. + * + * Export of this software from the United States of America may + * require a specific license from the United States Government. + * It is the responsibility of any person or organization contemplating + * export to obtain such a license before exporting. + * + * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and + * distribute this software and its documentation for any purpose and + * without fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation, and that + * the name of M.I.T. not be used in advertising or publicity pertaining + * to distribution of the software without specific, written prior + * permission. M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" without express + * or implied warranty. + * + * + * definitions for free routines + */ + + +#ifndef KRB5_FREE__ +#define KRB5_FREE__ + +/* to keep lint happy */ +#define krb5_xfree(val) free((char *)(val)) + +#define krb5_free_data(context, val) { krb5_xfree((val)->data); krb5_xfree(val);} + +#endif /* KRB5_FREE__ */ diff --git a/src/include/krb5/sysincl.h b/src/include/krb5/sysincl.h index c34c79a56..38f691c8e 100644 --- a/src/include/krb5/sysincl.h +++ b/src/include/krb5/sysincl.h @@ -33,7 +33,7 @@ #include /* needed for much of the reset */ #endif /* KRB5_SYSTYPES__ */ -#include /* USE*TIME_H macros */ +#include "osconf.h" /* USE*TIME_H macros */ #ifdef HAVE_SYS_TIME_H #include #ifdef TIME_WITH_SYS_TIME -- cgit