diff options
Diffstat (limited to 'libc/misc/statfs')
-rw-r--r-- | libc/misc/statfs/fstatfs64.c | 6 | ||||
-rw-r--r-- | libc/misc/statfs/fstatvfs.c | 6 | ||||
-rw-r--r-- | libc/misc/statfs/fstatvfs64.c | 6 | ||||
-rw-r--r-- | libc/misc/statfs/internal_statvfs.c | 10 | ||||
-rw-r--r-- | libc/misc/statfs/statfs64.c | 6 | ||||
-rw-r--r-- | libc/misc/statfs/statvfs.c | 7 | ||||
-rw-r--r-- | libc/misc/statfs/statvfs64.c | 6 |
7 files changed, 23 insertions, 24 deletions
diff --git a/libc/misc/statfs/fstatfs64.c b/libc/misc/statfs/fstatfs64.c index b793002fb..5fd1d60f6 100644 --- a/libc/misc/statfs/fstatfs64.c +++ b/libc/misc/statfs/fstatfs64.c @@ -41,11 +41,11 @@ #include <stddef.h> /* Return information about the filesystem on which FD resides. */ -int fstatfs64 (int fd, struct statfs64 *buf) +int attribute_hidden __fstatfs64 (int fd, struct statfs64 *buf) { struct statfs buf32; - if (fstatfs (fd, &buf32) < 0) + if (__fstatfs (fd, &buf32) < 0) return -1; buf->f_type = buf32.f_type; @@ -61,6 +61,6 @@ int fstatfs64 (int fd, struct statfs64 *buf) return 0; } +strong_alias(__fstatfs64,fstatfs64) #endif /* __UCLIBC_HAS_LFS__ */ - diff --git a/libc/misc/statfs/fstatvfs.c b/libc/misc/statfs/fstatvfs.c index b79195e73..14ef6ecce 100644 --- a/libc/misc/statfs/fstatvfs.c +++ b/libc/misc/statfs/fstatvfs.c @@ -17,8 +17,6 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define strsep __strsep - #include <features.h> #define __USE_GNU @@ -37,10 +35,10 @@ int fstatvfs (int fd, struct statvfs *buf) struct stat st; /* Get as much information as possible from the system. */ - if (fstatfs (fd, &fsbuf) < 0) + if (__fstatfs (fd, &fsbuf) < 0) return -1; -#define STAT(st) fstat (fd, st) +#define STAT(st) __fstat (fd, st) #include "internal_statvfs.c" /* We signal success if the statfs call succeeded. */ diff --git a/libc/misc/statfs/fstatvfs64.c b/libc/misc/statfs/fstatvfs64.c index 0d7416df3..993caf955 100644 --- a/libc/misc/statfs/fstatvfs64.c +++ b/libc/misc/statfs/fstatvfs64.c @@ -17,8 +17,6 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define strsep __strsep - #include <features.h> #ifdef __UCLIBC_HAS_LFS__ @@ -50,10 +48,10 @@ int fstatvfs (int fd, struct statvfs *buf) struct stat st; /* Get as much information as possible from the system. */ - if (fstatfs (fd, &fsbuf) < 0) + if (__fstatfs (fd, &fsbuf) < 0) return -1; -#define STAT(st) fstat (fd, st) +#define STAT(st) __fstat (fd, st) #include "internal_statvfs.c" /* We signal success if the statfs call succeeded. */ diff --git a/libc/misc/statfs/internal_statvfs.c b/libc/misc/statfs/internal_statvfs.c index 4e25edc3f..d41c3052d 100644 --- a/libc/misc/statfs/internal_statvfs.c +++ b/libc/misc/statfs/internal_statvfs.c @@ -18,12 +18,18 @@ 02111-1307 USA. */ extern FILE *__setmntent (__const char *__file, __const char *__mode) __THROW attribute_hidden; + extern struct mntent *__getmntent_r (FILE *__restrict __stream, struct mntent *__restrict __result, char *__restrict __buffer, int __bufsize) __THROW attribute_hidden; + extern int __endmntent (FILE *__stream) __THROW attribute_hidden; +extern char *__strsep (char **__restrict __stringp, + __const char *__restrict __delim) + __THROW __nonnull ((1, 2)) attribute_hidden; + /* Now fill in the fields we have information for. */ buf->f_bsize = fsbuf.f_bsize; /* Linux does not support f_frsize, so set it to the full block size. */ @@ -77,7 +83,7 @@ extern int __endmntent (FILE *__stream) __THROW attribute_hidden; struct stat fsst; /* Find out about the device the current entry is for. */ - if (stat (mntbuf.mnt_dir, &fsst) >= 0 + if (__stat (mntbuf.mnt_dir, &fsst) >= 0 && st.st_dev == fsst.st_dev) { /* Bingo, we found the entry for the device FD is on. @@ -85,7 +91,7 @@ extern int __endmntent (FILE *__stream) __THROW attribute_hidden; char *cp = mntbuf.mnt_opts; char *opt; - while ((opt = strsep (&cp, ",")) != NULL) + while ((opt = __strsep (&cp, ",")) != NULL) if (__strcmp (opt, "ro") == 0) buf->f_flag |= ST_RDONLY; else if (__strcmp (opt, "nosuid") == 0) diff --git a/libc/misc/statfs/statfs64.c b/libc/misc/statfs/statfs64.c index 7144cce71..7a8f2bc36 100644 --- a/libc/misc/statfs/statfs64.c +++ b/libc/misc/statfs/statfs64.c @@ -39,11 +39,11 @@ #if defined __UCLIBC_HAS_LFS__ /* Return information about the filesystem on which FILE resides. */ -int statfs64 (const char *file, struct statfs64 *buf) +int attribute_hidden __statfs64 (const char *file, struct statfs64 *buf) { struct statfs buf32; - if (statfs (file, &buf32) < 0) + if (__statfs (file, &buf32) < 0) return -1; buf->f_type = buf32.f_type; @@ -59,4 +59,6 @@ int statfs64 (const char *file, struct statfs64 *buf) return 0; } +strong_alias(__statfs64,statfs64) + #endif diff --git a/libc/misc/statfs/statvfs.c b/libc/misc/statfs/statvfs.c index 0fe239573..a7c553fb6 100644 --- a/libc/misc/statfs/statvfs.c +++ b/libc/misc/statfs/statvfs.c @@ -17,8 +17,6 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define strsep __strsep - #include <features.h> #define __USE_GNU @@ -31,17 +29,16 @@ #include <sys/statfs.h> #include <sys/statvfs.h> - int statvfs (const char *file, struct statvfs *buf) { struct statfs fsbuf; struct stat st; /* Get as much information as possible from the system. */ - if (statfs (file, &fsbuf) < 0) + if (__statfs (file, &fsbuf) < 0) return -1; -#define STAT(st) stat (file, st) +#define STAT(st) __stat (file, st) #include "internal_statvfs.c" /* We signal success if the statfs call succeeded. */ diff --git a/libc/misc/statfs/statvfs64.c b/libc/misc/statfs/statvfs64.c index 8bacbba70..dc2458f5f 100644 --- a/libc/misc/statfs/statvfs64.c +++ b/libc/misc/statfs/statvfs64.c @@ -17,8 +17,6 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define strsep __strsep - #include <features.h> #ifdef __UCLIBC_HAS_LFS__ @@ -51,10 +49,10 @@ int statvfs (const char *file, struct statvfs *buf) struct stat st; /* Get as much information as possible from the system. */ - if (statfs (file, &fsbuf) < 0) + if (__statfs (file, &fsbuf) < 0) return -1; -#define STAT(st) stat (file, st) +#define STAT(st) __stat (file, st) #include "internal_statvfs.c" /* We signal success if the statfs call succeeded. */ |