diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -3,6 +3,7 @@ strerror: strerror.c strerror.h strerror.h: errlist Makefile printf '#ifndef STRERROR_H\n#define STRERROR_H 1\n\n' > $@ - printf 'struct { int number; char *name; } errlist[] = {\n' >> $@ - awk '{printf("#ifdef %s\n\t{ %s,\t\"%s\" },\n#endif\n", $$0, $$0, $$0);}' errlist >> $@ + printf '#include <errno.h>\n\n' >> $@ + printf 'const char *errlist[] = {\n' >> $@ + awk '{printf("#ifdef %s\n\t[%s] = \"%s\",\n#endif\n", $$0, $$0, $$0);}' errlist >> $@ printf '};\n\n#endif\n' >> $@ |
