From c09abb325060bc8543769e5119adea114dbfa4af Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 3 Jun 2010 17:22:34 -0500 Subject: [svn-r18965] Windows use of VC_EXTRALEAN no longer did anything. It has been replaced by WIN32_LEAN_AND_MEAN macro. This was the cause of a define conflict causing the use of grp1 and grp2 to be replaced with constants in the h5dumpgentest.c file. This also affected the use of the #include needed by gethostname. The new include: winsock2.h has been added to h5private.h and either removed or updated in the other files. Tested: Windows --- ConfigureChecks.cmake | 2 +- perform/iopipe.c | 7 ------- perform/sio_timer.h | 2 +- src/H5private.h | 6 +++++- test/h5test.c | 2 +- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index d0ba2e2..913ea64 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -228,7 +228,7 @@ CHECK_INCLUDE_FILE_CONCAT ("memory.h" H5_HAVE_MEMORY_H) CHECK_INCLUDE_FILE_CONCAT ("dlfcn.h" H5_HAVE_DLFCN_H) CHECK_INCLUDE_FILE_CONCAT ("features.h" H5_HAVE_FEATURES_H) CHECK_INCLUDE_FILE_CONCAT ("inttypes.h" H5_HAVE_INTTYPES_H) -CHECK_INCLUDE_FILE_CONCAT ("winsock.h" H5_HAVE_WINSOCK_H) +CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" H5_HAVE_WINSOCK_H) CHECK_INCLUDE_FILE_CONCAT ("netinet/in.h" H5_HAVE_NETINET_IN_H) diff --git a/perform/iopipe.c b/perform/iopipe.c index 0667995..77d4fc8 100644 --- a/perform/iopipe.c +++ b/perform/iopipe.c @@ -21,13 +21,6 @@ /* See H5private.h for how to include headers */ #include "hdf5.h" -#ifdef H5_HAVE_WINSOCK_H -#include -#endif - -/*Winsock.h includes windows.h, due to the different value of -WINVER, windows.h should be put before H5private.h. Kent yang 6/21/2001*/ - #if defined (__MWERKS__) #ifdef H5_HAVE_SYS_TIMEB #undef H5_HAVE_SYS_TIMEB diff --git a/perform/sio_timer.h b/perform/sio_timer.h index 943ce28..82f053d 100644 --- a/perform/sio_timer.h +++ b/perform/sio_timer.h @@ -27,7 +27,7 @@ #endif #ifdef _WIN32 -# include +# include #endif /* _WIN32 */ /* The different types of timers we can have */ diff --git a/src/H5private.h b/src/H5private.h index 386a3e2..b606407 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -142,7 +142,11 @@ #ifdef _WIN32 -#define VC_EXTRALEAN /*Exclude rarely-used stuff from Windows headers */ +#ifdef H5_HAVE_WINSOCK_H +#include +#endif + +#define WIN32_LEAN_AND_MEAN /*Exclude rarely-used stuff from Windows headers */ #include #include /* For _getcwd() */ diff --git a/test/h5test.c b/test/h5test.c index 10ca47e..229efec 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -30,7 +30,7 @@ #ifdef _WIN32 #include #include -#include +#include #endif /* _WIN32 */ /* -- cgit v0.12