diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2015-03-23 22:16:28 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2015-03-23 22:16:28 (GMT) |
commit | 61b5fa8e2d69ce651ba4dd4757350be347c660a6 (patch) | |
tree | 68d90395fc95c994acc4f81f5618494a1c5475d3 /src | |
parent | b424ce1b3f357b50cea356a00d61c46d67345926 (diff) | |
download | hdf5-61b5fa8e2d69ce651ba4dd4757350be347c660a6.zip hdf5-61b5fa8e2d69ce651ba4dd4757350be347c660a6.tar.gz hdf5-61b5fa8e2d69ce651ba4dd4757350be347c660a6.tar.bz2 |
[svn-r26551] Description:
Remove the VSNPRINTF_WORKS macro, it's working around bugs in old SGI
& HP compilers.
Tested on:
MacOSX/64 10.10.2 (amazon) w/serial & parallel
(h5committest not required on this branch)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5E.c | 16 | ||||
-rw-r--r-- | src/H5Eint.c | 16 |
2 files changed, 2 insertions, 30 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 */ diff --git a/src/H5Eint.c b/src/H5Eint.c index 88dfdee..2092566 100644 --- a/src/H5Eint.c +++ b/src/H5Eint.c @@ -741,17 +741,7 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin HGOTO_DONE(FAIL) /* 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); @@ -760,11 +750,7 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin 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_DONE(FAIL) } /* end while */ |