1-line compiler fix for GCC/MINGW/Windows

OK, so you need three or four lines to #ifdef correctly :slight_smile:

hdf5-1.10.5/src/H5win32defs.h: Line 57:
#define HDopen(S,F,…) _open(S, F | _O_BINARY, VA_ARGS)

Should be:
#ifdef GNU
#define HDopen(S,F,…) _open(S, F | _O_BINARY, ##VA_ARGS)
#else
#define HDopen(S,F,…) _open(S, F | _O_BINARY, VA_ARGS)
#endif

Both of these variadic define’s are non-standard vendor specific compiler instructions for dealing with the dangling comma of a variadic. It’s almost too small for a formal patch, but how do you guys like to receive trivial patches?

/bbaker

In the last message, replace GNU with __GNU__ and VA_ARGS with __VA_ARGS__. There is an argument to be made for using a formal patch system. I should have looked at the helpful preview.

/bbaker

Second correction. __GNUC__, not __GNU__.

Really should utilize a patch process. Would appreciate a blurb on how to submit patches to HDFGroup.

/bbaker

This is very nice, thanks for posting! I hope it makes it into the distribution!