diff options
Diffstat (limited to 'newlib/configure.in')
-rw-r--r-- | newlib/configure.in | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/newlib/configure.in b/newlib/configure.in index 9465787ed..fbe5b7b63 100644 --- a/newlib/configure.in +++ b/newlib/configure.in @@ -617,6 +617,47 @@ if test $newlib_cv_ldbl_eq_dbl = yes; then AC_DEFINE_UNQUOTED(_LDBL_EQ_DBL) fi +#### Determine if uintptr_t is unsigned long long +AC_CACHE_CHECK(whether uintptr_t equals unsigned long long, + newlib_cv_uintptr_eq_ulonglong, [dnl +cat > conftest.c <<EOF +#include <inttypes.h> +extern int foo(uintptr_t); +extern int foo(unsigned long long); +EOF +if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c + 1>&AS_MESSAGE_LOG_FD]) +then + newlib_cv_uintptr_eq_ulonglong=yes; +else + newlib_cv_uintptr_eq_ulonglong=no; +fi +rm -f conftest*]) +if test $newlib_cv_uintptr_eq_ulonglong = yes; then + AC_DEFINE_UNQUOTED(_UINTPTR_EQ_ULONGLONG) +else +#### Determine if uintptr_t is unsigned long +AC_CACHE_CHECK(whether uintptr_t equals unsigned long, + newlib_cv_uintptr_eq_ulong, [dnl +cat > conftest.c <<EOF +#include <inttypes.h> +extern int foo(uintptr_t); +extern int foo(unsigned long); +EOF +if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c + 1>&AS_MESSAGE_LOG_FD]) +then + newlib_cv_uintptr_eq_ulong=yes; +else + newlib_cv_uintptr_eq_ulong=no; +fi +rm -f conftest*]) +if test $newlib_cv_uintptr_eq_ulong = yes; then + AC_DEFINE_UNQUOTED(_UINTPTR_EQ_ULONG) +fi +fi + + AC_SUBST(CFLAGS) AC_CONFIG_FILES([Makefile], |