mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-30 15:32:37 +08:00
[svn-r12141] Purpose:
portable issue on 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: h5commit(shanti is down) VS 6.0 on windows XP VS 8.0 on windows XP-64bit Misc. update:
This commit is contained in:
parent
d80639dda8
commit
36dda5514c
@ -152,6 +152,17 @@ in the file file_io.win32.c and including it on the projects
|
||||
|
||||
/* Check exception handling functions during data conversions */
|
||||
#define H5_WANT_DCONV_EXCEPTION 1
|
||||
#if _MSC_VER >=1400
|
||||
/* visual studio 2005 doesn't support size of setvbuf to be less thn 1,This is a hacking, we would like to wait
|
||||
visual studio 2005 to fix this problem.
|
||||
*/
|
||||
|
||||
#define HDsetvbuf(F,S,M,Z) (((Z)>1)?setvbuf(F,S,M,Z):setvbuf(F,S,M,2))
|
||||
|
||||
#else
|
||||
#define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z)
|
||||
#endif
|
||||
|
||||
|
||||
/* uncomment the following line if we want parallel HDF5 support */
|
||||
/* #define H5_HAVE_PARALLEL */
|
||||
|
Loading…
Reference in New Issue
Block a user