]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - libio/stdio.h
Add renameat2 function [BZ #17662]
[thirdparty/glibc.git] / libio / stdio.h
index 731f8e56f4c115a1a507b85babaa22b21efb140c..739e08610d54f341cf14247ec38f254e1520e5b1 100644 (file)
@@ -153,6 +153,18 @@ extern int renameat (int __oldfd, const char *__old, int __newfd,
                     const char *__new) __THROW;
 #endif
 
+#ifdef __USE_GNU
+/* Flags for renameat2.  */
+# define RENAME_NOREPLACE (1 << 0)
+# define RENAME_EXCHANGE (1 << 1)
+# define RENAME_WHITEOUT (1 << 2)
+
+/* Rename file OLD relative to OLDFD to NEW relative to NEWFD, with
+   additional flags.  */
+extern int renameat2 (int __oldfd, const char *__old, int __newfd,
+                     const char *__new, unsigned int __flags) __THROW;
+#endif
+
 /* Create a temporary file and open it read/write.
 
    This function is a possible cancellation point and therefore not