return -1;
}
- if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &st), 0) < 0)
+ if (__builtin_expect (__fstat64 (fd, &st), 0) < 0)
goto close_unlock_return;
if (__builtin_expect (!S_ISREG (st.st_mode), 0)
decsriptor numbers, in this order. */
struct stat64 st;
if (__builtin_expect (nullfd != fd, 0)
- || __builtin_expect (__fxstat64 (_STAT_VER, fd, &st), 0) != 0
+ || __builtin_expect (__fstat64 (fd, &st), 0) != 0
|| __builtin_expect (S_ISCHR (st.st_mode), 1) == 0
|| st.st_rdev != dev)
/* We cannot even give an error message here since it would
error (EXIT_FAILURE, errno, _("Can't open cache file %s\n"), cache_name);
struct stat64 st;
- if (fstat64 (fd, &st) < 0
+ if (__fstat64 (fd, &st) < 0
/* No need to map the file if it is empty. */
|| st.st_size == 0)
{
}
struct stat64 st;
- if (fstat64 (fd, &st) < 0 || st.st_size < sizeof (struct aux_cache_file))
+ if (__fstat64 (fd, &st) < 0 || st.st_size < sizeof (struct aux_cache_file))
{
close (fd);
init_aux_cache ();
buf[buflen - namelen - 1] = '\0';
- if (__xstat64 (_STAT_VER, buf, &st) != 0
+ if (__stat64 (buf, &st) != 0
|| ! S_ISDIR (st.st_mode))
/* The directory does not exist or it is no directory. */
this_dir->status[cnt] = nonexisting;
directories and so exploit the bugs. */
struct stat64 st;
- if (__fxstat64 (_STAT_VER, fd, &st) != 0
+ if (__fstat64 (fd, &st) != 0
|| (st.st_mode & S_ISUID) == 0)
{
/* The shared object cannot be tested for being SUID
int fd = __open64_nocancel (file, O_RDONLY | O_CLOEXEC);
if (fd >= 0)
{
- if (__fxstat64 (_STAT_VER, fd, &st) >= 0)
+ if (__fstat64 (fd, &st) >= 0)
{
*sizep = st.st_size;
return;
}
- if (__fxstat64 (_STAT_VER, fd, &st) < 0 || !S_ISREG (st.st_mode))
+ if (__fstat64 (fd, &st) < 0 || !S_ISREG (st.st_mode))
{
/* Not stat'able or not a regular file => don't use it. */
errstr = "%s: cannot stat file: %s\n";
return -1;
/* Get information about the file. */
- if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &st), 0) < 0
+ if (__builtin_expect (__fstat64 (fd, &st), 0) < 0
/* We do not have to start looking at the file if it cannot contain
at least the cache header. */
|| (size_t) st.st_size < sizeof (struct gconvcache_header))
#define lstat64(fname, buf) __lxstat64 (_STAT_VER, fname, buf)
#define __lstat64(fname, buf) __lxstat64 (_STAT_VER, fname, buf)
#define stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf)
+#define __stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf)
#define fstat64(fd, buf) __fxstat64 (_STAT_VER, fd, buf)
#define __fstat64(fd, buf) __fxstat64 (_STAT_VER, fd, buf)
#define fstat(fd, buf) __fxstat (_STAT_VER, fd, buf)
/* If not a regular file, if owned by someone other than user or
root, if writeable by anyone but the owner, or if hardlinked
anywhere, quit. */
- if (__lxstat64 (_STAT_VER, file, &st))
+ if (__lstat64 (file, &st))
cp = _("lstat failed");
else if (!S_ISREG (st.st_mode))
cp = _("not regular file");
res = fopen (file, "rce");
if (!res)
cp = _("cannot open");
- else if (__fxstat64 (_STAT_VER, fileno (res), &st) < 0)
+ else if (__fstat64 (fileno (res), &st) < 0)
cp = _("fstat failed");
else if (st.st_uid && st.st_uid != okuser)
cp = _("bad owner");
break;
case PASSWD:
if (strcmp(*aname, "anonymous") &&
- fstat64(fileno(cfile), &stb) >= 0 &&
+ __fstat64(fileno(cfile), &stb) >= 0 &&
(stb.st_mode & 077) != 0) {
warnx(_("Error: .netrc file is readable by others."));
warnx(_("Remove 'password' line or make file unreadable by others."));
/* We must know about the size of the file. */
if (
#ifdef _LIBC
- __builtin_expect (fstat64 (fd, &st) != 0, 0)
+ __builtin_expect (__fstat64 (fd, &st) != 0, 0)
#else
__builtin_expect (fstat (fd, &st) != 0, 0)
#endif
const char *path)
{
struct stat64 st;
- if (stat64 (path, &st) != 0)
+ if (__stat64 (path, &st) != 0)
switch (errno)
{
case EACCES:
else
{
struct stat64 st;
- if (fstat64 (__fileno (fp), &st) != 0)
+ if (__fstat64 (__fileno (fp), &st) != 0)
/* If we already have a file descriptor, all errors are fatal. */
return false;
else
# define FTSOBJ FTS
# define FTSENTRY FTSENT
# define INO_T ino_t
-# define STAT stat
-# define LSTAT lstat
+# define STRUCT_STAT stat
+# define STAT __stat
+# define LSTAT __lstat
#endif
static FTSENTRY *fts_alloc (FTSOBJ *, const char *, size_t);
FTSENTRY *t;
dev_t dev;
INO_T ino;
- struct STAT *sbp, sb;
+ struct STRUCT_STAT *sbp, sb;
int saved_errno;
/* If user needs stat info, stat buffer already allocated. */
}
} else if (LSTAT(p->fts_accpath, sbp)) {
p->fts_errno = errno;
-err: memset(sbp, 0, sizeof(struct STAT));
+err: memset(sbp, 0, sizeof(struct STRUCT_STAT));
return (FTS_NS);
}
*/
len = sizeof(FTSENTRY) + namelen;
if (!ISSET(FTS_NOSTAT))
- len += sizeof(struct STAT) + ALIGNBYTES;
+ len += sizeof(struct STRUCT_STAT) + ALIGNBYTES;
if ((p = malloc(len)) == NULL)
return (NULL);
p->fts_name[namelen] = '\0';
if (!ISSET(FTS_NOSTAT))
- p->fts_statp = (struct STAT *)ALIGN(p->fts_name + namelen + 2);
+ p->fts_statp = (struct STRUCT_STAT *)ALIGN(p->fts_name + namelen + 2);
p->fts_namelen = namelen;
p->fts_path = sp->fts_path;
p->fts_errno = 0;
return (0);
if (fd < 0 && (newfd = __open(path, O_RDONLY, 0)) < 0)
return (-1);
- if (__fxstat64(_STAT_VER, newfd, &sb)) {
+ if (__fstat64(newfd, &sb)) {
ret = -1;
goto bail;
}
#define FTSOBJ FTS64
#define FTSENTRY FTSENT64
#define INO_T ino64_t
-#define STAT stat64
-#define LSTAT lstat64
+#define STRUCT_STAT stat64
+#define STAT __stat64
+#define LSTAT __lstat64
#include "fts.c"
# define NFTW_OLD_NAME __old_nftw
# define NFTW_NEW_NAME __new_nftw
# define INO_T ino_t
-# define STAT stat
+# define STRUCT_STAT stat
# ifdef _LIBC
-# define LXSTAT __lxstat
-# define XSTAT __xstat
-# define FXSTATAT __fxstatat
+# define LSTAT __lstat
+# define STAT __stat
+# define FSTATAT __fstatat
# else
-# define LXSTAT(V,f,sb) lstat (f,sb)
-# define XSTAT(V,f,sb) stat (f,sb)
-# define FXSTATAT(V,d,f,sb,m) fstatat (d, f, sb, m)
+# define LSTAT lstat
+# define XTAT stat
+# define FSTATAT fstatat
# endif
# define FTW_FUNC_T __ftw_func_t
# define NFTW_FUNC_T __nftw_func_t
/* Forward declarations of local functions. */
-static int ftw_dir (struct ftw_data *data, struct STAT *st,
+static int ftw_dir (struct ftw_data *data, struct STRUCT_STAT *st,
struct dir_data *old_dir);
static int
-add_object (struct ftw_data *data, struct STAT *st)
+add_object (struct ftw_data *data, struct STRUCT_STAT *st)
{
struct known_object *newp = malloc (sizeof (struct known_object));
if (newp == NULL)
static inline int
-find_object (struct ftw_data *data, struct STAT *st)
+find_object (struct ftw_data *data, struct STRUCT_STAT *st)
{
struct known_object obj;
obj.dev = st->st_dev;
process_entry (struct ftw_data *data, struct dir_data *dir, const char *name,
size_t namlen, int d_type)
{
- struct STAT st;
+ struct STRUCT_STAT st;
int result = 0;
int flag = 0;
size_t new_buflen;
int statres;
if (dir->streamfd != -1)
- statres = FXSTATAT (_STAT_VER, dir->streamfd, name, &st,
- (data->flags & FTW_PHYS) ? AT_SYMLINK_NOFOLLOW : 0);
+ statres = FSTATAT (dir->streamfd, name, &st,
+ (data->flags & FTW_PHYS) ? AT_SYMLINK_NOFOLLOW : 0);
else
{
if ((data->flags & FTW_CHDIR) == 0)
name = data->dirbuf;
statres = ((data->flags & FTW_PHYS)
- ? LXSTAT (_STAT_VER, name, &st)
- : XSTAT (_STAT_VER, name, &st));
+ ? LSTAT (name, &st)
+ : STAT (name, &st));
}
if (statres < 0)
it should contain information about the link (ala lstat).
We do our best to fill in what data we can. */
if (dir->streamfd != -1)
- statres = FXSTATAT (_STAT_VER, dir->streamfd, name, &st,
- AT_SYMLINK_NOFOLLOW);
+ statres = FSTATAT (dir->streamfd, name, &st,
+ AT_SYMLINK_NOFOLLOW);
else
- statres = LXSTAT (_STAT_VER, name, &st);
+ statres = LSTAT (name, &st);
if (statres == 0 && S_ISLNK (st.st_mode))
flag = FTW_SLN;
else
static int
__attribute ((noinline))
-ftw_dir (struct ftw_data *data, struct STAT *st, struct dir_data *old_dir)
+ftw_dir (struct ftw_data *data, struct STRUCT_STAT *st, struct dir_data *old_dir)
{
struct dir_data dir;
struct dirent64 *d;
int flags)
{
struct ftw_data data;
- struct STAT st;
+ struct STRUCT_STAT st;
int result = 0;
int save_err;
int cwdfd = -1;
name = data.dirbuf;
if (((flags & FTW_PHYS)
- ? LXSTAT (_STAT_VER, name, &st)
- : XSTAT (_STAT_VER, name, &st)) < 0)
+ ? LSTAT (name, &st)
+ : STAT (name, &st)) < 0)
{
if (!(flags & FTW_PHYS)
&& errno == ENOENT
- && LXSTAT (_STAT_VER, name, &st) == 0
+ && LSTAT (name, &st) == 0
&& S_ISLNK (st.st_mode))
result = (*data.func) (data.dirbuf, &st, data.cvt_arr[FTW_SLN],
&data.ftw);
#define NFTW_OLD_NAME __old_nftw64
#define NFTW_NEW_NAME __new_nftw64
#define INO_T ino64_t
-#define STAT stat64
-#define LXSTAT __lxstat64
-#define XSTAT __xstat64
-#define FXSTATAT __fxstatat64
+#define STRUCT_STAT stat64
+#define LSTAT __lstat64
+#define STAT __stat64
+#define FSTATAT __fstatat64
#define FTW_FUNC_T __ftw64_func_t
#define NFTW_FUNC_T __nftw64_func_t
pwd = getenv ("PWD");
if (pwd != NULL
- && stat64 (".", &dotstat) == 0
- && stat64 (pwd, &pwdstat) == 0
+ && __stat64 (".", &dotstat) == 0
+ && __stat64 (pwd, &pwdstat) == 0
&& pwdstat.st_dev == dotstat.st_dev
&& pwdstat.st_ino == dotstat.st_ino)
/* The PWD value is correct. Use it. */
{
/* Check FD is associated with a directory. */
struct stat64 st;
- if (__fxstat64 (_STAT_VER, fd, &st) != 0)
+ if (__fstat64 (fd, &st) != 0)
return -1;
if (!S_ISDIR (st.st_mode))
{
/* Check FD is associated with a directory. */
struct stat64 st;
- if (__fxstat64 (_STAT_VER, fd, &st) != 0)
+ if (__fstat64 (fd, &st) != 0)
return -1;
if (!S_ISDIR (st.st_mode))
{
/* Check FD is associated with a directory. */
struct stat64 st;
- if (__fxstat64 (_STAT_VER, fd, &st) != 0)
+ if (__fstat64 (fd, &st) != 0)
return -1;
if (!S_ISDIR (st.st_mode))
{
/* Check FD is associated with a directory. */
struct stat64 st;
- if (__fxstat64 (_STAT_VER, fd, &st) != 0)
+ if (__fstat64 (fd, &st) != 0)
return -1;
if (!S_ISDIR (st.st_mode))
{
/* Check FD is associated with a directory. */
struct stat64 st;
- if (__fxstat64 (_STAT_VER, fd, &st) != 0)
+ if (__fstat64 (fd, &st) != 0)
return -1;
if (!S_ISDIR (st.st_mode))
int
_IO_file_stat (FILE *fp, void *st)
{
- return __fxstat64 (_STAT_VER, fp->_fileno, (struct stat64 *) st);
+ return __fstat64 (fp->_fileno, (struct stat64 *) st);
}
libc_hidden_def (_IO_file_stat)
/* Cannot open the archive, for whatever reason. */
return NULL;
- if (__fxstat64 (_STAT_VER, fd, &archive_stat) == -1)
+ if (__fstat64 (fd, &archive_stat) == -1)
{
/* stat failed, very strange. */
close_and_out:
/* Now verify we think this is really the same archive file
we opened before. If it has been changed we cannot trust
the header we read previously. */
- if (__fxstat64 (_STAT_VER, fd, &st) < 0
+ if (__fstat64 (fd, &st) < 0
|| st.st_size != archive_stat.st_size
|| st.st_mtime != archive_stat.st_mtime
|| st.st_dev != archive_stat.st_dev
/* Cannot open the file. */
return;
- if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &st), 0) < 0)
+ if (__builtin_expect (__fstat64 (fd, &st), 0) < 0)
{
puntfd:
__close_nocancel_nostatus (fd);
if (__builtin_expect (fd, 0) < 0)
return;
- if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &st), 0) < 0)
+ if (__builtin_expect (__fstat64 (fd, &st), 0) < 0)
goto puntfd;
}
struct stat64 st;
if ((fd = __open_nocancel(_PATH_DEVNULL, O_RDWR, 0)) != -1
- && (__builtin_expect (__fxstat64 (_STAT_VER, fd, &st), 0)
+ && (__builtin_expect (__fstat64 (fd, &st), 0)
== 0)) {
if (__builtin_expect (S_ISCHR (st.st_mode), 1) != 0
#if defined DEV_NULL_MAJOR && defined DEV_NULL_MINOR
strings = NULL;
if ((fp = fopen(_PATH_SHELLS, "rce")) == NULL)
goto init_okshells_noclose;
- if (fstat64(fileno(fp), &statb) == -1) {
+ if (__fstat64(fileno(fp), &statb) == -1) {
init_okshells:
(void)fclose(fp);
init_okshells_noclose:
/* Get the information about the file. */
struct stat64 st;
- if (__fxstat64 (_STAT_VER, fd, &st) == 0)
+ if (__fstat64 (fd, &st) == 0)
{
/* Get the lock. */
lll_lock (__sem_mappings_lock, LLL_PRIVATE);
if (__glibc_unlikely (n == keylen))
{
struct stat64 st;
- if (__builtin_expect (fstat64 (mapfd, &st) != 0, 0)
+ if (__builtin_expect (__fstat64 (mapfd, &st) != 0, 0)
|| __builtin_expect (st.st_size < sizeof (struct database_pers_head),
0))
goto out_close;
# define readdir(str) __readdir64 (str)
# define getpwnam_r(name, bufp, buf, len, res) \
__getpwnam_r (name, bufp, buf, len, res)
-# ifndef __lstat64
-# define __lstat64(fname, buf) __lxstat64 (_STAT_VER, fname, buf)
-# endif
-# ifndef __stat64
-# define __stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf)
-# endif
# define struct_stat64 struct stat64
# define FLEXIBLE_ARRAY_MEMBER
# include <shlib-compat.h>
# define __getlogin_r(buf, len) getlogin_r (buf, len)
# define __lstat64(fname, buf) lstat (fname, buf)
# define __stat64(fname, buf) stat (fname, buf)
-# define __fxstatat64(_, d, f, st, flag) fstatat (d, f, st, flag)
# define struct_stat64 struct stat
# ifndef __MVS__
# define __alloca alloca
dest = __mempcpy (dest, start, end - start);
*dest = '\0';
- if (__lxstat64 (_STAT_VER, rpath, &st) < 0)
+ if (__lstat64 (rpath, &st) < 0)
goto error;
if (S_ISLNK (st.st_mode))
#undef stat
#define stat stat64
#undef __stat
-#define __stat(file, buf) __xstat64 (_STAT_VER, file, buf)
+#define __stat(file, buf) __stat64 (file, buf)
#define COMPILE_GLOB64 1
#undef stat
#define stat stat64
#undef __stat
-#define __stat(file, buf) __xstat64 (_STAT_VER, file, buf)
+#define __stat(file, buf) __stat64 (file, buf)
#define COMPILE_GLOB64 1
if (stp)
{
- if (__xstat64 (_STAT_VER, peername, stp) < 0)
+ if (__stat64 (peername, stp) < 0)
return errno;
}
{
struct stat64 st;
- if (__glibc_unlikely (__fxstat64 (_STAT_VER, fd, &st) < 0))
+ if (__glibc_unlikely (__fstat64 (fd, &st) < 0))
return false;
id->dev = st.st_dev;
return access (path, mode);
#endif
- if (stat64 (path, &stats))
+ if (__stat64 (path, &stats))
return -1;
mode &= (X_OK | W_OK | R_OK); /* Clear any bogus bits. */
{
struct stat64 statbuf;
- if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &statbuf), 0) < 0)
+ if (__builtin_expect (__fstat64 (fd, &statbuf), 0) < 0)
return NULL;
if (__glibc_unlikely (! S_ISDIR (statbuf.st_mode)))
{
/* AIO is only allowed on regular files and block devices. */
struct stat64 st;
- if (__fxstat64 (_STAT_VER, fd, &st) < 0
+ if (__fstat64 (fd, &st) < 0
|| (! S_ISREG (st.st_mode) && ! S_ISBLK (st.st_mode)))
return -1;
else
if (fp != NULL)
{
struct stat64 st;
- if (__fxstat64 (_STAT_VER, fileno (fp), &st) != 0)
+ if (__fstat64 (fileno (fp), &st) != 0)
{
fclose (fp);
goto no_file;
gaiconf_reload (void)
{
struct stat64 st;
- if (__xstat64 (_STAT_VER, GAICONF_FNAME, &st) != 0
+ if (stat64 (GAICONF_FNAME, &st) != 0
|| !check_gaiconf_mtime (&st))
gaiconf_init ();
}
{
int save_error = errno;
- result = fstat64 (fildes, &st);
+ result = __fstat64 (fildes, &st);
__set_errno (save_error);
}
`stat' call. The S_ISDIR check is superfluous if O_DIRECTORY works,
but it's cheap and we need the stat call for st_blksize anyway. */
struct stat64 statbuf;
- if (__glibc_unlikely (__fxstat64 (_STAT_VER, fd, &statbuf) < 0))
+ if (__glibc_unlikely (__fstat64 (fd, &statbuf) < 0))
goto lose;
if (__glibc_unlikely (! S_ISDIR (statbuf.st_mode)))
{
/* AIO is only allowed on regular files and block devices. */
struct stat64 st;
- if (__xstat64 (_STAT_VER, path, &st) < 0
+ if (__stat64 (path, &st) < 0
|| (! S_ISREG (st.st_mode) && ! S_ISBLK (st.st_mode)))
return -1;
else
}
/* We have to make sure that this is really a regular file. */
- if (__fxstat64 (_STAT_VER, fd, &st) != 0)
+ if (__fstat64 (fd, &st) != 0)
return EBADF;
if (S_ISFIFO (st.st_mode))
return ESPIPE;
}
/* We have to make sure that this is really a regular file. */
- if (__fxstat64 (_STAT_VER, fd, &st) != 0)
+ if (__fstat64 (fd, &st) != 0)
return EBADF;
if (S_ISFIFO (st.st_mode))
return ESPIPE;
spec, speclen + 1);
struct stat64 st;
- long int ret = __xstat64 (_STAT_VER, name, &st) >= 0 ? 1 : -1;
+ long int ret = __stat64 (name, &st) >= 0 ? 1 : -1;
__set_errno (save_errno);
return ret;
# define __getpid getpid
# define __mkdir mkdir
# define __open open
-# define __lxstat64(version, file, buf) lstat (file, buf)
# define __secure_getenv secure_getenv
#endif
direxists (const char *dir)
{
struct_stat64 buf;
- return __xstat64 (_STAT_VER, dir, &buf) == 0 && S_ISDIR (buf.st_mode);
+ return __stat64 (dir, &buf) == 0 && S_ISDIR (buf.st_mode);
}
/* Path search algorithm, for tmpnam, tmpfile, etc. If DIR is
case __GT_NOCREATE:
/* This case is backward from the other three. __gen_tempname
- succeeds if __xstat fails because the name does not exist.
+ succeeds if lstat fails because the name does not exist.
Note the continue to bypass the common logic at the bottom
of the loop. */
- if (__lxstat64 (_STAT_VER, tmpl, &st) < 0)
+ if (__lstat64 (tmpl, &st) < 0)
{
if (errno == ENOENT)
{
return INLINE_SYSCALL (faccessat, 3, fd, file, mode);
struct stat64 stats;
- if (__fxstatat64 (_STAT_VER, fd, file, &stats, flag & AT_SYMLINK_NOFOLLOW))
+ if (__fstatat64 (fd, file, &stats, flag & AT_SYMLINK_NOFOLLOW))
return -1;
mode &= (X_OK | W_OK | R_OK); /* Clear any bogus bits. */
/* We come here only if the 'execve' call fails. Determine whether
/proc is mounted. If not we return ENOSYS. */
- struct stat st;
- if (stat ("/proc/self/fd", &st) != 0 && errno == ENOENT)
+ struct stat64 st;
+ if (__stat64 ("/proc/self/fd", &st) != 0 && errno == ENOENT)
save = ENOSYS;
__set_errno (save);
#undef stat
#define stat stat64
#undef __stat
-#define __stat(file, buf) __xstat64 (_STAT_VER, file, buf)
+#define __stat(file, buf) __stat64 (file, buf)
/* Avoid calling gl_lstat with GLOB_ALTDIRFUNC. */
#define GLOB_NO_LSTAT
char path[PATH_MAX];
struct stat64 st;
- if ((file == NULL ? fstat64 (fd, &st) : stat64 (file, &st)) != 0)
+ if ((file == NULL ? __fstat64 (fd, &st) : __stat64 (file, &st)) != 0)
/* Strange. The statfd call worked, but stat fails. Default to
the more pessimistic value. */
return EXT2_LINK_MAX;
continue;
struct stat64 fsst;
- if (stat64 (mntbuf.mnt_dir, &fsst) >= 0
+ if (__stat64 (mntbuf.mnt_dir, &fsst) >= 0
&& st.st_dev == fsst.st_dev)
{
if (strcmp (mntbuf.mnt_type, "ext4") == 0)
return ERANGE;
}
- if (__fxstat64 (_STAT_VER, fd, stp) < 0)
+ if (__fstat64 (fd, stp) < 0)
return errno;
/* Check if FD really is a master pseudo terminal. */
p[2] = '\0';
}
- if (__xstat64 (_STAT_VER, buf, stp) < 0)
+ if (__stat64 (buf, stp) < 0)
return errno;
/* Check if the name we're about to return really corresponds to a
*((char *) __mempcpy (getttyname_name, dev, devlen - 1)) = '/';
}
memcpy (&getttyname_name[devlen], d->d_name, dlen);
- if (__xstat64 (_STAT_VER, getttyname_name, &st) == 0
+ if (__stat64 (getttyname_name, &st) == 0
&& is_mytty (mytty, &st))
{
(void) __closedir (dirstream);
if (__glibc_unlikely (__tcgetattr (fd, &term) < 0))
return NULL;
- if (__fxstat64 (_STAT_VER, fd, &st) < 0)
+ if (__fstat64 (fd, &st) < 0)
return NULL;
/* We try using the /proc filesystem. */
/* Verify readlink result, fall back on iterating through devices. */
if (ttyname_buf[0] == '/'
- && __xstat64 (_STAT_VER, ttyname_buf, &st1) == 0
+ && __stat64 (ttyname_buf, &st1) == 0
&& is_mytty (&st, &st1))
return ttyname_buf;
doispty = 1;
}
- if (__xstat64 (_STAT_VER, "/dev/pts", &st1) == 0 && S_ISDIR (st1.st_mode))
+ if (__stat64 ("/dev/pts", &st1) == 0 && S_ISDIR (st1.st_mode))
{
name = getttyname ("/dev/pts", &st, save, &dostat);
}
cp = __stpncpy (buf + devlen, d->d_name, needed);
cp[0] = '\0';
- if (__xstat64 (_STAT_VER, buf, &st) == 0
+ if (__stat64 (buf, &st) == 0
&& is_mytty (mytty, &st))
{
(void) __closedir (dirstream);
if (__glibc_unlikely (__tcgetattr (fd, &term) < 0))
return errno;
- if (__fxstat64 (_STAT_VER, fd, &st) < 0)
+ if (__fstat64 (fd, &st) < 0)
return errno;
/* We try using the /proc filesystem. */
/* Verify readlink result, fall back on iterating through devices. */
if (buf[0] == '/'
- && __xstat64 (_STAT_VER, buf, &st1) == 0
+ && __stat64 (buf, &st1) == 0
&& is_mytty (&st, &st1))
return 0;
memcpy (buf, "/dev/pts/", sizeof ("/dev/pts/"));
buflen -= sizeof ("/dev/pts/") - 1;
- if (__xstat64 (_STAT_VER, buf, &st1) == 0 && S_ISDIR (st1.st_mode))
+ if (__stat64 (buf, &st1) == 0 && S_ISDIR (st1.st_mode))
{
ret = getttyname_r (buf, buflen, &st, save,
&dostat);
struct stat64 st;
key_t key;
- if (__xstat64 (_STAT_VER, pathname, &st) < 0)
+ if (__stat64 (pathname, &st) < 0)
return (key_t) -1;
key = ((st.st_ino & 0xffff) | ((st.st_dev & 0xff) << 16)
if (datemsk == NULL || *datemsk == '\0')
return 1;
- if (stat64 (datemsk, &st) < 0)
+ if (__stat64 (datemsk, &st) < 0)
return 3;
if (!S_ISREG (st.st_mode))
/* If we were already using tzfile, check whether the file changed. */
struct stat64 st;
if (was_using_tzfile
- && stat64 (file, &st) == 0
+ && __stat64 (file, &st) == 0
&& tzfile_ino == st.st_ino && tzfile_dev == st.st_dev
&& tzfile_mtime == st.st_mtime)
goto done; /* Nothing to do. */
goto ret_free_transitions;
/* Get information about the file we are actually using. */
- if (fstat64 (__fileno (f), &st) != 0)
+ if (__fstat64 (__fileno (f), &st) != 0)
goto lose;
free ((void *) transitions);