mirror of
https://github.com/sheumann/hush.git
synced 2024-09-12 00:55:11 +00:00
libbb.h: tweak _unlocked hack
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
0e79e7bb42
commit
0c4cf42c1e
@ -160,42 +160,24 @@ int sysinfo(struct sysinfo* info);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Busybox does not use threads, we can speed up stdio.
|
/* Busybox does not use threads, we can speed up stdio. */
|
||||||
* But don't define foo to foo_unlocked if foo_unlocked
|
|
||||||
* is a macro (it might be defined back to foo!).
|
|
||||||
*/
|
|
||||||
#ifndef getc_unlocked
|
|
||||||
#undef getc
|
#undef getc
|
||||||
#define getc(stream) getc_unlocked(stream)
|
#define getc(stream) getc_unlocked(stream)
|
||||||
#endif
|
|
||||||
#ifndef getchar_unlocked
|
|
||||||
#undef getchar
|
#undef getchar
|
||||||
#define getchar() getchar_unlocked()
|
#define getchar() getchar_unlocked()
|
||||||
#endif
|
|
||||||
#ifndef putc_unlocked
|
|
||||||
#undef putc
|
#undef putc
|
||||||
#define putc(c, stream) putc_unlocked(c, stream)
|
#define putc(c, stream) putc_unlocked(c, stream)
|
||||||
#endif
|
|
||||||
#ifndef putchar_unlocked
|
|
||||||
#undef putchar
|
#undef putchar
|
||||||
#define putchar(c) putchar_unlocked(c)
|
#define putchar(c) putchar_unlocked(c)
|
||||||
#endif
|
|
||||||
#ifndef fgetc_unlocked
|
|
||||||
#undef fgetc
|
#undef fgetc
|
||||||
# define fgetc(stream) fgetc_unlocked(stream)
|
#define fgetc(stream) getc_unlocked(stream)
|
||||||
#endif
|
|
||||||
#ifndef fputc_unlocked
|
|
||||||
#undef fputc
|
#undef fputc
|
||||||
# define fputc(c, stream) fputc_unlocked(c, stream)
|
#define fputc(c, stream) putc_unlocked(c, stream)
|
||||||
#endif
|
/* Above functions are required by POSIX.1-2008, below ones are extensions */
|
||||||
#ifndef fgets_unlocked
|
|
||||||
#undef fgets
|
#undef fgets
|
||||||
#define fgets(s, n, stream) fgets_unlocked(s, n, stream)
|
#define fgets(s, n, stream) fgets_unlocked(s, n, stream)
|
||||||
#endif
|
|
||||||
#ifndef fputs_unlocked
|
|
||||||
#undef fputs
|
#undef fputs
|
||||||
#define fputs(s, stream) fputs_unlocked(s, stream)
|
#define fputs(s, stream) fputs_unlocked(s, stream)
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Make all declarations hidden (-fvisibility flag only affects definitions) */
|
/* Make all declarations hidden (-fvisibility flag only affects definitions) */
|
||||||
|
Loading…
Reference in New Issue
Block a user