[svn-r4231] Purpose:

Bug fix.
Description:
    On some systems (linux when not using gcc) the 'dev_t' is not actually
    a scalar variable.  This causes the code which compares dev_t's in
    the file drivers to not compile.
Solution:
    Detect this and set the DEV_T_IS_SCALAR flag so we can code around it
    in the file drivers.
Platforms tested:
    FreeBSD 4.3 (hawkwind), Linux 2.4.2 (chiba city cluster at Argonne)
This commit is contained in:
Quincey Koziol 2001-07-17 16:24:38 -05:00
parent 458621172b
commit 857e0e6e57
2 changed files with 405 additions and 384 deletions

756
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -561,6 +561,20 @@ AC_CHECK_SIZEOF(off_t, 4)
dnl Checkpoint the cache
AC_CACHE_SAVE
dnl ----------------------------------------------------------------------
dnl Check if the dev_t type is a scalar type (must come after the check for
dnl sys/types.h)
AC_MSG_CHECKING([if dev_t is scalar])
AC_TRY_COMPILE([
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
],
[dev_t d1, d2; if(d1==d2) return 0;],
AC_DEFINE(DEV_T_IS_SCALAR) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
dnl ----------------------------------------------------------------------
dnl Is HDF4 present? If so then we can compile the hdf4 related tools.
dnl The HDF4 software has 4 component libraries (df, mfhdf, z, jpeg)
@ -1140,7 +1154,7 @@ int main(void)
sprintf(s,"%${hdf5_cv_printf_ll}d",x);
exit(strcmp(s,"1099511627776"));
}
], break,,)
], break,,continue)
done)
AC_MSG_RESULT(%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u)
@ -1464,7 +1478,7 @@ int main(int argc, char **argv)
],
AC_MSG_RESULT(no),
AC_MSG_RESULT(yes)
CPPFLAGS="$CPPFLAGS -DMPI_GET_COUNT_WORKS")
CPPFLAGS="$CPPFLAGS -DMPI_GET_COUNT_WORKS",AC_MSG_RESULT(no))
fi
dnl ----------------------------------------------------------------------
@ -1695,6 +1709,8 @@ touch ./config/stamp2
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
dnl We don't want inline defined for C++ compilers
dnl Don't worry about the C++ ifdef wrappers in the H5pubconf file, since
dnl 'H5_inline' isn't a C++ keyword.
cat >> src/H5config.h <<EOF
/* inline is a keyword in C++. If this is a C++ compiler, undefine it */
@ -1703,16 +1719,3 @@ cat >> src/H5config.h <<EOF
#endif
EOF
dnl Put the C++ ifdef wrappers in the H5pubconf file as well, but only
dnl if it's not there already.
if (grep __cplusplus src H5pubconf.h) >/dev/null 2>&1; then
:
else
cat >> src/H5pubconf.h <<EOF
/* inline is a keyword in C++. If this is a C++ compiler, undefine it */
#if defined(__cplusplus) && defined(inline)
#undef inline
#endif
EOF
fi