summaryrefslogtreecommitdiff
path: root/lib/stdio-write.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stdio-write.c')
-rw-r--r--lib/stdio-write.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/stdio-write.c b/lib/stdio-write.c
index 15cc5ed742..04fcfe62bf 100644
--- a/lib/stdio-write.c
+++ b/lib/stdio-write.c
@@ -39,27 +39,27 @@
# include <windows.h>
# define CALL_WITH_SIGPIPE_EMULATION(RETTYPE, EXPRESSION, FAILED) \
- if (ferror (stream)) \
- return (EXPRESSION); \
- else \
- { \
- RETTYPE ret; \
- SetLastError (0); \
- ret = (EXPRESSION); \
+ if (ferror (stream)) \
+ return (EXPRESSION); \
+ else \
+ { \
+ RETTYPE ret; \
+ SetLastError (0); \
+ ret = (EXPRESSION); \
if (FAILED && GetLastError () == ERROR_NO_DATA && ferror (stream)) \
- { \
- int fd = fileno (stream); \
- if (fd >= 0 \
- && GetFileType ((HANDLE) _get_osfhandle (fd)) == FILE_TYPE_PIPE)\
- { \
- /* Try to raise signal SIGPIPE. */ \
- raise (SIGPIPE); \
- /* If it is currently blocked or ignored, change errno from \
- EINVAL to EPIPE. */ \
- errno = EPIPE; \
- } \
- } \
- return ret; \
+ { \
+ int fd = fileno (stream); \
+ if (fd >= 0 \
+ && GetFileType ((HANDLE) _get_osfhandle (fd)) == FILE_TYPE_PIPE)\
+ { \
+ /* Try to raise signal SIGPIPE. */ \
+ raise (SIGPIPE); \
+ /* If it is currently blocked or ignored, change errno from \
+ EINVAL to EPIPE. */ \
+ errno = EPIPE; \
+ } \
+ } \
+ return ret; \
}
# if !REPLACE_PRINTF_POSIX /* avoid collision with printf.c */