summaryrefslogtreecommitdiff
path: root/gl/unistd.in.h
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2009-09-22 13:46:51 +0200
committerSimon Josefsson <simon@josefsson.org>2009-09-22 13:46:51 +0200
commit93513f2b65a078282c33d8745de7f0bff77e6d1f (patch)
treee5f9f441a15f88417afb5d08dc12d08fe4522779 /gl/unistd.in.h
parent07d787819c9a73288973ab3a1423364f2411d837 (diff)
downloadgnutls-93513f2b65a078282c33d8745de7f0bff77e6d1f.tar.gz
Update gnulib files.
Diffstat (limited to 'gl/unistd.in.h')
-rw-r--r--gl/unistd.in.h44
1 files changed, 39 insertions, 5 deletions
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index c749cbe5e8..6936ad43ad 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -164,8 +164,27 @@ extern int fchownat (int fd, char const *file, uid_t owner, gid_t group, int fla
#endif
+#if @GNULIB_UNLINK@
+# if @REPLACE_UNLINK@
+# undef unlink
+# define unlink rpl_unlink
+extern int unlink (char const *file);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef unlink
+# define unlink(n) \
+ (GL_LINK_WARNING ("unlink is not portable - " \
+ "use gnulib module unlink for portability"), \
+ unlink (n))
+#endif
+
+
#if @GNULIB_UNLINKAT@
-# if !@HAVE_UNLINKAT@
+# if @REPLACE_UNLINKAT@
+# undef unlinkat
+# define unlinkat rpl_unlinkat
+# endif
+# if !@HAVE_UNLINKAT@ || @REPLACE_UNLINKAT@
extern int unlinkat (int fd, char const *file, int flag);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -231,6 +250,10 @@ extern int close (int);
close (f))
#endif
+#if @REPLACE_DUP@
+# define dup rpl_dup
+extern int dup (int);
+#endif
#if @GNULIB_DUP2@
# if @REPLACE_DUP2@
@@ -312,7 +335,6 @@ extern int euidaccess (const char *filename, int mode);
#if @GNULIB_FCHDIR@
# if @REPLACE_FCHDIR@
-
/* Change the process' current working directory to the directory on which
the given file descriptor is open.
Return 0 if successful, otherwise -1 and errno set.
@@ -320,9 +342,6 @@ extern int euidaccess (const char *filename, int mode);
<http://www.opengroup.org/susv3xsh/fchdir.html>. */
extern int fchdir (int /*fd*/);
-# define dup rpl_dup
-extern int dup (int);
-
/* Gnulib internal hooks needed to maintain the fchdir metadata. */
extern int _gl_register_fd (int fd, const char *filename);
extern void _gl_unregister_fd (int fd);
@@ -672,6 +691,21 @@ extern int readlink (const char *file, char *buf, size_t bufsize);
#endif
+#if @GNULIB_RMDIR@
+# if @REPLACE_RMDIR@
+# define rmdir rpl_rmdir
+/* Remove the directory DIR. */
+extern int rmdir (char const *name);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef rmdir
+# define rmdir(n) \
+ (GL_LINK_WARNING ("rmdir is unportable - " \
+ "use gnulib module rmdir for portability"), \
+ rmdir (n))
+#endif
+
+
#if @GNULIB_SLEEP@
/* Pause the execution of the current thread for N seconds.
Returns the number of seconds left to sleep.