diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2013-07-31 23:49:47 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2013-07-31 23:49:47 (GMT) |
commit | e78fbfd2a2c8e7586d9f18cfeadd2a04b336ef18 (patch) | |
tree | e3b6e42b691c6ddf7ef9714c132cb922ae28b096 /src | |
parent | 3146ddb5c2fc5e57b72eb2ecce697a7016f92b3a (diff) | |
download | hdf5-e78fbfd2a2c8e7586d9f18cfeadd2a04b336ef18.zip hdf5-e78fbfd2a2c8e7586d9f18cfeadd2a04b336ef18.tar.gz hdf5-e78fbfd2a2c8e7586d9f18cfeadd2a04b336ef18.tar.bz2 |
[svn-r23959] Bring revisions #23745 - 23862 from trunk to revise_chunks.
h5committested.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Dpublic.h | 4 | ||||
-rw-r--r-- | src/H5Dscatgath.c | 6 | ||||
-rw-r--r-- | src/H5FDstdio.c | 4 | ||||
-rw-r--r-- | src/H5public.h | 4 | ||||
-rw-r--r-- | src/H5system.c | 27 | ||||
-rw-r--r-- | src/H5win32defs.h | 10 | ||||
-rw-r--r-- | src/Makefile.in | 2 |
7 files changed, 45 insertions, 12 deletions
diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h index 9a97627..44af139 100644 --- a/src/H5Dpublic.h +++ b/src/H5Dpublic.h @@ -116,7 +116,7 @@ typedef herr_t (*H5D_operator_t)(void *elem, hid_t type_id, unsigned ndim, const hsize_t *point, void *operator_data); /* Define the operator function pointer for H5Dscatter() */ -typedef herr_t (*H5D_scatter_func_t)(void **src_buf/*out*/, +typedef herr_t (*H5D_scatter_func_t)(const void **src_buf/*out*/, size_t *src_buf_bytes_used/*out*/, void *op_data); @@ -152,7 +152,7 @@ H5_DLL herr_t H5Dflush(hid_t dset_id); H5_DLL herr_t H5Drefresh(hid_t dset_id); H5_DLL herr_t H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, hid_t dst_space_id, void *dst_buf); -H5_DLL herr_t H5Dgather(hid_t src_space_id, void *src_buf, hid_t type_id, +H5_DLL herr_t H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, size_t dst_buf_size, void *dst_buf, H5D_gather_func_t op, void *op_data); H5_DLL herr_t H5Ddebug(hid_t dset_id); diff --git a/src/H5Dscatgath.c b/src/H5Dscatgath.c index 60a8800..4b0846f 100644 --- a/src/H5Dscatgath.c +++ b/src/H5Dscatgath.c @@ -925,7 +925,7 @@ H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, H5S_t *dst_space; /* Dataspace */ H5S_sel_iter_t iter; /* Selection iteration info*/ hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */ - void *src_buf = NULL; /* Source (contiguous) data buffer */ + const void *src_buf = NULL; /* Source (contiguous) data buffer */ size_t src_buf_nbytes = 0; /* Size of src_buf */ size_t type_size; /* Datatype element size */ hssize_t nelmts; /* Number of remaining elements in selection */ @@ -1018,8 +1018,8 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Dgather(hid_t src_space_id, void *src_buf, hid_t type_id, size_t dst_buf_size, - void *dst_buf, H5D_gather_func_t op, void *op_data) +H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, + size_t dst_buf_size, void *dst_buf, H5D_gather_func_t op, void *op_data) { H5T_t *type; /* Datatype */ H5S_t *src_space; /* Dataspace */ diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 9b1dbf9..36c21e1 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -417,7 +417,11 @@ H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id, } /* Get the file descriptor (needed for truncate and some Windows information) */ +#ifdef H5_HAVE_WIN32_API + file->fd = _fileno(file->fp); +#else /* H5_HAVE_WIN32_API */ file->fd = fileno(file->fp); +#endif /* H5_HAVE_WIN32_API */ if(file->fd < 0) { free(file); fclose(f); diff --git a/src/H5public.h b/src/H5public.h index 80d0a29..baead2d 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -75,10 +75,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 154 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 157 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "FA_a5" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.154-FA_a5" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.157-FA_a5" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/H5system.c b/src/H5system.c index a93a128..2a94028 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -189,7 +189,7 @@ HDfprintf(FILE *stream, const char *fmt, ...) } /* Extra type modifiers */ - if(HDstrchr("ZHhlqLI", *s)) { + if(HDstrchr("zZHhlqLI", *s)) { switch(*s) { /*lint --e{506} Don't issue warnings about constant value booleans */ /*lint --e{774} Don't issue warnings boolean within 'if' always evaluates false/true */ @@ -203,6 +203,7 @@ HDfprintf(FILE *stream, const char *fmt, ...) break; case 'Z': + case 'z': if(sizeof(size_t) < sizeof(long)) modifier[0] = '\0'; else if(sizeof(size_t) == sizeof(long)) @@ -666,6 +667,30 @@ Wgetlogin() return NULL; } +int c99_snprintf(char* str, size_t size, const char* format, ...) +{ + int count; + va_list ap; + + va_start(ap, format); + count = c99_vsnprintf(str, size, format, ap); + va_end(ap); + + return count; +} + +int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap) +{ + int count = -1; + + if (size != 0) + count = _vsnprintf_s(str, size, _TRUNCATE, format, ap); + if (count == -1) + count = _vscprintf(format, ap); + + return count; +} + #endif diff --git a/src/H5win32defs.h b/src/H5win32defs.h index e9b87625..d452925 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -29,6 +29,7 @@ typedef struct _stati64 h5_stat_t; typedef __int64 h5_stat_size_t; #define HDaccess(F,M) _access(F,M) +#define HDchdir(S) _chdir(S) #define HDclose(F) _close(F) #define HDdup(F) _dup(F) #define HDfdopen(N,S) _fdopen(N,S) @@ -47,16 +48,15 @@ typedef __int64 h5_stat_size_t; */ #define HDopen(S,F,M) _open(S,F|_O_BINARY,M) #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)) #define HDsleep(S) Sleep(S*1000) #define HDstat(S,B) _stati64(S,B) #define HDstrcasecmp(A,B) _stricmp(A,B) #define HDstrtoull(S,R,N) _strtoui64(S,R,N) #define HDstrdup(S) _strdup(S) -#define HDsnprintf _snprintf /*varargs*/ #define HDtzset() _tzset() #define HDunlink(S) _unlink(S) -#define HDvsnprintf(S,N,FMT,A) _vsnprintf(S,N,FMT,A) #define HDwrite(F,M,Z) _write(F,M,Z) #ifdef H5_HAVE_VISUAL_STUDIO @@ -75,11 +75,15 @@ struct timezone { #endif /* __cplusplus */ H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz); H5_DLL char* Wgetlogin(); + H5_DLL int c99_snprintf(char* str, size_t size, const char* format, ...); + H5_DLL int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap); #ifdef __cplusplus } #endif /* __cplusplus */ #define HDgettimeofday(V,Z) Wgettimeofday(V,Z) -#define HDgetlogin() Wgetlogin() +#define HDgetlogin() Wgetlogin() +#define HDsnprintf c99_snprintf /*varargs*/ +#define HDvsnprintf c99_vsnprintf #endif /* H5_HAVE_VISUAL_STUDIO */ diff --git a/src/Makefile.in b/src/Makefile.in index d7b0eb0..3087b72 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -525,7 +525,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 144 +LT_VERS_REVISION = 147 LT_VERS_AGE = 0 H5detect_CFLAGS = -g $(AM_CFLAGS) |