[1568] in Kerberos_V5_Development
Re: lib/rpc breaks on non-ANSI compilers
daemon@ATHENA.MIT.EDU (Theodore Y. Ts'o)
Tue Aug 13 21:38:37 1996
Date: Tue, 13 Aug 1996 21:38:27 -0400
From: "Theodore Y. Ts'o" <tytso@MIT.EDU>
To: Ken Raeburn <raeburn@cygnus.com>
Cc: krbdev@MIT.EDU
In-Reply-To: Ken Raeburn's message of 12 Aug 1996 23:10:38 -0400,
<tx1g25sou6p.fsf@cygnus.com>
From: Ken Raeburn <raeburn@cygnus.com>
Date: 12 Aug 1996 23:10:38 -0400
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.
You or Marc should send flame-mail^H^H^H^H^H^H^H^H^H a bug report to
Margo about this; fixing it in our tree is reasonable, but only if we
make sure these changes get propagated back to the berk-db maintainers.
- Ted