* added compilers lcc and bcc (linux86)
[mascara-docs.git] / compilers / linux86-0.16.17 / libc / error / perror.c
blobf9b09656465e550d018d29c4bf5a48900f8ee2d2
2 #include <errno.h>
4 void
5 perror(str)
6 __const char * str;
8 register char * ptr;
9 if(str)
11 write(2, str, strlen(str));
12 write(2, ": ", 2);
14 else write(2, "perror: ", 8);
16 ptr = strerror(errno);
17 write(2, ptr, strlen(ptr));
18 write(2, "\n", 1);