diff options
Diffstat (limited to 'lib/unistd.in.h')
-rw-r--r-- | lib/unistd.in.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 500de9ce18..e75b4cdae1 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -35,6 +35,11 @@ /* mingw fails to declare _exit in <unistd.h>. */ #include <stdlib.h> +#if @GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@ +/* Get ssize_t. */ +# include <sys/types.h> +#endif + /* The definition of GL_LINK_WARNING is copied here. */ @@ -333,6 +338,16 @@ extern unsigned int sleep (unsigned int n); #endif +#if @GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@ +/* Write up to COUNT bytes starting at BUF to file descriptor FD. + See the POSIX:2001 specification + <http://www.opengroup.org/susv3xsh/write.html>. */ +# undef write +# define write rpl_write +extern ssize_t write (int fd, const void *buf, size_t count); +#endif + + #ifdef __cplusplus } #endif |