1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

Use *stat64 instead of *stat in installed programs

This ensures reliable operation on file systems with inode numbers
which do not fit into 32 bits.
This commit is contained in:
Florian Weimer
2013-05-10 11:41:53 +02:00
parent a3375d2990
commit 4c0fe6fe42
7 changed files with 37 additions and 25 deletions

View File

@@ -326,9 +326,9 @@ clear_args (void)
static void
find_cpp (void)
{
struct stat buf;
struct stat64 buf;
if (stat (CPP, &buf) == 0)
if (stat64 (CPP, &buf) == 0)
return;
if (cppDefined) /* user specified cpp but it does not exist */
@@ -1114,17 +1114,17 @@ putarg (int whereto, const char *cp)
static void
checkfiles (const char *infile, const char *outfile)
{
struct stat buf;
struct stat64 buf;
if (infile) /* infile ! = NULL */
if (stat (infile, &buf) < 0)
if (stat64 (infile, &buf) < 0)
{
perror (infile);
crash ();
}
if (outfile)
{
if (stat (outfile, &buf) < 0)
if (stat64 (outfile, &buf) < 0)
return; /* file does not exist */
else
{