[geos-commits] r4097 - in trunk: . include/geos
svn_geos at osgeo.org
svn_geos at osgeo.org
Sat Oct 3 14:21:11 PDT 2015
Author: mloskot
Date: 2015-10-03 14:21:11 -0700 (Sat, 03 Oct 2015)
New Revision: 4097
Modified:
trunk/CMakeLists.txt
trunk/include/geos/timeval.h
Log:
Move Windows-specific NOMINMAX preprocessor definition from CMake to timeval.h.
Assume timeval.h is the only place where Windows-specific headers are included.
Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt 2015-10-03 20:58:35 UTC (rev 4096)
+++ trunk/CMakeLists.txt 2015-10-03 21:21:11 UTC (rev 4097)
@@ -135,7 +135,6 @@
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
- add_definitions(-DNOMINMAX)
endif()
endif()
Modified: trunk/include/geos/timeval.h
===================================================================
--- trunk/include/geos/timeval.h 2015-10-03 20:58:35 UTC (rev 4096)
+++ trunk/include/geos/timeval.h 2015-10-03 21:21:11 UTC (rev 4097)
@@ -18,10 +18,22 @@
#ifndef GEOS_TIMEVAL_H
#define GEOS_TIMEVAL_H
+#if !defined(_WIN32)
+#error This header is dedicated to Windows platform only
+#endif
+
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
+#ifndef NOMINMAX
+#define NOMINMAX
+#endif
+
+#ifndef STRICT
+#define STRICT
+#endif
+
#include <winsock2.h>
#include <time.h>
More information about the geos-commits
mailing list