if (fd < 0)
error (EXIT_FAILURE, errno, _("Can't open cache file %s\n"), cache_name);
- struct stat64 st;
- if (__fstat64 (fd, &st) < 0
+ struct stat st;
+ if (fstat (fd, &st) < 0
/* No need to map the file if it is empty. */
|| st.st_size == 0)
{
}
int
-search_aux_cache (struct stat64 *stat_buf, int *flags,
+search_aux_cache (struct stat *stat_buf, int *flags,
unsigned int *osversion, unsigned int *isa_level,
char **soname)
{
}
void
-add_to_aux_cache (struct stat64 *stat_buf, int flags,
+add_to_aux_cache (struct stat *stat_buf, int flags,
unsigned int osversion, unsigned int isa_level,
const char *soname)
{
return;
}
- struct stat64 st;
- if (__fstat64 (fd, &st) < 0 || st.st_size < sizeof (struct aux_cache_file))
+ struct stat st;
+ if (fstat (fd, &st) < 0 || st.st_size < sizeof (struct aux_cache_file))
{
close (fd);
init_aux_cache ();
char *dir = strdupa (aux_cache_name);
dir = dirname (dir);
- struct stat64 st;
- if (stat64 (dir, &st) < 0)
+ struct stat st;
+ if (stat (dir, &st) < 0)
{
if (mkdir (dir, 0700) < 0)
goto out_fail;
inode data from *ST. */
static struct dir_entry *
new_sub_entry (const struct dir_entry *entry, const char *path,
- const struct stat64 *st)
+ const struct stat *st)
{
struct dir_entry *new_entry = xmalloc (sizeof (struct dir_entry));
new_entry->from_file = entry->from_file;
continue;
/* See if this entry eventually resolves to a directory. */
- struct stat64 st;
- if (fstatat64 (dirfd (dir), e->d_name, &st, 0) < 0)
+ struct stat st;
+ if (fstatat (dirfd (dir), e->d_name, &st, 0) < 0)
/* Ignore unreadable entries. */
continue;
if (opt_chroot != NULL)
path = chroot_canon (opt_chroot, path);
- struct stat64 stat_buf;
- if (path == NULL || stat64 (path, &stat_buf))
+ struct stat stat_buf;
+ if (path == NULL || stat (path, &stat_buf))
{
if (opt_verbose)
error (0, errno, _("Can't stat %s"), entry->path);
}
static int
-chroot_stat (const char *real_path, const char *path, struct stat64 *st)
+chroot_stat (const char *real_path, const char *path, struct stat *st)
{
int ret;
char *canon_path;
if (!opt_chroot)
- return stat64 (real_path, st);
+ return stat (real_path, st);
- ret = lstat64 (real_path, st);
+ ret = lstat (real_path, st);
if (ret || !S_ISLNK (st->st_mode))
return ret;
if (canon_path == NULL)
return -1;
- ret = stat64 (canon_path, st);
+ ret = stat (canon_path, st);
free (canon_path);
return ret;
}
{
char *full_libname, *full_soname;
char *real_full_libname, *real_full_soname;
- struct stat64 stat_lib, stat_so, lstat_so;
+ struct stat stat_lib, stat_so, lstat_so;
int do_link = 1;
int do_remove = 1;
/* XXX: The logics in this function should be simplified. */
&& stat_lib.st_ino == stat_so.st_ino)
/* Link is already correct. */
do_link = 0;
- else if (lstat64 (full_soname, &lstat_so) == 0
+ else if (lstat (full_soname, &lstat_so) == 0
&& !S_ISLNK (lstat_so.st_mode))
{
error (0, 0, _("%s is not a symbolic link\n"), full_soname);
do_remove = 0;
}
}
- else if (lstat64 (real_full_soname, &lstat_so) != 0
+ else if (lstat (real_full_soname, &lstat_so) != 0
|| !S_ISLNK (lstat_so.st_mode))
/* Unless it is a stale symlink, there is no need to remove. */
do_remove = 0;
char *real_library;
char *libname;
char *soname;
- struct stat64 stat_buf;
+ struct stat stat_buf;
int flag;
unsigned int osversion;
unsigned int isa_level;
}
/* Do some sanity checks first. */
- if (lstat64 (real_library, &stat_buf))
+ if (lstat (real_library, &stat_buf))
{
error (0, errno, _("Cannot lstat %s"), library);
goto out;
sprintf (real_file_name, "%s/%s", dir_name, direntry->d_name);
}
- struct stat64 lstat_buf;
+ struct stat lstat_buf;
/* We optimize and try to do the lstat call only if needed. */
if (direntry->d_type != DT_UNKNOWN)
lstat_buf.st_mode = DTTOIF (direntry->d_type);
else
- if (__glibc_unlikely (lstat64 (real_file_name, &lstat_buf)))
+ if (__glibc_unlikely (lstat (real_file_name, &lstat_buf)))
{
error (0, errno, _("Cannot lstat %s"), file_name);
continue;
}
- struct stat64 stat_buf;
+ struct stat stat_buf;
bool is_dir;
int is_link = S_ISLNK (lstat_buf.st_mode);
if (is_link)
continue;
}
}
- if (__glibc_unlikely (stat64 (target_name, &stat_buf)))
+ if (__glibc_unlikely (stat (target_name, &stat_buf)))
{
if (opt_verbose)
error (0, errno, _("Cannot stat %s"), file_name);
{
if (!is_link
&& direntry->d_type != DT_UNKNOWN
- && __builtin_expect (lstat64 (real_file_name, &lstat_buf), 0))
+ && __builtin_expect (lstat (real_file_name, &lstat_buf), 0))
{
error (0, errno, _("Cannot lstat %s"), file_name);
continue;
else
real_name = real_file_name;
- /* Call lstat64 if not done yet. */
+ /* Call lstat if not done yet. */
if (!is_link
&& direntry->d_type != DT_UNKNOWN
- && __builtin_expect (lstat64 (real_file_name, &lstat_buf), 0))
+ && __builtin_expect (lstat (real_file_name, &lstat_buf), 0))
{
error (0, errno, _("Cannot lstat %s"), file_name);
continue;
extern void load_aux_cache (const char *aux_cache_name);
-extern int search_aux_cache (struct stat64 *stat_buf, int *flags,
+extern int search_aux_cache (struct stat *stat_buf, int *flags,
unsigned int *osversion,
unsigned int *isa_level, char **soname);
-extern void add_to_aux_cache (struct stat64 *stat_buf, int flags,
+extern void add_to_aux_cache (struct stat *stat_buf, int flags,
unsigned int osversion,
unsigned int isa_level, const char *soname);
const char *lib, int *flag,
unsigned int *osversion, unsigned int *isa_level,
char **soname, int is_link,
- struct stat64 *stat_buf);
+ struct stat *stat_buf);
extern char *implicit_soname (const char *lib, int flag);