2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2024-12-28 23:15:33 +08:00
gcc/libio/ioperror.c
Ulrich Drepper e693cc28bb Uli's libio/libstdc++ patches.
From-SVN: r15486
1997-09-16 10:01:55 -06:00

23 lines
377 B
C

#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 : "");
}