summaryrefslogtreecommitdiff
path: root/include/sys
diff options
context:
space:
mode:
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/stat.h61
-rw-r--r--include/sys/statfs.h8
-rw-r--r--include/sys/wait.h13
3 files changed, 64 insertions, 18 deletions
diff --git a/include/sys/stat.h b/include/sys/stat.h
index 1f758d30c..b3dbe4f92 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1992,1995-2002,2003,2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1995-2004,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -211,11 +211,11 @@ extern int stat (__const char *__restrict __file,
that file descriptor FD is open on and put them in BUF. */
extern int fstat (int __fd, struct stat *__buf) __THROW __nonnull ((2));
#else
-# ifdef __REDIRECT
-extern int __REDIRECT (stat, (__const char *__restrict __file,
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (stat, (__const char *__restrict __file,
struct stat *__restrict __buf), stat64)
__nonnull ((1, 2));
-extern int __REDIRECT (fstat, (int __fd, struct stat *__buf), fstat64)
+extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), fstat64)
__nonnull ((2));
# else
# define stat stat64
@@ -228,6 +228,27 @@ extern int stat64 (__const char *__restrict __file,
extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
#endif
+#if 0 /*def __USE_GNU*/
+/* Similar to stat, get the attributes for FILE and put them in BUF.
+ 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));
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (fstatat, (int __fd, __const char *__file,
+ struct stat *__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));
+#endif
+
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
# ifndef __USE_FILE_OFFSET64
/* Get file attributes about FILE and put them in BUF.
@@ -235,8 +256,8 @@ extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
extern int lstat (__const char *__restrict __file,
struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
# else
-# ifdef __REDIRECT
-extern int __REDIRECT (lstat,
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (lstat,
(__const char *__restrict __file,
struct stat *__restrict __buf), lstat64)
__nonnull ((1, 2));
@@ -256,7 +277,7 @@ extern int lstat64 (__const char *__restrict __file,
extern int chmod (__const char *__file, __mode_t __mode)
__THROW __nonnull ((1));
-#if 0 /* def __USE_BSD */
+#if 0 /*def __USE_BSD*/
/* Set file access permissions for FILE to MODE.
If FILE is a symbolic link, this affects the link itself
rather than its target. */
@@ -274,7 +295,7 @@ extern int fchmod (int __fd, __mode_t __mode) __THROW;
and return the old creation mask. */
extern __mode_t umask (__mode_t __mask) __THROW;
-#ifdef __USE_GNU
+#if 0 /*def __USE_GNU*/
/* Get the current `umask' value without changing it.
This function is only available under the GNU Hurd. */
extern __mode_t getumask (void) __THROW;
@@ -284,6 +305,14 @@ extern __mode_t getumask (void) __THROW;
extern int mkdir (__const char *__path, __mode_t __mode)
__THROW __nonnull ((1));
+#if 0 /*def __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). */
@@ -292,11 +321,27 @@ extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev)
__THROW __nonnull ((1));
#endif
+#if 0 /*def __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));
+#if 0 /*def __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
+
__END_DECLS
diff --git a/include/sys/statfs.h b/include/sys/statfs.h
index 2ac877245..3b2226b41 100644
--- a/include/sys/statfs.h
+++ b/include/sys/statfs.h
@@ -32,8 +32,8 @@ __BEGIN_DECLS
extern int statfs (__const char *__file, struct statfs *__buf)
__THROW __nonnull ((1, 2));
#else
-# ifdef __REDIRECT
-extern int __REDIRECT (statfs,
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (statfs,
(__const char *__file, struct statfs *__buf),
statfs64) __nonnull ((1, 2));
# else
@@ -51,8 +51,8 @@ extern int statfs64 (__const char *__file, struct statfs64 *__buf)
extern int fstatfs (int __fildes, struct statfs *__buf)
__THROW __nonnull ((2));
#else
-# ifdef __REDIRECT
-extern int __REDIRECT (fstatfs, (int __fildes, struct statfs *__buf),
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (fstatfs, (int __fildes, struct statfs *__buf),
fstatfs64) __nonnull ((2));
# else
# define fstatfs fstatfs64
diff --git a/include/sys/wait.h b/include/sys/wait.h
index ec53808db..81a54fc3d 100644
--- a/include/sys/wait.h
+++ b/include/sys/wait.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991-1994,1996-2001,2003,2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1994,1996-2001,2003,2004,2005
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -42,11 +43,11 @@ __BEGIN_DECLS
as well as POSIX.1 use of `int' for the status word. */
# if defined __GNUC__ && !defined __cplusplus
-# define __WAIT_INT(status) \
- (__extension__ ({ union { __typeof(status) __in; int __i; } __u; \
- __u.__in = (status); __u.__i; }))
+# define __WAIT_INT(status) \
+ (__extension__ (((union { __typeof(status) __in; int __i; }) \
+ { .__in = (status) }).__i))
# else
-# define __WAIT_INT(status) (*(int *) &(status))
+# define __WAIT_INT(status) (*(__const int *) &(status))
# endif
/* This is the type of the argument to `wait'. The funky union
@@ -84,7 +85,7 @@ typedef union
# define WIFEXITED(status) __WIFEXITED(__WAIT_INT(status))
# define WIFSIGNALED(status) __WIFSIGNALED(__WAIT_INT(status))
# define WIFSTOPPED(status) __WIFSTOPPED(__WAIT_INT(status))
-# if 0 /* def __WIFCONTINUED */
+# if 0 /*def __WIFCONTINUED*/
# define WIFCONTINUED(status) __WIFCONTINUED(__WAIT_INT(status))
# endif
#endif /* <stdlib.h> not included. */