aboutsummaryrefslogtreecommitdiff
path: root/gl/write.c
diff options
context:
space:
mode:
Diffstat (limited to 'gl/write.c')
-rw-r--r--gl/write.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gl/write.c b/gl/write.c
index 250b5cc8..3a98f24f 100644
--- a/gl/write.c
+++ b/gl/write.c
@@ -1,5 +1,5 @@
/* POSIX compatible write() function.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -46,14 +46,14 @@ rpl_write (int fd, const void *buf, size_t count)
if (ret < 0)
{
if (GetLastError () == ERROR_NO_DATA
- && GetFileType (_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;
- }
+ && 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;
}