[krbdev.mit.edu #1431] Re: [krbdev.mit.edu #1432] patch to compile with cygwin

Ken Raeburn via RT rt-comment at krbdev.mit.edu
Wed Apr 23 21:11:03 EDT 2003


"\"\"Christopher B. Liebman\" via RT\"" <rt-comment at krbdev.mit.edu> writes:

> There are two issues that this patch fixes:
>
> 1)  Cygwin implements error as a function that returns an int.  There are
> locations in krb5 that declare errno as "extern int errno" the patch
> includes errno.h instead.  Maybe a better fix is to have configure look to
> see if errno.h exists and include it?

Declaring errno explicitly is just wrong, because any ANSI C platform
is allowed to do this.  (At worst, we could declare it *if* the system
errno.h doesn't; I don't think anything more recent than SunOS 4 fails
to declare it.)  We probably don't lose on UNIX platforms just because
the macro versions -- when there are any -- are syntactically
compatible with use in declarations as well as expression, which is
not required by ANSI C.

We do still have many such declarations in the 1.3 branch.

While we're at it, some of the krb4 code declares errmsg() right along
with errno, but I don't think it exists or is used.

> 2) Cygwin has the same issues as Windows/DOS with renaming a file while it's
> still open.  This patch uses almost exactly the same code to fix this issue
> manifesting in the replay cache code.

Makes sense....

Ken


More information about the krb5-bugs mailing list