diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-01-24 18:50:31 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-01-24 18:50:31 (GMT) |
commit | 24c134e28b8f2229d91a5a48ac285bf6f5fc5b94 (patch) | |
tree | 235c6fcecfb37c439e38ebe7f5e83b6b74e839b1 /configure.in | |
parent | 68e5b3e014da798e8959230106de917ca898e82f (diff) | |
download | hdf5-24c134e28b8f2229d91a5a48ac285bf6f5fc5b94.zip hdf5-24c134e28b8f2229d91a5a48ac285bf6f5fc5b94.tar.gz hdf5-24c134e28b8f2229d91a5a48ac285bf6f5fc5b94.tar.bz2 |
[svn-r9865] Purpose:
Bug fix
Description:
Catch another way that vsnprintf() can fail (this time on the HP) and
deal with that.
Platforms tested:
HP/UX 11.x (kelgia)
Doesn't affect other platforms
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/configure.in b/configure.in index 09ae750..183588b 100644 --- a/configure.in +++ b/configure.in @@ -1653,7 +1653,15 @@ AC_CHECK_FUNCS(vsnprintf, dnl Check if vsnprintf() returns correct size for strings that don't fit dnl into the size allowed. If vsnprintf() works correctly on this platform, - dnl it should return a value larger than 15 for the test below + dnl it should return a value of 42 for the test below + dnl + dnl Note that vsnprintf fails in two different ways: + dnl - In IRIX64, calls to vnsprintf() with a formatted string that + dnl is larger than the buffer size allowed incorrectly + dnl return the size of the buffer minus one. + dnl - In HP/UX, calls to vsnprintf() with a formatted string that + dnl is larger than the buffer size allowed incorrectly + dnl return (-1) AC_MSG_CHECKING([if vsnprintf returns correct value]) AC_CACHE_VAL([hdf5_cv_vsnprintf_works], @@ -1672,7 +1680,7 @@ int test_vsnprintf(const char *fmt,...) ret=vsnprintf(s,16,"%s",ap); va_end(ap); - return(ret==15 ? 1 : 0); + return(ret!=42 ? 1 : 0); } int main(void) |