diff options
| author | Neil <nyamatongwe@gmail.com> | 2019-03-27 07:41:01 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2019-03-27 07:41:01 +1100 |
| commit | 398b9e7dd0b4abcaf2da82eb86467cf608b192f3 (patch) | |
| tree | 66a21d50bba24eb5e8490f0db6dc4d4f27461192 | |
| parent | e7f160f17678edb6aec046f4e4da5757bfadb932 (diff) | |
| download | scintilla-mirror-398b9e7dd0b4abcaf2da82eb86467cf608b192f3.tar.gz | |
Backport: Add <algorithm> for std::min/max. Standardize on _WIN32 to gate Win32 features.
Protect from windows.h definition of min/max.
Backport of changeset 7335:a10ed6f873e6.
| -rw-r--r-- | gtk/PlatGTK.cxx | 1 | ||||
| -rw-r--r-- | gtk/ScintillaGTK.cxx | 4 | ||||
| -rw-r--r-- | gtk/ScintillaGTKAccessible.cxx | 4 |
3 files changed, 7 insertions, 2 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 379a5a790..5301af13a 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -12,6 +12,7 @@ #include <string> #include <vector> #include <map> +#include <algorithm> #include <memory> #include <sstream> diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 1b5d16a13..d0f0a946d 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -28,7 +28,9 @@ #include <gdk/gdkwayland.h> #endif -#if defined(__WIN32__) || defined(_MSC_VER) +#if defined(_WIN32) +// On Win32 use windows.h to access clipboard (rectangular format) and systems parameters +#define NOMINMAX #include <windows.h> #endif diff --git a/gtk/ScintillaGTKAccessible.cxx b/gtk/ScintillaGTKAccessible.cxx index 84bf90c45..bd61d3d7b 100644 --- a/gtk/ScintillaGTKAccessible.cxx +++ b/gtk/ScintillaGTKAccessible.cxx @@ -77,7 +77,9 @@ # include <gtk/gtk-a11y.h> #endif -#if defined(__WIN32__) || defined(_MSC_VER) +#if defined(_WIN32) +// On Win32 use windows.h to access CLIPFORMAT +#define NOMINMAX #include <windows.h> #endif |
