musl/src/stdio/fgetc.c

14 lines
197 B
C
Raw Normal View History

2011-02-12 00:22:29 -05:00
#include "stdio_impl.h"
int fgetc(FILE *f)
{
int c;
if (f->lock < 0 || !__lockfile(f))
return getc_unlocked(f);
c = getc_unlocked(f);
__unlockfile(f);
2011-02-12 00:22:29 -05:00
return c;
}
weak_alias(fgetc, getc);