diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2015-03-30 14:47:36 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2015-03-30 14:47:36 (GMT) |
commit | 6a664ffa5aba85eb2d35526fa9d41a5b69f7f21d (patch) | |
tree | 85e4273747035ee91732d18146e3438fdb306b26 /src/H5E.c | |
parent | 2b3e867b8499068ec6acf1f5e5b80ca698fca913 (diff) | |
download | hdf5-6a664ffa5aba85eb2d35526fa9d41a5b69f7f21d.zip hdf5-6a664ffa5aba85eb2d35526fa9d41a5b69f7f21d.tar.gz hdf5-6a664ffa5aba85eb2d35526fa9d41a5b69f7f21d.tar.bz2 |
[svn-r26648] Description:
Bring r26635 from trunk to 1.8 branch:
Bring r26651 from autotools_rework branch to trunk:
Remove the VSNPRINTF_WORKS macro, it's working around bugs in old SGI
& HP compilers.
Tested on:
Linux/32 2.6.18 (jam) w/serial & parallel
(Daily tested on trunk for 2+ days)
Diffstat (limited to 'src/H5E.c')
-rw-r--r-- | src/H5E.c | 16 |
1 files changed, 1 insertions, 15 deletions
@@ -1397,17 +1397,7 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") /* If the description doesn't fit into the initial buffer size, allocate more space and try again */ - while((desc_len = HDvsnprintf(tmp, (size_t)tmp_len, fmt, ap)) -#ifdef H5_VSNPRINTF_WORKS - > -#else /* H5_VSNPRINTF_WORKS */ - >= -#endif /* H5_VSNPRINTF_WORKS */ - (tmp_len - 1) -#ifndef H5_VSNPRINTF_WORKS - || (desc_len < 0) -#endif /* H5_VSNPRINTF_WORKS */ - ) { + while((desc_len = HDvsnprintf(tmp, (size_t)tmp_len, fmt, ap)) > (tmp_len - 1)) { /* shutdown & restart the va_list */ va_end(ap); va_start(ap, fmt); @@ -1416,11 +1406,7 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, H5MM_xfree(tmp); /* Allocate a description of the appropriate length */ -#ifdef H5_VSNPRINTF_WORKS tmp_len = desc_len + 1; -#else /* H5_VSNPRINTF_WORKS */ - tmp_len = 2 * tmp_len; -#endif /* H5_VSNPRINTF_WORKS */ if(NULL == (tmp = H5MM_malloc((size_t)tmp_len))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") } /* end while */ |