4 #include "stdio_impl.h"
6 void perror(const char *msg)
9 if (msg) fprintf(stderr, "%s: %m\n", msg, strerror(errno));
10 else fprintf(stderr, "%m\n");
13 char *errstr = strerror(errno);
18 __fwritex(msg, strlen(msg), f);
19 __putc_unlocked(':', f);
20 __putc_unlocked(' ', f);
22 __fwritex(errstr, strlen(errstr), f);
23 __putc_unlocked('\n', f);