[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
manor |
Date: |
Sun, 13 Jul 1997 12:08:46 -0700 |
While building Swarm on Linux (Slackware) I built tcl7.5 and noticed an
interesting incompatibility between the two (at least on my Linux release):
Whereas in Slackware '96 <asm/errno.h> I found the following:
#define EDEADLOCK EDEADLK
in tcl7.5/generic/tclPosix.c this code was present:
#if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK != EWOULDBLOCK))
case EDEADLK: return "EDEADLK";
#endif
#ifdef EDEADLOCK
case EDEADLOCK: return "EDEADLOCK";
#endif
As well the following similar lines:
#if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK != EWOULDBLOCK))
case EDEADLK: return "resource deadlock avoided";
#endif
#ifdef EDEADLOCK
case EDEADLOCK: return "resource deadlock avoided";
#endif
Which cause a compilation error because the enclosing switch statement has
two cases with the same value (due to the #define in errno.h).
Now, what I'm wondering is this: who violated his/her contract? The author
of errno.h (for amalgamating two distinct error messages) or the author of
tclPosix.c (for assuming distinct values for all the error codes)?
Regards,
Manor.
PS. I found the following comments about the intended meaning of these two
distinct error codes in the errno.h on my Irix machine:
#define EDEADLK 45 /* Resource deadlock avoided */
#define EDEADLOCK 56 /* file locking deadlock error */
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
==================================
[Prev in Thread] |
Current Thread |
[Next in Thread] |