perror.c - scc - simple c99 compiler
(HTM) git clone git://git.simple-cc.org/scc
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
perror.c (248B)
---
1 #include <errno.h>
2 #include <stdio.h>
3 #include <string.h>
4
5 #undef perror
6
7 void
8 perror(const char *msg)
9 {
10 if (msg && *msg) {
11 fputs(msg, stderr);
12 putc(':', stderr);
13 putc(' ', stderr);
14 }
15 fputs(strerror(errno), stderr);
16 putc('\n', stderr);
17 }