about summary refs log tree commit diff
path: root/io/sys
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-12-19 12:11:38 +0000
committerJakub Jelinek <jakub@redhat.com>2005-12-19 12:11:38 +0000
commit2c6cfe6853a30deb4af842aacc924fa298d0521a (patch)
tree7fcc409e499bb8e3d96522f7fc2393fc10e53db2 /io/sys
parent3ccb96cd41b38d0159bdf8aad229c3599864c65d (diff)
downloadglibc-2c6cfe6853a30deb4af842aacc924fa298d0521a.tar.gz
glibc-2c6cfe6853a30deb4af842aacc924fa298d0521a.tar.xz
glibc-2c6cfe6853a30deb4af842aacc924fa298d0521a.zip
Updated to fedora-glibc-20051219T1003 cvs/fedora-glibc-2_3_90-19
Diffstat (limited to 'io/sys')
-rw-r--r--io/sys/stat.h52
1 files changed, 46 insertions, 6 deletions
diff --git a/io/sys/stat.h b/io/sys/stat.h
index 03152990e7..6ce3a1be66 100644
--- a/io/sys/stat.h
+++ b/io/sys/stat.h
@@ -233,20 +233,23 @@ extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
    Relative path names are interpreted relative to FD unless FD is
    AT_FDCWD.  */
 # ifndef __USE_FILE_OFFSET64
-extern int fstatat (int __fd, __const char *__file, struct stat *__buf,
-		    int __flag) __THROW __nonnull ((2, 3));
+extern int fstatat (int __fd, __const char *__restrict __file,
+		    struct stat *__restrict __buf, int __flag)
+     __THROW __nonnull ((2, 3));
 # else
 #  ifdef __REDIRECT_NTH
-extern int __REDIRECT_NTH (fstatat, (int __fd, __const char *__file,
-				     struct stat *__buf, int __flag),
+extern int __REDIRECT_NTH (fstatat, (int __fd, __const char *__restrict __file,
+				     struct stat *__restrict __buf,
+				     int __flag),
 			   fstatat64) __nonnull ((2, 3));
 #  else
 #   define fstatat fstatat64
 #  endif
 # endif
 
-extern int fstatat64 (int __fd, __const char *__file, struct stat64 *__buf,
-		      int __flag) __THROW __nonnull ((2, 3));
+extern int fstatat64 (int __fd, __const char *__restrict __file,
+		      struct stat64 *__restrict __buf, int __flag)
+     __THROW __nonnull ((2, 3));
 #endif
 
 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
@@ -305,6 +308,14 @@ extern __mode_t getumask (void) __THROW;
 extern int mkdir (__const char *__path, __mode_t __mode)
      __THROW __nonnull ((1));
 
+#ifdef __USE_GNU
+/* Like mkdir, create a new directory with permission bits MODE.  But
+   interpret relative PATH names relative to the directory associated
+   with FD.  */
+extern int mkdirat (int __fd, __const char *__path, __mode_t __mode)
+     __THROW __nonnull ((2));
+#endif
+
 /* Create a device file named PATH, with permission and special bits MODE
    and device number DEV (which can be constructed from major and minor
    device numbers with the `makedev' macro above).  */
@@ -313,10 +324,26 @@ extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev)
      __THROW __nonnull ((1));
 #endif
 
+#ifdef __USE_GNU
+/* Like mknod, create a new device file with permission bits MODE and
+   device number DEV.  But interpret relative PATH names relative to
+   the directory associated with FD.  */
+extern int mknodat (int __fd, __const char *__path, __mode_t __mode,
+		    __dev_t __dev) __THROW __nonnull ((2));
+#endif
+
 
 /* Create a new FIFO named PATH, with permission bits MODE.  */
 extern int mkfifo (__const char *__path, __mode_t __mode)
      __THROW __nonnull ((1));
+
+#ifdef __USE_GNU
+/* Like mkfifo, create a new FIFO with permission bits MODE.  But
+   interpret relative PATH names relative to the directory associated
+   with FD.  */
+extern int mkfifoat (int __fd, __const char *__path, __mode_t __mode)
+     __THROW __nonnull ((2));
+#endif
 
 /* To allow the `struct stat' structure and the file type `mode_t'
    bits to vary without changing shared library major version number,
@@ -388,6 +415,10 @@ extern int __fxstatat64 (int __ver, int __fildes, __const char *__filename,
 extern int __xmknod (int __ver, __const char *__path, __mode_t __mode,
 		     __dev_t *__dev) __THROW __nonnull ((2, 4));
 
+extern int __xmknodat (int __ver, int __fd, __const char *__path,
+		       __mode_t __mode, __dev_t *__dev)
+     __THROW __nonnull ((3, 5));
+
 #if defined __GNUC__ && __GNUC__ >= 2
 /* Inlined versions of the real stat and mknod functions.  */
 
@@ -428,6 +459,15 @@ __NTH (mknod (__const char *__path, __mode_t __mode, __dev_t __dev))
 }
 # endif
 
+# ifdef __USE_GNU
+extern __inline__ int
+__NTH (mknodat (int __fd, __const char *__path, __mode_t __mode,
+		__dev_t __dev))
+{
+  return __xmknodat (_MKNOD_VER, __fd, __path, __mode, &__dev);
+}
+# endif
+
 # if defined __USE_LARGEFILE64 \
   && (! defined __USE_FILE_OFFSET64 \
       || (defined __REDIRECT_NTH && defined __OPTIMIZE__))