diff options
Diffstat (limited to 'io')
-rw-r--r-- | io/ftw.h | 16 | ||||
-rw-r--r-- | io/sys/stat.h | 60 | ||||
-rw-r--r-- | io/sys/statfs.h | 16 | ||||
-rw-r--r-- | io/sys/statvfs.h | 17 |
4 files changed, 72 insertions, 37 deletions
diff --git a/io/ftw.h b/io/ftw.h index b7417fc70c..bf0c7c885e 100644 --- a/io/ftw.h +++ b/io/ftw.h @@ -109,8 +109,12 @@ typedef int (*__nftw64_func_t) __P ((__const char *__filename, extern int ftw __P ((__const char *__dir, __ftw_func_t __func, int __descriptors)); #else -extern int ftw __P ((__const char *__dir, __ftw_func_t __func, - int __descriptors)) __asm__ ("ftw64"); +# ifdef __REDIRECT +extern int __REDIRECT (ftw, __P ((__const char *__dir, __ftw_func_t __func, + int __descriptors)), ftw64); +# else +# define nftw nftw64 +# endif #endif #ifdef __USE_LARGEFILE64 extern int ftw64 __P ((__const char *__dir, __ftw64_func_t __func, @@ -124,8 +128,12 @@ extern int ftw64 __P ((__const char *__dir, __ftw64_func_t __func, extern int nftw __P ((__const char *__dir, __nftw_func_t __func, int __descriptors, int __flag)); # else -extern int nftw __P ((__const char *__dir, __nftw_func_t __func, - int __descriptors, int __flag)) __asm__ ("nftw64"); +# ifdef __REDIRECT +extern int __REDIRECT (nftw, __P ((__const char *__dir, __nftw_func_t __func, + int __descriptors, int __flag)), nftw64); +# else +# define nftw nftw64 +# endif # endif # ifdef __USE_LARGEFILE64 extern int nftw64 __P ((__const char *__dir, __nftw64_func_t __func, diff --git a/io/sys/stat.h b/io/sys/stat.h index 944c436d8c..b31097a52f 100644 --- a/io/sys/stat.h +++ b/io/sys/stat.h @@ -173,37 +173,42 @@ __BEGIN_DECLS /* Get file attributes for FILE and put them in BUF. */ extern int __stat __P ((__const char *__file, struct stat *__buf)); -#ifndef __USE_FILE_OFFSET64 -extern int stat __P ((__const char *__file, struct stat *__buf)); -#else -extern int stat __P ((__const char *__file, struct stat *__buf)) - __asm__ ("stat64"); -#endif -#ifdef __USE_LARGEFILE64 -extern int stat64 __P ((__const char *__file, struct stat64 *__buf)); -#endif - /* Get file attributes for the file, device, pipe, or socket that file descriptor FD is open on and put them in BUF. */ extern int __fstat __P ((int __fd, struct stat *__buf)); +/* Get file attributes about FILE and put them in BUF. + If FILE is a symbolic link, do not follow it. */ +extern int __lstat __P ((__const char *__file, struct stat *__buf)); + + #ifndef __USE_FILE_OFFSET64 +extern int stat __P ((__const char *__file, struct stat *__buf)); extern int fstat __P ((int __fd, struct stat *__buf)); #else -extern int fstat __P ((int __fd, struct stat *__buf)) __asm__ ("fstat64"); +# ifdef __REDIRECT +extern int __REDIRECT (stat, __P ((__const char *__file, struct stat *__buf)), + stat64); +extern int __REDIRECT (fstat, __P ((int __fd, struct stat *__buf)), fstat64); +# else +# define stat stat64 +# define fstat fstat64 +# endif #endif #ifdef __USE_LARGEFILE64 +extern int stat64 __P ((__const char *__file, struct stat64 *__buf)); extern int fstat64 __P ((int __fd, struct stat64 *__buf)); #endif -/* Get file attributes about FILE and put them in BUF. - If FILE is a symbolic link, do not follow it. */ -extern int __lstat __P ((__const char *__file, struct stat *__buf)); #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED # ifndef __USE_FILE_OFFSET64 extern int lstat __P ((__const char *__file, struct stat *__buf)); # else -extern int lstat __P ((__const char *__file, struct stat *__buf)) - __asm__ ("lstat64"); +# ifdef __REDIRECT +extern int __REDIRECT (lstat, __P ((__const char *__file, struct stat *__buf)), + lstat64); +# else +# define lstat lstat64 +# endif # endif # ifdef __USE_LARGEFILE64 extern int lstat64 __P ((__const char *__file, struct stat64 *__buf)); @@ -283,16 +288,21 @@ extern int __xstat __P ((int __ver, __const char *__filename, extern int __lxstat __P ((int __ver, __const char *__filename, struct stat *__stat_buf)); #else -extern int __fxstat __P ((int __ver, int __fildes, - struct stat *__stat_buf)) - __asm__ ("__fxstat64"); -extern int __xstat __P ((int __ver, __const char *__filename, - struct stat *__stat_buf)) - __asm__ ("__xstat64"); -extern int __lxstat __P ((int __ver, __const char *__filename, - struct stat *__stat_buf)) - __asm__ ("__lxstat64"); +# ifdef __REDIRECT +extern int __REDIRECT (__fxstat, __P ((int __ver, int __fildes, + struct stat *__stat_buf)), __fxstat64); +extern int __REDIRECT (__xstat, __P ((int __ver, __const char *__filename, + struct stat *__stat_buf)), __xstat64); +extern int __REDIRECT (__lxstat __P ((int __ver, __const char *__filename, + struct stat *__stat_buf)), __lxstat64); + +# else +# define __fxstat __fxstat64 +# define __xstat __xstat64 +# define __lxstat __lxstat64 +# endif #endif + #ifdef __USE_LARGEFILE64 extern int __fxstat64 __P ((int __ver, int __fildes, struct stat64 *__stat_buf)); diff --git a/io/sys/statfs.h b/io/sys/statfs.h index fbec44182b..6d9d00f92f 100644 --- a/io/sys/statfs.h +++ b/io/sys/statfs.h @@ -32,8 +32,12 @@ extern int __statfs __P ((__const char *__file, struct statfs *__buf)); #ifndef __USE_FILE_OFFSET64 extern int statfs __P ((__const char *__file, struct statfs *__buf)); #else -extern int statfs __P ((__const char *__file, struct statfs *__buf)) - __asm__ ("statfs64"); +# ifdef __REDIRECT +extern int __REDIRECT (statfs, __P ((__const char *__file, + struct statfs *__buf)), statfs64); +# else +# define statfs statfs64 +# endif #endif #ifdef __USE_LARGEFILE64 extern int statfs64 __P ((__const char *__file, struct statfs64 *__buf)); @@ -45,8 +49,12 @@ extern int __fstatfs __P ((int __fildes, struct statfs *__buf)); #ifndef __USE_FILE_OFFSET64 extern int fstatfs __P ((int __fildes, struct statfs *__buf)); #else -extern int fstatfs __P ((int __fildes, struct statfs *__buf)) - __asm__ ("fstatfs64"); +# ifdef __REDIRECT +extern int __REDIRECT (fstatfs, __P ((int __fildes, struct statfs *__buf)), + fstatfs64); +# else +# define statfs statfs64 +# endif #endif #ifdef __USE_LARGEFILE64 extern int fstatfs64 __P ((int __fildes, struct statfs64 *__buf)); diff --git a/io/sys/statvfs.h b/io/sys/statvfs.h index 4da8e7c348..856d3c93ca 100644 --- a/io/sys/statvfs.h +++ b/io/sys/statvfs.h @@ -32,8 +32,13 @@ extern int __statvfs __P ((__const char *__file, struct statvfs *__buf)); #ifndef __USE_FILE_OFFSET64 extern int statvfs __P ((__const char *__file, struct statvfs *__buf)); #else -extern int statvfs __P ((__const char *__file, struct statvfs *__buf)) - __asm__ ("statvfs64"); +# ifdef __REDIRECT +extern int __REDIRECT (statvfs, + __P ((__const char *__file, struct statvfs *__buf)), + statvfs64); +# else +# define statfs statfs64 +# endif #endif #ifdef __USE_LARGEFILE64 extern int statvfs64 __P ((__const char *__file, struct statvfs64 *__buf)); @@ -45,8 +50,12 @@ extern int __fstatvfs __P ((int __fildes, struct statvfs *__buf)); #ifndef __USE_FILE_OFFSET64 extern int fstatvfs __P ((int __fildes, struct statvfs *__buf)); #else -extern int fstatvfs __P ((int __fildes, struct statvfs *__buf)) - __asm__ ("fstatvfs64"); +# ifdef __REDIRECT +extern int __REDIRECT (fstatvfs, __P ((int __fildes, struct statvfs *__buf)), + fstatvfs64); +# else +# define statfs statfs64 +# endif #endif #ifdef __USE_LARGEFILE64 extern int fstatvfs64 __P ((int __fildes, struct statvfs64 *__buf)); |