summaryrefslogtreecommitdiff
path: root/lib/gl/stdio.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gl/stdio.in.h')
-rw-r--r--lib/gl/stdio.in.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/gl/stdio.in.h b/lib/gl/stdio.in.h
index 08a44b4ed8..384010a456 100644
--- a/lib/gl/stdio.in.h
+++ b/lib/gl/stdio.in.h
@@ -444,6 +444,22 @@ extern int rename (const char *old, const char *new);
rename (o, n))
#endif
+#if @GNULIB_RENAMEAT@
+# if @REPLACE_RENAMEAT@
+# undef renameat
+# define renameat rpl_renameat
+# endif
+# if !@HAVE_RENAMEAT@ || @REPLACE_RENAMEAT@
+extern int renameat (int fd1, char const *file1, int fd2, char const *file2);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef renameat
+# define renameat(d1,f1,d2,f2) \
+ (GL_LINK_WARNING ("renameat is not portable - " \
+ "use gnulib module renameat for portability"), \
+ renameat (d1, f1, d2, f2))
+#endif
+
#if @GNULIB_SNPRINTF@
# if @REPLACE_SNPRINTF@
# define snprintf rpl_snprintf