ph10 2005/05/24 11:57:10 BST
Modified files:
exim-doc/doc-txt ChangeLog
exim-src/src exim.h
Log:
Remove broken code in exim.h that tried to preserve EX_OK when it was
redefined in unistd.h (IRIX6). It didn't matter because EX_OK is not
used.
Revision Changes Path
1.143 +6 -0 exim/exim-doc/doc-txt/ChangeLog
1.15 +6 -10 exim/exim-src/src/exim.h
Index: ChangeLog
===================================================================
RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -r1.142 -r1.143
--- ChangeLog 24 May 2005 08:28:58 -0000 1.142
+++ ChangeLog 24 May 2005 10:57:10 -0000 1.143
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.142 2005/05/24 08:28:58 tom Exp $
+$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.143 2005/05/24 10:57:10 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -41,6 +41,12 @@
TK/03 Merged latest SRS patch from Miles Wilton.
+PH/05 There's a shambles in IRIX6 - it defines EX_OK in unistd.h which conflicts
+ with the definition in sysexits.h (which is #included earlier).
+ Fortunately, Exim does not actually use EX_OK. The code used to try to
+ preserve the sysexits.h value, by assumimg that macro definitions were
+ scanned for macro replacements. I have been disabused of this notion,
+ so now the code just undefines EX_OK before #including unistd.h.
Exim version 4.51
Index: exim.h
===================================================================
RCS file: /home/cvs/exim/exim-src/src/exim.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- exim.h 23 May 2005 16:58:56 -0000 1.14
+++ exim.h 24 May 2005 10:57:10 -0000 1.15
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/exim.h,v 1.14 2005/05/23 16:58:56 fanf2 Exp $ */
+/* $Cambridge: exim/exim-src/src/exim.h,v 1.15 2005/05/24 10:57:10 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -221,22 +221,18 @@
#include <fcntl.h>
/* There's a shambles in IRIX6 - it defines EX_OK in unistd.h which conflicts
-with the definition in sysexits.h. Arrange to preserve it, even though at
-present Exim doesn't actually use it. */
+with the definition in sysexits.h. Exim does not actually use this macro, so we
+just undefine it. It would be nice to be able to re-instate the definition from
+sysexits.h if there is no definition in unistd.h, but I do not think there is a
+way to do this in C because macro definitions are not scanned for other macros
+at definition time. [The code here used to assume they were, until I was
+disabused of the notion. Luckily, since EX_OK is not used, it didn't matter.] */
#ifdef EX_OK
-#define SAVE_EX_OK EX_OK
#undef EX_OK
#endif
#include <unistd.h>
-
-#ifdef SAVE_EX_OK
-#ifdef EX_OK
-#undef EX_OK
-#endif
-#define EX_OK SAVE_EX_OK
-#endif
#include <utime.h>
#ifndef NO_NET_IF_H