-
Type:
Improvement
-
Resolution: Won't Fix
-
Priority:
Trivial - P5
-
None
-
Affects Version/s: None
-
Component/s: Internal Code
-
None
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
strerror(EINTR) gives us "Interrupted system call", but sometimes we really want "EINTR".
This is how the `errno` tool (from moreutils) generates the list of errno values.
They use $(CC) to scrape <errno.h> to generate their own header table.
The -dD flag is a debug switch to make gcc retain macro definitions in the -E source.
errnos.h:
echo "#include <errno.h>" > dump.c ; gcc -E -dD dump.c | awk '/^#define E/ { printf "{\"%s\",%s},\n", $2, $2 }'