X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Funistd.in.h;h=e75b4cdae1b8f22d9d5d6b4e96c4c5a6e3516e37;hb=94b87393b6947b51b2a842cd88820a3cb60d8cd4;hp=500de9ce1878a49398eb2c3d3158e2e1b82ecc10;hpb=b5298eb7a71c5ae0a2320a99dd3965ef8df33648;p=pspp 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 . */ #include +#if @GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@ +/* Get ssize_t. */ +# include +#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 + . */ +# undef write +# define write rpl_write +extern ssize_t write (int fd, const void *buf, size_t count); +#endif + + #ifdef __cplusplus } #endif