[828] in Kerberos_V5_Development
Re: K5 include file issues [was: Slashes don't separate...]
daemon@ATHENA.MIT.EDU (John Gilmore)
Sun Jan 22 22:24:21 1995
To: "Theodore Ts'o" <tytso@MIT.EDU>
Cc: John Gilmore <gnu@cygnus.com>, eichin@cygnus.com, jmr@cygnus.com,
krbdev@MIT.EDU, gnu@cygnus.com
In-Reply-To: Your message of "Thu, 19 Jan 1995 11:17:51 +0500."
<9501191617.AA02386@dcl.MIT.EDU>
Date: Sun, 22 Jan 1995 19:24:06 -0800
From: John Gilmore <gnu@cygnus.com>
I've started whacking at a local copy of the krb5 tree to deal with
include file issues.
My strategy is to build include file scaffolding so that we can change
all the libraries and daemons and user programs to #include only the
set of files we want them to use. Then we can actually fix the
scaffolding so each include file defines only the symbols that ought
to be in it.
I have made an include/krb5.h that simply includes every file in
include/krb5 except the few that wouldn't work (widen, narrow, etc).
I changed all #include <krb5/krb5.h>'s to #include "krb5.h", and fixed
the few things that broke (e.g. because prototypes came into scope and
detected existing bugs).
I've gone through the applications removing #include's of all the
other krb5 include files from them. It occurs to me that there may be
three levels of information that we want to put in header files:
krb5.h for user programs that want the API
k5-sys.h for user daemons, etc, that need to know e.g. file locations
k5-int.h for Kerberos libraries, programs, and daemons
The middle category came up when I found that appl/telnet/telnetd/sys_term.c
was using <krb5/osconf.h> to tell it where the LOGIN_PROGRAM is located.
I consider telnet/telnetd to be a user program (as far as Kerberos is
concerned), but it needs some more info than the average user program.
There are probably others like this.
I will keep plugging away, trying things and getting the tree to build
again; this is just a status report. Next step will be to make the
libraries build with a non-slashified set of include files (using
"k5-int.h" and little or nothing else).
Someone can later decide what things are really in the API, and pull
them out of "krb5.h"; meanwhile, k5-int.h will just include krb5.h.
An independent note: the parts of Kerberos that will build on the
Mac/PC also need to avoid including Unix system include files (like
<sys/types.h>). This involves paring down to just the needed set of
includes, and putting those into a config-dependent file (that will
define the needed symbols another way on the Mac and PC).
John