diff options
author | Marc Espie <espie@cvs.openbsd.org> | 1999-05-26 13:38:57 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 1999-05-26 13:38:57 +0000 |
commit | 0126e157b87f137fc08dc7f46f6c291b9d06ac5d (patch) | |
tree | f8555e3e504eb82b4cd3cba5cec20ae4ce8124ff /gnu/egcs/libio/ioperror.c | |
parent | ff8e9a4356e55ed142306c3a375fa280800abc86 (diff) |
egcs projects compiler system
Exact copy of the snapshot, except for the removal of
texinfo/
gcc/ch/
libchill/
Diffstat (limited to 'gnu/egcs/libio/ioperror.c')
-rw-r--r-- | gnu/egcs/libio/ioperror.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gnu/egcs/libio/ioperror.c b/gnu/egcs/libio/ioperror.c new file mode 100644 index 00000000000..7ca72b0bb60 --- /dev/null +++ b/gnu/egcs/libio/ioperror.c @@ -0,0 +1,22 @@ +#include "libioP.h" +#include <errno.h> +#include <string.h> +#ifndef errno +extern int errno; +#endif + +#ifndef _IO_strerror +extern char* _IO_strerror __P((int)); +#endif + +void +_IO_perror (s) + const char *s; +{ + char *error = _IO_strerror (errno); + + if (s != NULL && *s != '\0') + _IO_fprintf (_IO_stderr, "%s:", s); + + _IO_fprintf (_IO_stderr, "%s\n", error ? error : ""); +} |