From d0769ae0d6f6ea12a8d980521aa5f934c9eeaa4e Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Tue, 13 Dec 2005 09:29:46 +0000 Subject: Add redirect/redefines for x to x64 until someone will answer my mail/decides of a better way. libc-internal.h will finally have >5xx __x prototypes --- include/libc-internal.h | 81 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/libc-internal.h b/include/libc-internal.h index 03f17dd43..d2a327688 100644 --- a/include/libc-internal.h +++ b/include/libc-internal.h @@ -159,7 +159,19 @@ typedef __ssize_t ssize_t; /* prototypes for internal use, please keep these in sync w/ updated headers */ /* #include */ -extern int __open(__const char *__file, int __oflag, ...) attribute_hidden; +#ifndef __USE_FILE_OFFSET64 +extern int __open (__const char *__file, int __oflag, ...) __nonnull ((1)) attribute_hidden; +#else +# ifdef __REDIRECT +extern int __REDIRECT (__open, (__const char *__file, int __oflag, ...), __open64) + __nonnull ((1)) attribute_hidden; +# else +# define __open __open64 +# endif +#endif +#ifdef __USE_LARGEFILE64 +extern int __open64 (__const char *__file, int __oflag, ...) __nonnull ((1)) attribute_hidden; +#endif /* #include */ extern int __memcmp (__const void *__s1, __const void *__s2, size_t __n) attribute_hidden; @@ -211,6 +223,73 @@ extern int __ioctl (int __fd, unsigned long int __request, ...) attribute_hidden /* #include */ extern int __socket (int __domain, int __type, int __protocol) attribute_hidden; +/* #include */ +#ifndef __USE_FILE_OFFSET64 +struct stat; +/* Get file attributes for FILE and put them in BUF. */ +extern int __stat (__const char *__restrict __file, + struct stat *__restrict __buf) __THROW __nonnull ((1, 2)) attribute_hidden; + +/* 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 (int __fd, struct stat *__buf) __THROW __nonnull ((2)) attribute_hidden; +#else +# ifdef __REDIRECT_NTH +extern int __REDIRECT_NTH (__stat, (__const char *__restrict __file, + struct stat *__restrict __buf), __stat64) + __nonnull ((1, 2)) attribute_hidden; +extern int __REDIRECT_NTH (__fstat, (int __fd, struct stat *__buf), __fstat64) + __nonnull ((2)) attribute_hidden; +# else +# define __stat __stat64 +# define __fstat __fstat64 +# endif +#endif +#ifdef __USE_LARGEFILE64 +struct stat64; +extern int __stat64 (__const char *__restrict __file, + struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2)) attribute_hidden; +extern int __fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2)) attribute_hidden; +#endif + +/* #include */ +#ifndef __USE_FILE_OFFSET64 +struct statfs; +extern int __statfs (__const char *__file, struct statfs *__buf) + __THROW __nonnull ((1, 2)) attribute_hidden; +#else +# ifdef __REDIRECT +extern int __REDIRECT (__statfs, + (__const char *__file, struct statfs *__buf), + __statfs64) __nonnull ((1, 2)) attribute_hidden; +# else +# define __statfs __statfs64 +# endif +#endif +#ifdef __USE_LARGEFILE64 +struct statfs64; +extern int __statfs64 (__const char *__file, struct statfs64 *__buf) + __THROW __nonnull ((1, 2)) attribute_hidden; +#endif + +/* Return information about the filesystem containing the file FILDES + refers to. */ +#ifndef __USE_FILE_OFFSET64 +extern int __fstatfs (int __fildes, struct statfs *__buf) + __THROW __nonnull ((2)) attribute_hidden; +#else +# ifdef __REDIRECT +extern int __REDIRECT (__fstatfs, (int __fildes, struct statfs *__buf), + __fstatfs64) __nonnull ((2)) attribute_hidden; +# else +# define __fstatfs __fstatfs64 +# endif +#endif +#ifdef __USE_LARGEFILE64 +extern int __fstatfs64 (int __fildes, struct statfs64 *__buf) + __THROW __nonnull ((2)) attribute_hidden; +#endif + # if 0 /* undoable here */ /* #include */ typedef struct __dirstream DIR; -- cgit v1.2.3