[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
EX_OK collision
From: |
Bruno Haible |
Subject: |
EX_OK collision |
Date: |
Sun, 25 Mar 2007 22:22:50 +0200 |
User-agent: |
KMail/1.5.4 |
Warning seen on IRIX 6.5:
"///usr/include/unistd.h", line 43: warning(1047): macro redefined differently
IRIX 6.5 has two definitions of EX_OK:
- one in <unistd.h>, protected with "#if _SGIAPI", as a flag that can be
passed to the access() function, with value 020,
- one in <sysexits.h>, always active, as an exit code, with value 0.
Which definition is active, thus depends on the order of inclusion.
What should we do?
(a) Do nothing.
(b) Create a replacement <sysexits.h> that does
#include <unistd.h>
#undef EX_OK
#include </usr/include/sysexits.h>
(c) Create a replacement <unistd.h> that does
#include </usr/include/unistd.h>
#undef EX_OK
and a replacement <sysexits.h> that does
#include <unistd.h>
#include </usr/include/sysexits.h>
Which of the three is best? Why?
Bruno
- EX_OK collision,
Bruno Haible <=