Commit 9ad44f57 authored by frajo's avatar frajo

[qtbase] Compile with largefile support. JB#49745

parent 924dfb54
......@@ -55,6 +55,8 @@
#include <share.h>
#endif
#include "qplatformdefs.h"
QT_BEGIN_NAMESPACE
// FIXME: a line ending in CRLF gets counted as two lines.
......@@ -513,7 +515,7 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file)
const QMakeLocalFileName sourceFile = fixPathForFile(file->file, true);
struct stat fst;
QT_STATBUF fst;
char *buffer = 0;
int buffer_len = 0;
{
......@@ -525,7 +527,7 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file)
#else
fd = open(sourceFile.local().toLatin1().constData(), O_RDONLY);
#endif
if (fd == -1 || fstat(fd, &fst) || S_ISDIR(fst.st_mode)) {
if (fd == -1 || QT_FSTAT(fd, &fst) || S_ISDIR(fst.st_mode)) {
if (fd != -1)
QT_CLOSE(fd);
return false;
......@@ -893,7 +895,7 @@ bool QMakeSourceFileInfo::findMocs(SourceFile *file)
int buffer_len = 0;
char *buffer = 0;
{
struct stat fst;
QT_STATBUF fst;
int fd;
#if defined(_MSC_VER) && _MSC_VER >= 1400
if (_sopen_s(&fd, fixPathForFile(file->file, true).local().toLocal8Bit().constData(),
......@@ -902,7 +904,7 @@ bool QMakeSourceFileInfo::findMocs(SourceFile *file)
#else
fd = open(fixPathForFile(file->file, true).local().toLocal8Bit().constData(), O_RDONLY);
#endif
if (fd == -1 || fstat(fd, &fst) || S_ISDIR(fst.st_mode)) {
if (fd == -1 || QT_FSTAT(fd, &fst) || S_ISDIR(fst.st_mode)) {
if (fd != -1)
QT_CLOSE(fd);
return false; //shouldn't happen
......
......@@ -32,6 +32,7 @@
****************************************************************************/
#include "ioutils.h"
#include "qplatformdefs.h"
#include <qdir.h>
#include <qfile.h>
......@@ -57,8 +58,8 @@ IoUtils::FileType IoUtils::fileType(const QString &fileName)
return FileNotFound;
return (attr & FILE_ATTRIBUTE_DIRECTORY) ? FileIsDir : FileIsRegular;
#else
struct ::stat st;
if (::stat(fileName.toLocal8Bit().constData(), &st))
QT_STATBUF st;
if (QT_STAT(fileName.toLocal8Bit().constData(), &st))
return FileNotFound;
return S_ISDIR(st.st_mode) ? FileIsDir : FileIsRegular;
#endif
......
......@@ -82,6 +82,8 @@
#define QT_PCLOSE pclose
#endif
#include "qplatformdefs.h"
using namespace QMakeInternal;
QT_BEGIN_NAMESPACE
......@@ -1602,8 +1604,8 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
const QString &tfn = resolvePath(args.at(0).toQString(m_tmp1));
const QString &rfn = resolvePath(args.at(1).toQString(m_tmp2));
#ifdef Q_OS_UNIX
struct stat st;
if (stat(rfn.toLocal8Bit().constData(), &st)) {
QT_STATBUF st;
if (QT_STAT(rfn.toLocal8Bit().constData(), &st)) {
evalError(fL1S("Cannot stat() reference file %1: %2.").arg(rfn, fL1S(strerror(errno))));
return ReturnFalse;
}
......
......@@ -488,6 +488,7 @@ MAKEFLAGS=%{?_smp_mflags} \
-no-xkbcommon \
-no-xcb \
-no-xinput2 \
-largefile \
%ifarch aarch64
-no-pch \
%endif
......
......@@ -332,8 +332,8 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
//static
QByteArray QFileSystemEngine::id(const QFileSystemEntry &entry)
{
struct stat statResult;
if (stat(entry.nativeFilePath().constData(), &statResult)) {
QT_STATBUF statResult;
if (QT_STAT(entry.nativeFilePath().constData(), &statResult)) {
qErrnoWarning("stat() failed for '%s'", entry.nativeFilePath().constData());
return QByteArray();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment