mirror of https://git.musl-libc.org/git/musl
3 changed files with 8 additions and 13 deletions
@ -1,10 +1,7 @@ |
|||||
#include "stdio_impl.h" |
#include <stdio.h> |
||||
|
#include "putc.h" |
||||
|
|
||||
int fputc(int c, FILE *f) |
int fputc(int c, FILE *f) |
||||
{ |
{ |
||||
if (f->lock < 0 || !__lockfile(f)) |
return do_putc(c, f); |
||||
return putc_unlocked(c, f); |
|
||||
c = putc_unlocked(c, f); |
|
||||
__unlockfile(f); |
|
||||
return c; |
|
||||
} |
} |
||||
|
|||||
@ -1,12 +1,9 @@ |
|||||
#include "stdio_impl.h" |
#include <stdio.h> |
||||
|
#include "putc.h" |
||||
|
|
||||
int putc(int c, FILE *f) |
int putc(int c, FILE *f) |
||||
{ |
{ |
||||
if (f->lock < 0 || !__lockfile(f)) |
return do_putc(c, f); |
||||
return putc_unlocked(c, f); |
|
||||
c = putc_unlocked(c, f); |
|
||||
__unlockfile(f); |
|
||||
return c; |
|
||||
} |
} |
||||
|
|
||||
weak_alias(putc, _IO_putc); |
weak_alias(putc, _IO_putc); |
||||
|
|||||
@ -1,6 +1,7 @@ |
|||||
#include <stdio.h> |
#include <stdio.h> |
||||
|
#include "putc.h" |
||||
|
|
||||
int putchar(int c) |
int putchar(int c) |
||||
{ |
{ |
||||
return fputc(c, stdout); |
return do_putc(c, stdout); |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue