aboutsummaryrefslogtreecommitdiff
path: root/src/stdio/ferror.c
blob: 28414ee852c364e3b297dae2cd8af79ac90644a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "stdio_impl.h"

#undef ferror

int ferror(FILE *f)
{
	FLOCK(f);
	int ret = !!(f->flags & F_ERR);
	FUNLOCK(f);
	return ret;
}

weak_alias(ferror, ferror_unlocked);
weak_alias(ferror, _IO_ferror_unlocked);


#ifdef TEST
int
main(void) {
	return 0;
}
#endif