Remove the manual undef of the min/max macros, or def NOMINMAX

We now add NOMINMAX to PlatformCommonInternal target which will be
linked to everything else, so min/max will not be defined upon the
inclusion of `windows.h`, or other headers.

Change-Id: I10016720dac7ce015e929885b7368ee86d8b6918
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 1dfa922606e497918e57a6a06f96ee63b7fb163e)
This commit is contained in:
Amir Masoud Abdol 2023-05-23 15:04:17 +02:00
parent 2713444900
commit dc72617cf2
8 changed files with 0 additions and 35 deletions

View File

@ -2,9 +2,6 @@
// Copyright (C) 2016 Intel Corporation.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
// Prevent windows system header files from defining min/max as macros.
#define NOMINMAX 1
#include <winsock2.h>
#include <ws2tcpip.h>

View File

@ -30,14 +30,7 @@
#define _int64 __int64
#endif
#include <oci.h>
#ifdef max
#undef max
#endif
#ifdef min
#undef min
#endif
#include <stdlib.h>

View File

@ -1,10 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef NOMINMAX
#define NOMINMAX
#endif // NOMINMAX
#include <QtNetwork/private/qnativesocketengine_p_p.h>
#include "qsslsocket_openssl_symbols_p.h"

View File

@ -9,13 +9,6 @@
#include <QtTest/private/qbenchmark_p.h>
#include <QtTest/private/qtestlog_p.h>
#ifdef min // windows.h without NOMINMAX is included by the benchmark headers.
# undef min
#endif
#ifdef max
# undef max
#endif
#include <QtCore/qlibraryinfo.h>
#include <string.h>

View File

@ -16,13 +16,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef min // windows.h without NOMINMAX is included by the benchmark headers.
# undef min
#endif
#ifdef max
# undef max
#endif
#include <QtCore/QByteArray>
#include <QtCore/qmath.h>
#include <QtCore/QLibraryInfo>

View File

@ -7,9 +7,6 @@
// (except qglobal.h), or else you'll get tons of compile errors
#include <qglobal.h>
// To prevent windows system header files from re-defining min/max
#define NOMINMAX 1
#if defined(Q_OS_WIN)
# include <winsock2.h>
# include <ws2tcpip.h>

View File

@ -2,8 +2,6 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <qglobal.h>
// To prevent windows system header files from re-defining min/max
#define NOMINMAX 1
#if defined(_WIN32)
#include <winsock2.h>
#else

View File

@ -4,8 +4,6 @@
#include <qglobal.h>
// To prevent windows system header files from re-defining min/max
#define NOMINMAX 1
#if defined(_WIN32)
#include <winsock2.h>
#else