From a71b77433ccf313086f326e72bb7055d94dec3d2 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 17 Dec 2018 14:33:33 -0800 Subject: Fixed an issue in the passthru Windows va_copy hack. --- src/H5VLpassthru.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/H5VLpassthru.c b/src/H5VLpassthru.c index bf81425..82c18af 100644 --- a/src/H5VLpassthru.c +++ b/src/H5VLpassthru.c @@ -42,9 +42,9 @@ /* #define ENABLE_PASSTHRU_LOGGING */ /* Windows missing va_copy() hack (from H5win2_defs.h) */ -#if (_MSC_VER < 1800) +#if defined(_WIN32) && (_MSC_VER < 1800) #define va_copy(D,S) ((D) = (S)) -#endif /* MSC_VER < 1800 */ +#endif /* defined(_WIN32) && (_MSC_VER < 1800) */ /************/ /* Typedefs */ -- cgit v0.12 From a7618f432b671ad041ae63a83bf9b9bb08096dbe Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 17 Dec 2018 14:48:39 -0800 Subject: Updated with extra sanity check and improved comment. --- src/H5VLpassthru.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/H5VLpassthru.c b/src/H5VLpassthru.c index 82c18af..49102d7 100644 --- a/src/H5VLpassthru.c +++ b/src/H5VLpassthru.c @@ -41,10 +41,12 @@ /* (Uncomment to enable) */ /* #define ENABLE_PASSTHRU_LOGGING */ -/* Windows missing va_copy() hack (from H5win2_defs.h) */ -#if defined(_WIN32) && (_MSC_VER < 1800) +/* Hack for missing va_copy() in old Visual Studio editions + * (from H5win2_defs.h - used on VS2012 and earlier) + */ +#if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER < 1800) #define va_copy(D,S) ((D) = (S)) -#endif /* defined(_WIN32) && (_MSC_VER < 1800) */ +#endif /************/ /* Typedefs */ -- cgit v0.12