[1544] in Kerberos_V5_Development
Re: lib/rpc breaks on non-ANSI compilers
daemon@ATHENA.MIT.EDU (Ken Raeburn)
Mon Aug 12 23:10:49 1996
To: krbdev@MIT.EDU
From: Ken Raeburn <raeburn@cygnus.com>
Date: 12 Aug 1996 23:10:38 -0400
In-Reply-To: "Barry Jaspan"'s message of Mon, 12 Aug 96 20:18:53 -0400
> News flash! It is 1996. All reasonable excuses for using K&R C
> compilers expired years ago. gcc is more portable than Kerberos. I'm
> confident that Windows compilers are all ANSI compliant. Why should
> we expend effort to support obsolete compilers?
I agree.
I've been meaning to complain about some of the "support" for old
compilers as it's done in db2/hash, too. I found constructs like this:
#ifdef __STDC__
int some_fun (narrow1 arg1, narrow2 arg2)
#else
int some_fun (arg1, arg2)
wide1 arg1;
wide2 arg2;
#endif
{ ... }
In other words, it looks like someone tried to be clever about
compatibility and narrow versus widened types, and got it backwards (and
broken in other ways too). With the code above, the calling interface is
dependent on the compiler used for the library, and if an ANSI C compiler
is used, it may not be possible to call the function correctly when using
a non-ANSI compiler.