mirror of
https://github.com/fluencelabs/musl
synced 2025-05-22 04:01:34 +00:00
14 lines
199 B
C
14 lines
199 B
C
|
#include "stdio_impl.h"
|
||
|
|
||
|
int getc(FILE *f)
|
||
|
{
|
||
|
int c;
|
||
|
if (f->lock < 0 || !__lockfile(f))
|
||
|
return getc_unlocked(f);
|
||
|
c = getc_unlocked(f);
|
||
|
__unlockfile(f);
|
||
|
return c;
|
||
|
}
|
||
|
|
||
|
weak_alias(getc, _IO_getc);
|