diff options
author | Denys Vlasenko | 2016-08-22 19:54:12 +0200 |
---|---|---|
committer | Denys Vlasenko | 2016-08-22 19:54:12 +0200 |
commit | aa3576a29b9619f4e1c1b131f5db53ad2bc2cb00 (patch) | |
tree | 9dba84b07e8dda7f82a8dba84299bab21e6b9fd2 /include | |
parent | d8e61bbf13d0cf38d477255cfd5dc71c5d51d575 (diff) | |
download | busybox-aa3576a29b9619f4e1c1b131f5db53ad2bc2cb00.zip busybox-aa3576a29b9619f4e1c1b131f5db53ad2bc2cb00.tar.gz |
hush: fix "redirects can close script fd" bug
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/include/libbb.h b/include/libbb.h index e39021e..b2e4299 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -185,24 +185,32 @@ int klogctl(int type, char *b, int len); /* Busybox does not use threads, we can speed up stdio. */ #ifdef HAVE_UNLOCKED_STDIO # undef getc -# define getc(stream) getc_unlocked(stream) +# define getc(stream) getc_unlocked(stream) # undef getchar -# define getchar() getchar_unlocked() +# define getchar() getchar_unlocked() # undef putc -# define putc(c, stream) putc_unlocked(c, stream) +# define putc(c,stream) putc_unlocked(c,stream) # undef putchar -# define putchar(c) putchar_unlocked(c) +# define putchar(c) putchar_unlocked(c) # undef fgetc -# define fgetc(stream) getc_unlocked(stream) +# define fgetc(stream) getc_unlocked(stream) # undef fputc -# define fputc(c, stream) putc_unlocked(c, stream) +# define fputc(c,stream) putc_unlocked(c,stream) #endif /* Above functions are required by POSIX.1-2008, below ones are extensions */ #ifdef HAVE_UNLOCKED_LINE_OPS # undef fgets -# define fgets(s, n, stream) fgets_unlocked(s, n, stream) +# define fgets(s,n,stream) fgets_unlocked(s,n,stream) # undef fputs -# define fputs(s, stream) fputs_unlocked(s, stream) +# define fputs(s,stream) fputs_unlocked(s,stream) +# undef fflush +# define fflush(stream) fflush_unlocked(stream) +# undef feof +# define feof(stream) feof_unlocked(stream) +# undef ferror +# define ferror(stream) ferror_unlocked(stream) +# undef fileno +# define fileno(stream) fileno_unlocked(stream) #endif |