summaryrefslogtreecommitdiff
path: root/gl/unistd.in.h
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-10-08 13:41:12 +0200
committerSimon Josefsson <simon@josefsson.org>2008-10-08 13:41:12 +0200
commitabb7c6713d455ad9f785bbbe3f482779c824bffa (patch)
tree779592382bc3488f7a05bc4402dbf8b132c02bb3 /gl/unistd.in.h
parent4bcd479c96ccd4ee7994ca81cb28b2fc41a80d28 (diff)
downloadlibtasn1-abb7c6713d455ad9f785bbbe3f482779c824bffa.tar.gz
libtasn1-abb7c6713d455ad9f785bbbe3f482779c824bffa.tar.bz2
libtasn1-abb7c6713d455ad9f785bbbe3f482779c824bffa.zip
Update gnulib files.
Diffstat (limited to 'gl/unistd.in.h')
-rw-r--r--gl/unistd.in.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index 8f0acf6..d2fdc21 100644
--- a/gl/unistd.in.h
+++ b/gl/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. */
@@ -135,6 +140,23 @@ extern int dup2 (int, int);
#endif
+#if @GNULIB_FSYNC@
+/* Synchronize changes to a file.
+ Return 0 if successful, otherwise -1 and errno set.
+ See POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/fsync.html>. */
+# if !@HAVE_FSYNC@
+extern int fsync (int fd);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fsync
+# define fsync(fd) \
+ (GL_LINK_WARNING ("fsync is unportable - " \
+ "use gnulib module fsync for portability"), \
+ fsync (fd))
+#endif
+
+
#if @GNULIB_FTRUNCATE@
# if !@HAVE_FTRUNCATE@
/* Change the size of the file to which FD is opened to become equal to LENGTH.
@@ -179,6 +201,20 @@ extern char * getcwd (char *buf, size_t size);
#endif
+#if @GNULIB_GETDTABLESIZE@
+# if !@HAVE_GETDTABLESIZE@
+/* Return the maximum number of file descriptors in the current process. */
+extern int getdtablesize (void);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getdtablesize
+# define getdtablesize() \
+ (GL_LINK_WARNING ("getdtablesize is unportable - " \
+ "use gnulib module getdtablesize for portability"), \
+ getdtablesize ())
+#endif
+
+
#if @GNULIB_GETLOGIN_R@
/* Copies the user's login name to NAME.
The array pointed to by NAME has room for SIZE bytes.
@@ -333,6 +369,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