diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-06-05 18:09:29 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-06-05 18:09:29 +0100 |
commit | 65c141be411582e64baac599b2901741bcda5305 (patch) | |
tree | e4f67d8adb7911e106a5d4a818f6c65c56ac2b73 /Makefile | |
parent | b2e99d6976f1163e674542c9c9f3a9242ace6ac2 (diff) | |
download | moreutils-65c141be411582e64baac599b2901741bcda5305.tar.gz |
Change how errno values are printed, for portability
Reported and suggested by Pino Toscano: The Hurd does not #define the
EFOO constants as simple integers, but as expressions. This made the
code that generates errnos.h to misinterpret the value, and always print
0 for every error code. We fix this by instead using the EFOO macro in
errnos.h, so that the preprocessor evaluates it correctly. This is the
right thing to do anyway, for every platform.
Thus the table changes from {"EFOO",42} to {"EFOO",EFOO} for each
entry.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -50,7 +50,7 @@ parallel.1: parallel.docbook errno.o: errnos.h errnos.h: echo '#include <errno.h>' > dump.c - $(CC) -E -dD dump.c | awk '/^#define E/ { printf "{\"%s\",%d},\n", $$2, $$3 }' > errnos.h + $(CC) -E -dD dump.c | awk '/^#define E/ { printf "{\"%s\",%s},\n", $$2, $$2 }' > errnos.h rm -f dump.c errno.1: errno.docbook |