123456789101112131415161718192021222324252627282930313233 |
- #include "_stdio.h"
- void perror(register const char *s)
- {
-
- register const char *sep;
- sep = ": ";
- if (!(s && *s)) {
- s = (sep += 2);
- }
- #ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
- fprintf(stderr, "%s%s%m\n", s, sep);
- #else
- {
- char buf[64];
- fprintf(stderr, "%s%s%s\n", s, sep,
- __glibc_strerror_r(errno, buf, sizeof(buf)));
- }
- #endif
- }
- libc_hidden_def(perror)
|