Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Modules/ThirdParty/HDF5/src/itkhdf5/src/H5win32defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ typedef __int64 h5_stat_size_t;
* Also note that the variadic macro is using a VC++ extension
* where the comma is dropped if nothing is passed to the ellipsis.
*/
#define HDopen(S,F,...) _open(S, F | _O_BINARY, __VA_ARGS__)
#define HDread(F,M,Z) _read(F,M,Z)
#define HDrmdir(S) _rmdir(S)
#define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,(Z>1?Z:2))
Expand All @@ -68,6 +67,15 @@ typedef __int64 h5_stat_size_t;

#ifdef H5_HAVE_VISUAL_STUDIO

/* _O_BINARY must be set in Windows to avoid CR-LF <-> LF EOL
* transformations when performing I/O. Note that this will
* produce Unix-style text files, though.
*
* Also note that the variadic macro is using a VC++ extension
* where the comma is dropped if nothing is passed to the ellipsis.
*/
#define HDopen(S,F,...) _open(S, F | _O_BINARY, __VA_ARGS__)

#if (_MSC_VER < 1800)
#ifndef H5_HAVE_STRTOLL
#define HDstrtoll(S,R,N) _strtoi64(S,R,N)
Expand Down Expand Up @@ -150,6 +158,7 @@ extern "C" {
#define HDpthread_self_ulong() ((unsigned long)GetCurrentThreadId())

#ifndef H5_HAVE_MINGW
#define HDopen(S,F,M) _open(S, F | _O_BINARY, M)
#define HDftruncate(F,L) _chsize_s(F,L)
#define HDfseek(F,O,W) _fseeki64(F,O,W)
#endif /* H5_HAVE_MINGW */
Expand Down