diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2015-03-28 00:37:08 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2015-03-28 00:37:08 (GMT) |
commit | 6f75afd15ef87c7075512fa76422369320828717 (patch) | |
tree | 1a9c4c5d8f1685668a049a6f261f1eef2bcfe039 /configure.ac | |
parent | 68decbbc42e7b267c1301d2bd98c47014648dff8 (diff) | |
download | hdf5-6f75afd15ef87c7075512fa76422369320828717.zip hdf5-6f75afd15ef87c7075512fa76422369320828717.tar.gz hdf5-6f75afd15ef87c7075512fa76422369320828717.tar.bz2 |
[svn-r26635] Description:
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 branch for 2+ days)
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 54 |
1 files changed, 1 insertions, 53 deletions
diff --git a/configure.ac b/configure.ac index ea7608c..bf13fbf 100644 --- a/configure.ac +++ b/configure.ac @@ -1854,59 +1854,7 @@ AC_CHECK_FUNCS([gethostname getpwuid getrusage gettimeofday]) AC_CHECK_FUNCS([lstat rand_r random setsysinfo]) AC_CHECK_FUNCS([signal longjmp setjmp siglongjmp sigsetjmp sigprocmask]) AC_CHECK_FUNCS([snprintf srandom strdup symlink system]) -AC_CHECK_FUNCS([tmpfile asprintf vasprintf waitpid]) - -## Check for vsnprintf() separately, so we can detect situations where it -## doesn't return the correct size for formatted strings that are too large -## for the buffer provided -AC_CHECK_FUNCS([vsnprintf], - - ## Check if vsnprintf() returns correct size for strings that don't fit - ## into the size allowed. If vsnprintf() works correctly on this platform, - ## it should return a value of 42 for the test below - ## - ## Note that vsnprintf fails in two different ways: - ## - In IRIX64, calls to vnsprintf() with a formatted string that - ## is larger than the buffer size allowed incorrectly - ## return the size of the buffer minus one. - ## - In HP/UX, calls to vsnprintf() with a formatted string that - ## is larger than the buffer size allowed incorrectly - ## return (-1) - AC_MSG_CHECKING([if vsnprintf returns correct value]) - - AC_CACHE_VAL([hdf5_cv_vsnprintf_works], - AC_TRY_RUN([ -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> - -int test_vsnprintf(const char *fmt,...) -{ - va_list ap; - char *s = malloc(16); - int ret; - - va_start(ap, fmt); - ret=vsnprintf(s,16,"%s",ap); - va_end(ap); - - return(ret!=42 ? 1 : 0); -} - -int main(void) -{ - exit(test_vsnprintf("%s","A string that is longer than 16 characters")); -} - ],[hdf5_cv_vsnprintf_works=yes],[hdf5_cv_vsnprintf_works=no],)) - - if test ${hdf5_cv_vsnprintf_works} = "yes"; then - AC_MSG_RESULT([yes]) - AC_DEFINE([VSNPRINTF_WORKS], [1], - [Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed]) - else - AC_MSG_RESULT([no]) - fi - ,) +AC_CHECK_FUNCS([tmpfile asprintf vasprintf vsnprintf waitpid]) ## ---------------------------------------------------------------------- ## Check that a lone colon can be used as an argument |