summaryrefslogtreecommitdiff
path: root/sys/src/ape/lib/ap/stdio/perror.c
blob: 71f5c41f00bf1a65c7c8bdce2201b662b2906ef4 (plain)
1
2
3
4
5
6
7
8
9
10
11
/*
 * pANS stdio -- perror
 */
#include "iolib.h"
void perror(const char *s){
	extern int errno;
	if(s!=NULL && *s != '\0') fputs(s, stderr), fputs(": ", stderr);
	fputs(strerror(errno), stderr);
	putc('\n', stderr);
	fflush(stderr);
}