diff options
author | Marc Mutz <marc.mutz@qt.io> | 2023-11-07 20:20:01 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2023-11-30 22:52:11 +0100 |
commit | f96a17225f088a5790655c01eaab9578c81a19f2 (patch) | |
tree | 919bc1649c9ea3c73b01147417a7072f511d9fdf /src/corelib/io | |
parent | a2309116a8573a1a98dca82a737896313f7ace30 (diff) |
Rename EINTR_LOOP -> QT_EINTR_LOOP
This non-namespaced macro was defined in a header, and while that
header is private, we shouldn't define non-namespaced macros in our
headers.
The macro also clashed with one of the same name defined in forkfd.c,
which broke unity-builds including the forkfd_qt.cpp TU. This rename
fixes that, too, so we can now remove forkfd_qt.cpp from
NO_UNITY_BUILD_SOURCES.
Pick-to: 6.6 6.5
Change-Id: Ic4bb4e4d7a632ca87905e48913db788a7c202314
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_kqueue.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qfsfileengine_unix.cpp | 4 | ||||
-rw-r--r-- | src/corelib/io/qprocess_unix.cpp | 4 | ||||
-rw-r--r-- | src/corelib/io/qstorageinfo_linux.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qstorageinfo_unix.cpp | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_kqueue.cpp b/src/corelib/io/qfilesystemwatcher_kqueue.cpp index ad98bf2ab9..7a9be337bf 100644 --- a/src/corelib/io/qfilesystemwatcher_kqueue.cpp +++ b/src/corelib/io/qfilesystemwatcher_kqueue.cpp @@ -165,7 +165,7 @@ void QKqueueFileSystemWatcherEngine::readFromKqueue() int r; struct kevent kev; struct timespec ts = { 0, 0 }; // 0 ts, because we want to poll - EINTR_LOOP(r, kevent(kqfd, 0, 0, &kev, 1, &ts)); + QT_EINTR_LOOP(r, kevent(kqfd, 0, 0, &kev, 1, &ts)); if (r < 0) { perror("QKqueueFileSystemWatcherEngine: error during kevent wait"); return; diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index 217474cb7f..23eb48d63f 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -160,9 +160,9 @@ bool QFSFileEnginePrivate::nativeSyncToDisk() Q_Q(QFSFileEngine); int ret; #if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0 - EINTR_LOOP(ret, fdatasync(nativeHandle())); + QT_EINTR_LOOP(ret, fdatasync(nativeHandle())); #else - EINTR_LOOP(ret, fsync(nativeHandle())); + QT_EINTR_LOOP(ret, fsync(nativeHandle())); #endif if (ret != 0) q->setError(QFile::WriteError, qt_error_string(errno)); diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index 69c2ec73cc..6b291c5a2c 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -1256,7 +1256,7 @@ void QProcessPrivate::waitForDeadChild() forkfd_info info = {}; // Silence -Wmaybe-uninitialized; Thiago says forkfd_wait cannot fail here // (QTBUG-119081) int ret; - EINTR_LOOP(ret, forkfd_wait(forkfd, &info, nullptr)); + QT_EINTR_LOOP(ret, forkfd_wait(forkfd, &info, nullptr)); exitCode = info.status; exitStatus = info.code == CLD_EXITED ? QProcess::NormalExit : QProcess::CrashExit; @@ -1264,7 +1264,7 @@ void QProcessPrivate::waitForDeadChild() delete stateNotifier; stateNotifier = nullptr; - EINTR_LOOP(ret, forkfd_close(forkfd)); + QT_EINTR_LOOP(ret, forkfd_close(forkfd)); forkfd = -1; // Child is dead, don't try to kill it anymore #if defined QPROCESS_DEBUG diff --git a/src/corelib/io/qstorageinfo_linux.cpp b/src/corelib/io/qstorageinfo_linux.cpp index ceb5458b60..1b2b0adcb0 100644 --- a/src/corelib/io/qstorageinfo_linux.cpp +++ b/src/corelib/io/qstorageinfo_linux.cpp @@ -146,7 +146,7 @@ void QStorageInfoPrivate::retrieveVolumeInfo() { struct statfs64 statfs_buf; int result; - EINTR_LOOP(result, statfs64(QFile::encodeName(rootPath).constData(), &statfs_buf)); + QT_EINTR_LOOP(result, statfs64(QFile::encodeName(rootPath).constData(), &statfs_buf)); if (result == 0) { valid = true; ready = true; diff --git a/src/corelib/io/qstorageinfo_unix.cpp b/src/corelib/io/qstorageinfo_unix.cpp index 3c458ad30b..71775b7800 100644 --- a/src/corelib/io/qstorageinfo_unix.cpp +++ b/src/corelib/io/qstorageinfo_unix.cpp @@ -403,7 +403,7 @@ void QStorageInfoPrivate::retrieveVolumeInfo() { QT_STATFSBUF statfs_buf; int result; - EINTR_LOOP(result, QT_STATFS(QFile::encodeName(rootPath).constData(), &statfs_buf)); + QT_EINTR_LOOP(result, QT_STATFS(QFile::encodeName(rootPath).constData(), &statfs_buf)); if (result == 0) { valid = true; ready = true; |