forked from Vhex-Kernel-Core/fxlibc
16 lines
239 B
C
16 lines
239 B
C
|
#include <stdio.h>
|
||
|
#include <errno.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
void perror(char const *s)
|
||
|
{
|
||
|
int errno_copy = errno;
|
||
|
|
||
|
if(s != NULL) {
|
||
|
fputs(s, stderr);
|
||
|
fputs(": ", stderr);
|
||
|
}
|
||
|
fputs(strerror(errno_copy), stderr);
|
||
|
fputc('\n', stderr);
|
||
|
}
|