summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
authorScott Wegner <swegner@hdfgroup.org>2007-06-26 16:23:59 (GMT)
committerScott Wegner <swegner@hdfgroup.org>2007-06-26 16:23:59 (GMT)
commit21134e48e135c03ecad8dc35ea5dd803e0e9690b (patch)
treecae98f5ce6afcacfa151ed1c316d660aef7f3982 /src/H5private.h
parent0490b178003d70eeac1ec28791dd2d5cf8064355 (diff)
downloadhdf5-21134e48e135c03ecad8dc35ea5dd803e0e9690b.zip
hdf5-21134e48e135c03ecad8dc35ea5dd803e0e9690b.tar.gz
hdf5-21134e48e135c03ecad8dc35ea5dd803e0e9690b.tar.bz2
[svn-r13916] Purpose: Fix MinGW inconsistency
Description: Windows does not accept the buffer size parameter of setvbuf to be less than 2. Previously, we had our fix split between two files, H5private.h and the Windows H5pubconf.h. This was a problem for MinGW, because it generates its own H5private.h. This moves the fix out of H5pubconf.h and into H5private.h. This shouldn't affect other platforms. Tested: MinGW on WinXP
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5private.h b/src/H5private.h
index 493818f..184ef7c 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -772,8 +772,12 @@ int HDremove_all(const char * fname);
#define HDsetpgid(P,PG) setpgid(P,PG)
#define HDsetsid() setsid()
#define HDsetuid(U) setuid(U)
+/* Windows does not permit setting the buffer size to values
+ less than 2. */
#ifndef _WIN32
#define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z)
+#else
+#define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,(Z>1?Z:2))
#endif
#define HDsigaction(N,A) sigaction(N,A)
#define HDsigaddset(S,N) sigaddset(S,N)