Move NOMINMAX to configure/CONFIG_SITE

The macro must be defined before MS system headers are
included.

This rev. remove #define NOMINMAX from public headers,
but no public headers use min()/max() and this was
never the correct way to use this macro as by convention
library headers are included after system headers,
which is too late to have an effect.
This commit is contained in:
Michael Davidsaver
2018-05-28 11:24:19 -07:00
parent 997e68c99a
commit f1553cc90e
11 changed files with 3 additions and 40 deletions

View File

@@ -23,6 +23,9 @@ CHECK_RELEASE = YES
-include $(TOP)/../CONFIG_SITE.local
-include $(TOP)/configure/CONFIG_SITE.local
# MSVC - skip defining min()/max() macros
USR_CPPFLAGS_WIN32 += -DNOMINMAX
ifdef WITH_COVERAGE
USR_CPPFLAGS += --coverage
USR_LDFLAGS += --coverage

View File

@@ -7,10 +7,6 @@
* @author mrk
*/
#if defined(_WIN32) && !defined(NOMINMAX)
#define NOMINMAX
#endif
#include <cstddef>
#include <cstdlib>
#include <string>

View File

@@ -7,10 +7,6 @@
* @author mrk
*/
#if defined(_WIN32) && !defined(NOMINMAX)
#define NOMINMAX
#endif
#include <cstddef>
#include <cstdlib>
#include <string>

View File

@@ -33,10 +33,6 @@
#ifndef EPICSEXCEPTION_H_
#define EPICSEXCEPTION_H_
#if defined(_WIN32) && !defined(NOMINMAX)
#define NOMINMAX
#endif
#include <stdexcept>
#include <string>
#include <cstdio>

View File

@@ -6,10 +6,6 @@
#ifndef SHAREDVECTOR_H
#define SHAREDVECTOR_H
#if defined(_WIN32) && !defined(NOMINMAX)
#define NOMINMAX
#endif
#include <ostream>
#include <algorithm>
#include <stdexcept>

View File

@@ -6,10 +6,6 @@
/**
* @author mrk
*/
#if defined(_WIN32) && !defined(NOMINMAX)
#define NOMINMAX
#endif
#include <stdexcept>
#include <string>

View File

@@ -9,10 +9,6 @@
#ifndef PVDATA_H
#define PVDATA_H
#if defined(_WIN32) && !defined(NOMINMAX)
#define NOMINMAX
#endif
#include <string>
#include <map>
#include <stdexcept>

View File

@@ -14,10 +14,6 @@
#ifndef PVTYPE_H
#define PVTYPE_H
#if defined(_WIN32) && !defined(NOMINMAX)
#define NOMINMAX
#endif
#if defined(_WIN32) && !defined(_MINGW)
#pragma warning( push )
#pragma warning(disable: 4251)

View File

@@ -5,10 +5,6 @@
*/
/* Author: Matej Sekoranja Date: 2010.10.18 */
#if defined(_WIN32) && !defined(NOMINMAX)
#define NOMINMAX
#endif
#include <iostream>
#include <iomanip>
#include <stddef.h>

View File

@@ -9,10 +9,6 @@
* Author: Miha Vitorovic
*/
#if defined(_WIN32) && !defined(NOMINMAX)
#define NOMINMAX
#endif
#include <iostream>
#include <fstream>

View File

@@ -4,10 +4,6 @@
*/
/* Author: Michael Davidsaver */
#if defined(_WIN32) && !defined(NOMINMAX)
#define NOMINMAX
#endif
#include <fstream>
#include <iostream>
#include <algorithm>