From 89ebc2b77867d74679c434fbf7f73891ea9e1e47 Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Thu, 1 Jun 2017 14:48:23 -0600 Subject: [PATCH] Fixed an issue on visual studio which can result in a race state (more or less) when dap4 AND hdf4 support is enabled. --- config.h.cmake.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config.h.cmake.in b/config.h.cmake.in index c1bf7fa7f..0db40ccd2 100644 --- a/config.h.cmake.in +++ b/config.h.cmake.in @@ -3,6 +3,18 @@ #ifdef _MSC_VER +/* Prevent an issue where there is a circular inclusion + of winsock.h/windows.h. This weird state occurs with + libdap4 and hdf4 support. The solution comes from the + following URL, found after a bit of research. + + Added in support of the 4.5.0-rc1. Hello, future generations. + + * https://stackoverflow.com/questions/1372480/c-redefinition-header-files-winsock2-h + + */ + #define _WINSOCKAPI_ + #if _MSC_VER>=1900 #define STDC99 #endif