PatchSet 5638 Date: 2005/04/01 20:15:26 Author: robilad Branch: HEAD Tag: (none) Log: FreeBSD 4.8 build fix
2005-04-01 Supreet Sethi <[EMAIL PROTECTED]> * configure.ac: Check for uintmax_t and intmax_t. * config/i386/atomic.h: Only use uintmax_t and intmax_t if the types are available. Members: ChangeLog:1.3808->1.3809 configure:1.441->1.442 configure.ac:1.131->1.132 config/config.h.in:1.140->1.141 config/i386/atomic.h:1.2->1.3 Index: kaffe/ChangeLog diff -u kaffe/ChangeLog:1.3808 kaffe/ChangeLog:1.3809 --- kaffe/ChangeLog:1.3808 Fri Apr 1 17:21:50 2005 +++ kaffe/ChangeLog Fri Apr 1 20:15:26 2005 @@ -1,3 +1,10 @@ +2005-04-01 Supreet Sethi <[EMAIL PROTECTED]> + + * configure.ac: Check for uintmax_t and intmax_t. + + * config/i386/atomic.h: Only use uintmax_t and intmax_t if + the types are available. + 2005-04-01 Guilhem Lavaux <[EMAIL PROTECTED]> * kaffe/kaffevm/systems/unix-pthreads/thread-impl.c Index: kaffe/configure diff -u kaffe/configure:1.441 kaffe/configure:1.442 --- kaffe/configure:1.441 Thu Mar 31 11:55:09 2005 +++ kaffe/configure Fri Apr 1 20:15:29 2005 @@ -34367,6 +34367,134 @@ _ACEOF fi +echo "$as_me:$LINENO: checking for uintmax_t" >&5 +echo $ECHO_N "checking for uintmax_t... $ECHO_C" >&6 +if test "${ac_cv_type_uintmax_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((uintmax_t *) 0) + return 0; +if (sizeof (uintmax_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_uintmax_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_uintmax_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_uintmax_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintmax_t" >&6 +if test $ac_cv_type_uintmax_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_UINTMAX_T 1 +_ACEOF + + +fi +echo "$as_me:$LINENO: checking for intmax_t" >&5 +echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6 +if test "${ac_cv_type_intmax_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((intmax_t *) 0) + return 0; +if (sizeof (intmax_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_intmax_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_intmax_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_intmax_t" >&5 +echo "${ECHO_T}$ac_cv_type_intmax_t" >&6 +if test $ac_cv_type_intmax_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_INTMAX_T 1 +_ACEOF + + +fi echo "$as_me:$LINENO: checking for uint_fast8_t" >&5 echo $ECHO_N "checking for uint_fast8_t... $ECHO_C" >&6 Index: kaffe/configure.ac diff -u kaffe/configure.ac:1.131 kaffe/configure.ac:1.132 --- kaffe/configure.ac:1.131 Thu Mar 31 11:55:15 2005 +++ kaffe/configure.ac Fri Apr 1 20:15:34 2005 @@ -1279,7 +1279,7 @@ if test x"$ac_cv_typedef_bool" = x"yes"; then AC_DEFINE(HAVE_BOOL, 1, [Do we have bool]) fi - +AC_CHECK_TYPES([uintmax_t, intmax_t]) AC_CHECK_TYPES([uint_fast8_t,int_fast8_t,uint_fast16_t,int_fast16_t]) AC_CHECK_TYPES([uint_fast32_t,int_fast32_t,uint_fast64_t,int_fast64_t]) Index: kaffe/config/config.h.in diff -u kaffe/config/config.h.in:1.140 kaffe/config/config.h.in:1.141 --- kaffe/config/config.h.in:1.140 Sat Mar 26 09:40:00 2005 +++ kaffe/config/config.h.in Fri Apr 1 20:15:35 2005 @@ -242,6 +242,9 @@ /* Define to 1 if the system has the type `int8'. */ #undef HAVE_INT8 +/* Define to 1 if the system has the type `intmax_t'. */ +#undef HAVE_INTMAX_T + /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H @@ -668,6 +671,9 @@ /* Define to 1 if the system has the type `uint8'. */ #undef HAVE_UINT8 + +/* Define to 1 if the system has the type `uintmax_t'. */ +#undef HAVE_UINTMAX_T /* Define to 1 if the system has the type `uint_fast16_t'. */ #undef HAVE_UINT_FAST16_T Index: kaffe/config/i386/atomic.h diff -u kaffe/config/i386/atomic.h:1.2 kaffe/config/i386/atomic.h:1.3 --- kaffe/config/i386/atomic.h:1.2 Sat Mar 26 09:40:00 2005 +++ kaffe/config/i386/atomic.h Fri Apr 1 20:15:35 2005 @@ -81,9 +81,17 @@ typedef intptr_t atomicptr_t; typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; +#if defined(HAVE_UINTMAX_T) typedef uintmax_t uatomic_max_t; +#else +typedef uint64_t uatomic_max_t; +#endif +#if defined(HAVE_INTMAX_T) +typedef intmax_t atomic_max_t; +#else +typedef int64_t atomic_max_t; +#endif #ifndef LOCK_PREFIX # ifdef UP _______________________________________________ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe