New module 'write'.
[pspp] / lib / unistd.in.h
index 500de9ce1878a49398eb2c3d3158e2e1b82ecc10..e75b4cdae1b8f22d9d5d6b4e96c4c5a6e3516e37 100644 (file)
 /* 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