summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-11-08 15:32:53 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-11-08 15:32:53 (GMT)
commit0497e80b5017f0292a3232cfec4e268f9776d137 (patch)
treeadf245ba8f035a20cb91e688a2529e439674634c /configure.in
parentdd969f1eadfd2cd500f3f44415b85cfea7216794 (diff)
downloadhdf5-0497e80b5017f0292a3232cfec4e268f9776d137.zip
hdf5-0497e80b5017f0292a3232cfec4e268f9776d137.tar.gz
hdf5-0497e80b5017f0292a3232cfec4e268f9776d137.tar.bz2
[svn-r7829] Purpose:
Bug fix & code cleanup Description: Allowing the library to call malloc with a size of 0 bytes causes problems for some users, so we check for allocations of 0 bytes and disallow them now. Cleaned up some code which could call malloc with 0 size. Changed some code calling HDmalloc directly to call H5MM_malloc(), which allows us to check for 0 sized allocations. Platforms tested: FreeBSD 4.9 (sleipnir) too minor to require h5committest
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in24
1 files changed, 0 insertions, 24 deletions
diff --git a/configure.in b/configure.in
index da311a3..a2d7067 100644
--- a/configure.in
+++ b/configure.in
@@ -1697,30 +1697,6 @@ AC_DEFINE_UNQUOTED([PRINTF_LL_WIDTH], ["$hdf5_cv_printf_ll"],
[Width for printf() for type \`long long' or \`__int64', use \`ll'])
dnl ----------------------------------------------------------------------
-dnl Check if malloc(0) returns valid pointer
-dnl
-AC_MSG_CHECKING([if malloc of zero bytes returns valid pointer])
-AC_CACHE_VAL([hdf5_cv_malloc_works],
-[AC_TRY_RUN([
-#if STDC_HEADERS
-#include <stdlib.h>
-#endif
-
-int main(void)
-{
- exit(malloc (0) ? 0 : 1);
-}
-], [hdf5_cv_malloc_works=yes], [hdf5_cv_malloc_works=no],)])
-
-if test ${hdf5_cv_malloc_works} = "yes"; then
- AC_DEFINE([MALLOC_WORKS], [1],
- [Define if your system's \`malloc' function returns a valid pointer for 0-byte allocations.])
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-dnl ----------------------------------------------------------------------
dnl Check if pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM)
dnl is supported on this system
dnl