summaryrefslogtreecommitdiff
path: root/sys/src/ape/lib/ap/stdio/perror.c
blob: 19a078b39b74f1d790417bb258815e5cdd6d9764 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/*
 * pANS stdio -- perror
 */
#include "iolib.h"
#include <errno.h>

void perror(const char *s){
	if(s!=NULL && *s != '\0') fputs(s, stderr), fputs(": ", stderr);
	fputs(strerror(errno), stderr);
	putc('\n', stderr);
	fflush(stderr);
}