1 2 3 4 5 6 7 8 9 10 11 12
/* * perror.c */ #include <errno.h> #include <stdio.h> #include <string.h> void perror(const char *s) { fprintf(stderr, "%s: error %d\n", s, errno); }