summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMuQun Yang <ymuqun@hdfgroup.org>2006-03-23 02:20:12 (GMT)
committerMuQun Yang <ymuqun@hdfgroup.org>2006-03-23 02:20:12 (GMT)
commit54f02fdaf2e449834f48817a15c8b8a0aa8eed1f (patch)
treed1b453a930d65d77101954d080f9d939238f6166
parent391e4743798a3bd02dc0ad673fa2da9dcdaf3510 (diff)
downloadhdf5-54f02fdaf2e449834f48817a15c8b8a0aa8eed1f.zip
hdf5-54f02fdaf2e449834f48817a15c8b8a0aa8eed1f.tar.gz
hdf5-54f02fdaf2e449834f48817a15c8b8a0aa8eed1f.tar.bz2
[svn-r12139] Purpose:
portibility issue to windows Description: setvbuf on visual studio 2005 needs the size to be greater or equal to 2. <description of setvbuf from msdn library> Buffer size in bytes. Allowable range: 2 <= size <= INT_MAX (2147483647). Internally, the value supplied for size is rounded down to the nearest multiple of 2. h5import used linebuffer option of setvbuf for stderr and stdout and the size is 0 by default. This causes core dump with visual 2005 on windows 64-bit. Solution: 1. Use HDsetvbuf inside h5import.c, 2. Define HDsetvbuf inside windows H5pubconf.h for windows to work around the core dump of h5import test. This is probably a bug inside visual studio 2005. Platforms tested: h5committest windows 6.0 at XP visual 2005 at XP-64bit Misc. update:
-rw-r--r--src/H5private.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/H5private.h b/src/H5private.h
index cf16bce..263b529 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -806,7 +806,9 @@ int HDremove_all(char * fname);
#define HDsetpgid(P,PG) setpgid(P,PG)
#define HDsetsid() setsid()
#define HDsetuid(U) setuid(U)
+#ifndef WIN32
#define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z)
+#endif
#define HDsigaction(N,A) sigaction(N,A)
#define HDsigaddset(S,N) sigaddset(S,N)
#define HDsigdelset(S,N) sigdelset(S,N)