[1349] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

Re: krb5b4pl3: problems with "const" configuration and usage

daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Mon Apr 24 16:05:16 1995

From: "Jonathan I. Kamens" <jik@cam.ov.com>
Date: Mon, 24 Apr 1995 16:08:47 -0400
To: tytso@MIT.EDU
Cc: krb5-bugs@MIT.EDU
In-Reply-To: <9504241746.AA06535@dcl.MIT.EDU> (tytso@MIT.EDU)

   Date: Mon, 24 Apr 1995 13:46:07 +0500
   From: "Theodore Ts'o" <tytso@MIT.EDU>

   Actually, you only need to use the CONST hack in krb5.h (and associated
   include files which are included in krb5.h); you don't actually need to
   do that in the rest of the source tree.  

True.

   What I'd actually suggest using a name like KRB5_CONST, and document
   that on systems which are explicitly non-ANSI conformat, they should
   "#define KRB5_CONST" to define away the "consts" in krb5.h.  In general,
   I think it's better to assume that you have an ANSI compiler, instead of
   the other way around.

Both of these ideas are reasonable.  I.e., it's a good idea to use
KRB5_CONST instead of CONST, to avoid conflicts with other usages of
CONST, and it's also reasonable to tell people to define KRB5_CONST
before including krb5 header files (and to have the header files to
define KRB5_CONST to const only if it isn't already defined) if they
have a non-ANSI compiler.

   Aside from Ultrix, are there *that* many operating systems that have
   non-ANSI compilers?

I believe that the default compilers shipped with both SunOS 4.1.3 and
HP-UX both are non-ANSI.  I realize that SunOS 4.1 is no longer
recommended by Sun, but people will probably still be using it in
pretty large numbers a decade from now.

I realize that gcc is available for both of those platforms, but you
shouldn't assume that people will get and install gcc in order to
install Kerberos.  Furthermore, on HP-UX at least, gcc can't be used
to compile Kerberos because gcc 2.6.3 and previous versions don't
handle HP-UX structure-returning conventions properly (so dbm can't be
used).

  jik

home help back first fref pref prev next nref lref last post