ref: 3f7e54a705c0f7a6e6807285e00167f2af5e3d88
dir: /lib/c/perror.c/
#include <errno.h> #include <stdio.h> #include <string.h> #undef perror void perror(const char *msg) { if (msg && *msg) { fputs(msg, stderr); putc(':', stderr); putc(' ', stderr); } fputs(strerror(errno), stderr); putc('\n', stderr); }