diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-07-08 15:52:49 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-07-08 15:52:49 (GMT) |
commit | 528e0d1cac689310beecf02e56a10b764afa2651 (patch) | |
tree | 55b458aedb657440c0cd124f9d6d9f521153db6f /src/H5system.c | |
parent | 38bdc241ed4f62c9d628de563f6f98f3dda6281c (diff) | |
download | hdf5-528e0d1cac689310beecf02e56a10b764afa2651.zip hdf5-528e0d1cac689310beecf02e56a10b764afa2651.tar.gz hdf5-528e0d1cac689310beecf02e56a10b764afa2651.tar.bz2 |
[svn-r23869] HDFFV-8302: replace (v)snprintf with _(v)snprintf for windows. Merge from trunk along with other windows functions and HD prefix corrections.
HDFFV-8394: Add cmake code to package examples
Tested: local linux
Diffstat (limited to 'src/H5system.c')
-rw-r--r-- | src/H5system.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/H5system.c b/src/H5system.c index bc77131..2a94028 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -667,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 |