diff options
| author | Ron Yorston <rmy@pobox.com> | 2021-01-25 13:57:08 +0000 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2021-01-25 14:15:02 +0000 |
| commit | eb0c2bbbaf0722103124a589e3dfe952c2664cbb (patch) | |
| tree | 3ae3ec89bd7a6041ed5aed1d537f6b2fb3586ed7 /coreutils/printf.c | |
| parent | 6422b0ef38d0835c86b40e6e642f18cdfb933e85 (diff) | |
| download | busybox-w32-eb0c2bbbaf0722103124a589e3dfe952c2664cbb.tar.gz busybox-w32-eb0c2bbbaf0722103124a589e3dfe952c2664cbb.tar.bz2 busybox-w32-eb0c2bbbaf0722103124a589e3dfe952c2664cbb.zip | |
tls: avoid unnecessary changes to POSIX build, part 2
On reflection, the previous commit may have been ill-advised. There
are many calls to open_read_close() and most shouldn't be able to
access special devices. (Though in practice only a few are enabled
in busybox-w32.)
Nonetheless, I've implemented a new mechanism which uses the macro
MINGW_SPECIAL() to mark calls to functions that are allowed to
access special devices.
An unrelated change is to avoid compiling fputs_stdout() in
coreutils/printf.c for the POSIX build.
Diffstat (limited to 'coreutils/printf.c')
| -rw-r--r-- | coreutils/printf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/coreutils/printf.c b/coreutils/printf.c index aabc51e0d..d1d22f39c 100644 --- a/coreutils/printf.c +++ b/coreutils/printf.c | |||
| @@ -151,10 +151,12 @@ static double my_xstrtod(const char *arg) | |||
| 151 | return result; | 151 | return result; |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | #if ENABLE_PLATFORM_MINGW32 | ||
| 154 | static int fputs_stdout(const char *s) | 155 | static int fputs_stdout(const char *s) |
| 155 | { | 156 | { |
| 156 | return fputs(s, stdout); | 157 | return fputs(s, stdout); |
| 157 | } | 158 | } |
| 159 | #endif | ||
| 158 | 160 | ||
| 159 | /* Handles %b; return 1 if output is to be short-circuited by \c */ | 161 | /* Handles %b; return 1 if output is to be short-circuited by \c */ |
| 160 | static int print_esc_string(const char *str) | 162 | static int print_esc_string(const char *str) |
