diff options
author | Quincey Koziol <koziol@lbl.gov> | 2021-07-14 01:30:11 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@lbl.gov> | 2021-07-14 01:30:11 (GMT) |
commit | 929736cfb04df132e60df98c772db0db17dc0306 (patch) | |
tree | a74e91cbea2470736d774365e38eb25fb28d2996 /src | |
parent | ac38154c425b1de0bc67aa8987f9644130b0db34 (diff) | |
parent | 6b94bf50a06a9e20c6893514bfa141b69dbca0d1 (diff) | |
download | hdf5-929736cfb04df132e60df98c772db0db17dc0306.zip hdf5-929736cfb04df132e60df98c772db0db17dc0306.tar.gz hdf5-929736cfb04df132e60df98c772db0db17dc0306.tar.bz2 |
Merge remote-tracking branch 'origin/develop' into post_open_fix
Diffstat (limited to 'src')
-rw-r--r-- | src/H5private.h | 13 | ||||
-rw-r--r-- | src/H5system.c | 6 |
2 files changed, 9 insertions, 10 deletions
diff --git a/src/H5private.h b/src/H5private.h index e419131..60fec4f 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -106,22 +106,21 @@ #define H5_DEFAULT_VOL H5VL_NATIVE #ifdef H5_HAVE_WIN32_API + /* The following two defines must be before any windows headers are included */ #define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */ #define NOGDI /* Exclude Graphic Display Interface macros */ -#ifdef H5_HAVE_WINSOCK2_H -#include <winsock2.h> -#endif +#include <windows.h> + +#include <direct.h> /* For _getcwd() */ +#include <io.h> /* POSIX I/O */ +#include <winsock2.h> /* For GetUserName() */ #ifdef H5_HAVE_THREADSAFE #include <process.h> /* For _beginthread() */ #endif -#include <windows.h> -#include <direct.h> /* For _getcwd() */ -#include <io.h> /* POSIX I/O */ - #endif /*H5_HAVE_WIN32_API*/ #ifndef F_OK diff --git a/src/H5system.c b/src/H5system.c index 0849373..eba8341 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -365,7 +365,7 @@ Wsetenv(const char *name, const char *value, int overwrite) return (int)_putenv_s(name, value); } /* end Wsetenv() */ -#ifdef H5_HAVE_WINSOCK2_H +#ifdef H5_HAVE_WIN32_API #pragma comment(lib, "advapi32.lib") #endif @@ -450,12 +450,12 @@ char * Wgetlogin(void) { -#ifdef H5_HAVE_WINSOCK2_H +#ifdef H5_HAVE_WIN32_API DWORD bufferCount = WloginBuffer_count; if (GetUserName(Wlogin_buffer, &bufferCount) != 0) return (Wlogin_buffer); else -#endif /* H5_HAVE_WINSOCK2_H */ +#endif return NULL; } |