This commit is contained in:
chris
2003-03-01 14:04:23 +00:00
parent 0d66972bef
commit 55aa26756b

View File

@@ -80,8 +80,7 @@ dnl
for type in u_int8_t u_int16_t u_int32_t ; do for type in u_int8_t u_int16_t u_int32_t ; do
AC_MSG_CHECKING([size of $type]) AC_MSG_CHECKING([size of $type])
defn="SIZEOF_"`echo $type | tr a-z A-Z` AC_RUN_IFELSE([
AC_TRY_RUN([
#include <sys/types.h> #include <sys/types.h>
#include <stdio.h> #include <stdio.h>
int main() { int main() {
@@ -98,6 +97,9 @@ int main() {
], [ ], [
eval "size_$type=0" eval "size_$type=0"
AC_MSG_RESULT([unknown type]) AC_MSG_RESULT([unknown type])
], [
eval "size_$type=0"
AC_MSG_RESULT([can't determine when cross-compiling])
]) ])
done done
@@ -107,11 +109,13 @@ AC_DEFINE_UNQUOTED(SIZEOF_U_INT16_T, [$size_u_int16_t], [size of u_int16_t])
AC_DEFINE_UNQUOTED(SIZEOF_U_INT32_T, [$size_u_int32_t], [size of u_int32_t]) AC_DEFINE_UNQUOTED(SIZEOF_U_INT32_T, [$size_u_int32_t], [size of u_int32_t])
dnl If we already have these types, don't piss about any more.... dnl If we already have these types, don't piss about any more....
if test $size_u_int8_t != 1 -o $size_u_int16_t != 2 -o $size_u_int32_t != 4 ; then
if test $size_u_int8_t != 1 || test $size_u_int16_t != 2 || test $size_u_int32_t != 4 ; then
dnl XXXif test $size_u_int8_t != 1 -o $size_u_int16_t != 2 -o $size_u_int32_t != 4 ; then
do_int_types=1 do_int_types=1
AC_CHECK_HEADERS( AC_CHECK_HEADERS(
[stdint.h dnl C99 stdint.h dnl C99
sys/inttypes.h], dnl Solaris sys/inttypes.h, dnl Solaris
[do_int_types=0; break]) [do_int_types=0; break])
if test $do_int_types = 1 ; then if test $do_int_types = 1 ; then