summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-03-30 14:47:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-03-30 14:47:36 (GMT)
commit6a664ffa5aba85eb2d35526fa9d41a5b69f7f21d (patch)
tree85e4273747035ee91732d18146e3438fdb306b26 /tools/lib
parent2b3e867b8499068ec6acf1f5e5b80ca698fca913 (diff)
downloadhdf5-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 'tools/lib')
-rw-r--r--tools/lib/h5tools_str.c6
-rw-r--r--tools/lib/h5tools_utils.c19
2 files changed, 2 insertions, 23 deletions
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index ac191d6..22518d6 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -155,11 +155,7 @@ h5tools_str_append(h5tools_str_t *str/*in,out*/, const char *fmt, ...)
* to lack of buffer size, so try one more time after realloc more
* buffer size before return NULL.
*/
- if (nchars < 0
-#ifndef H5_VSNPRINTF_WORKS
- && (HDstrlen(str->s) < str->nalloc)
-#endif
- ) {
+ if (nchars < 0) {
/* failure, such as bad format */
return NULL;
}
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index d7c5adb..fc8cf1d 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -89,28 +89,11 @@ void parallel_print(const char* format, ...)
HDvprintf(format, ap);
else {
if(overflow_file == NULL) /*no overflow has occurred yet */ {
-#if 0
- printf("calling HDvsnprintf: OUTBUFF_SIZE=%ld, outBuffOffset=%ld, ", (long)OUTBUFF_SIZE, (long)outBuffOffset);
-#endif
bytes_written = HDvsnprintf(outBuff+outBuffOffset, OUTBUFF_SIZE-outBuffOffset, format, ap);
-#if 0
- printf("bytes_written=%ld\n", (long)bytes_written);
-#endif
HDva_end(ap);
HDva_start(ap, format);
-#if 0
- printf("Result: bytes_written=%ld, OUTBUFF_SIZE-outBuffOffset=%ld\n", (long)bytes_written, (long)OUTBUFF_SIZE-outBuffOffset);
-#endif
-
- if ((bytes_written < 0) ||
-#ifdef H5_VSNPRINTF_WORKS
- (bytes_written >= (OUTBUFF_SIZE-outBuffOffset))
-#else
- ((bytes_written+1) == (OUTBUFF_SIZE-outBuffOffset))
-#endif
- )
- {
+ if((bytes_written < 0) || (bytes_written >= (OUTBUFF_SIZE - outBuffOffset))) {
/* Terminate the outbuff at the end of the previous output */
outBuff[outBuffOffset] = '\0';