diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2010-04-07 21:11:46 -0400 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2010-04-12 21:26:35 -0400 |
commit | 74da141e618ef99959d509cb2e7be35a348a39db (patch) | |
tree | 88ebc38b381a1021fc2d74864a71e230ae591c3d /gl/write.c | |
parent | c63a4f726a0b6ad8cf6040f947754a81fd4683bb (diff) | |
download | monitoring-plugins-74da141e618ef99959d509cb2e7be35a348a39db.tar.gz |
Sync with the latest Gnulib code (177f525)
Signed-off-by: Thomas Guyot-Sionnest <dermoth@aei.ca>
Diffstat (limited to 'gl/write.c')
-rw-r--r-- | gl/write.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* POSIX compatible write() function. | 1 | /* POSIX compatible write() function. |
2 | Copyright (C) 2008 Free Software Foundation, Inc. | 2 | Copyright (C) 2008-2010 Free Software Foundation, Inc. |
3 | Written by Bruno Haible <bruno@clisp.org>, 2008. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2008. |
4 | 4 | ||
5 | This program is free software: you can redistribute it and/or modify | 5 | 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) | |||
46 | if (ret < 0) | 46 | if (ret < 0) |
47 | { | 47 | { |
48 | if (GetLastError () == ERROR_NO_DATA | 48 | if (GetLastError () == ERROR_NO_DATA |
49 | && GetFileType (_get_osfhandle (fd)) == FILE_TYPE_PIPE) | 49 | && GetFileType ((HANDLE) _get_osfhandle (fd)) == FILE_TYPE_PIPE) |
50 | { | 50 | { |
51 | /* Try to raise signal SIGPIPE. */ | 51 | /* Try to raise signal SIGPIPE. */ |
52 | raise (SIGPIPE); | 52 | raise (SIGPIPE); |
53 | /* If it is currently blocked or ignored, change errno from EINVAL | 53 | /* If it is currently blocked or ignored, change errno from EINVAL |
54 | to EPIPE. */ | 54 | to EPIPE. */ |
55 | errno = EPIPE; | 55 | errno = EPIPE; |
56 | } | 56 | } |
57 | } | 57 | } |
58 | return ret; | 58 | return ret; |
59 | } | 59 | } |