diff options
| -rw-r--r-- | config.h.in | 12 | ||||
| -rwxr-xr-x | configure | 112 | ||||
| -rw-r--r-- | configure.in | 38 | ||||
| -rw-r--r-- | tcpdump-stdinc.h | 4 |
4 files changed, 72 insertions, 94 deletions
diff --git a/config.h.in b/config.h.in index c8c6507c..4cdb31b7 100644 --- a/config.h.in +++ b/config.h.in @@ -334,6 +334,18 @@ a type exists and the standard includes do not define it. */ #undef int8_t +/* Define to `uint16_t' if u_int16_t not defined. */ +#undef u_int16_t + +/* Define to `uint32_t' if u_int32_t not defined. */ +#undef u_int32_t + +/* Define to `uint64_t' if u_int64_t not defined. */ +#undef u_int64_t + +/* Define to `uint8_t' if u_int8_t not defined. */ +#undef u_int8_t + /* Define to the type of an unsigned integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ #undef uint16_t @@ -6797,6 +6797,7 @@ fi # # Make sure we have definitions for all the C99 specified-width types # (regardless of whether the environment is a C99 environment or not). +# ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t" case $ac_cv_c_int8_t in #( no|yes) ;; #( @@ -6897,107 +6898,56 @@ _ACEOF # -# The minimum version of autoconf that we support is 2.61, and it -# supports the AC_TYPE_UINTn_T macros. Use them; we've stopped -# using the old BSD-style u_intXX_t types. +# Define the old BSD specified-width types in terms of the C99 types; +# we may need them with libpcap include files. # -ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" -case $ac_cv_c_uint8_t in #( - no|yes) ;; #( - *) - -$as_echo "#define _UINT8_T 1" >>confdefs.h - +ac_fn_c_check_type "$LINENO" "u_int8_t" "ac_cv_type_u_int8_t" "$ac_includes_default +#include <sys/types.h> -cat >>confdefs.h <<_ACEOF -#define uint8_t $ac_cv_c_uint8_t -_ACEOF -;; - esac +" +if test "x$ac_cv_type_u_int8_t" = xyes; then : -ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t" -case $ac_cv_c_int8_t in #( - no|yes) ;; #( - *) +else -cat >>confdefs.h <<_ACEOF -#define int8_t $ac_cv_c_int8_t -_ACEOF -;; -esac +$as_echo "#define u_int8_t uint8_t" >>confdefs.h -ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t" -case $ac_cv_c_uint16_t in #( - no|yes) ;; #( - *) +fi +ac_fn_c_check_type "$LINENO" "u_int16_t" "ac_cv_type_u_int16_t" "$ac_includes_default +#include <sys/types.h> -cat >>confdefs.h <<_ACEOF -#define uint16_t $ac_cv_c_uint16_t -_ACEOF -;; - esac +" +if test "x$ac_cv_type_u_int16_t" = xyes; then : -ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t" -case $ac_cv_c_int16_t in #( - no|yes) ;; #( - *) +else -cat >>confdefs.h <<_ACEOF -#define int16_t $ac_cv_c_int16_t -_ACEOF -;; -esac +$as_echo "#define u_int16_t uint16_t" >>confdefs.h -ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" -case $ac_cv_c_uint32_t in #( - no|yes) ;; #( - *) - -$as_echo "#define _UINT32_T 1" >>confdefs.h +fi +ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "$ac_includes_default +#include <sys/types.h> -cat >>confdefs.h <<_ACEOF -#define uint32_t $ac_cv_c_uint32_t -_ACEOF -;; - esac +" +if test "x$ac_cv_type_u_int32_t" = xyes; then : -ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t" -case $ac_cv_c_int32_t in #( - no|yes) ;; #( - *) +else -cat >>confdefs.h <<_ACEOF -#define int32_t $ac_cv_c_int32_t -_ACEOF -;; -esac +$as_echo "#define u_int32_t uint32_t" >>confdefs.h -ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t" -case $ac_cv_c_uint64_t in #( - no|yes) ;; #( - *) +fi -$as_echo "#define _UINT64_T 1" >>confdefs.h +ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "$ac_includes_default +#include <sys/types.h> +" +if test "x$ac_cv_type_u_int64_t" = xyes; then : -cat >>confdefs.h <<_ACEOF -#define uint64_t $ac_cv_c_uint64_t -_ACEOF -;; - esac +else -ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" -case $ac_cv_c_int64_t in #( - no|yes) ;; #( - *) +$as_echo "#define u_int64_t uint64_t" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define int64_t $ac_cv_c_int64_t -_ACEOF -;; -esac +fi # diff --git a/configure.in b/configure.in index a027c5c6..dde10b38 100644 --- a/configure.in +++ b/configure.in @@ -869,6 +869,7 @@ fi # # Make sure we have definitions for all the C99 specified-width types # (regardless of whether the environment is a C99 environment or not). +# AC_TYPE_INT8_T AC_TYPE_INT16_T AC_TYPE_INT32_T @@ -879,18 +880,33 @@ AC_TYPE_UINT32_T AC_TYPE_UINT64_T # -# The minimum version of autoconf that we support is 2.61, and it -# supports the AC_TYPE_UINTn_T macros. Use them; we've stopped -# using the old BSD-style u_intXX_t types. +# Define the old BSD specified-width types in terms of the C99 types; +# we may need them with libpcap include files. # -AC_TYPE_UINT8_T -AC_TYPE_INT8_T -AC_TYPE_UINT16_T -AC_TYPE_INT16_T -AC_TYPE_UINT32_T -AC_TYPE_INT32_T -AC_TYPE_UINT64_T -AC_TYPE_INT64_T +AC_CHECK_TYPE([u_int8_t], , + [AC_DEFINE([u_int8_t], [uint8_t], + [Define to `uint8_t' if u_int8_t not defined.])], + [AC_INCLUDES_DEFAULT +#include <sys/types.h> +]) +AC_CHECK_TYPE([u_int16_t], , + [AC_DEFINE([u_int16_t], [uint16_t], + [Define to `uint16_t' if u_int16_t not defined.])], + [AC_INCLUDES_DEFAULT +#include <sys/types.h> +]) +AC_CHECK_TYPE([u_int32_t], , + [AC_DEFINE([u_int32_t], [uint32_t], + [Define to `uint32_t' if u_int32_t not defined.])], + [AC_INCLUDES_DEFAULT +#include <sys/types.h> +]) +AC_CHECK_TYPE([u_int64_t], , + [AC_DEFINE([u_int64_t], [uint64_t], + [Define to `uint64_t' if u_int64_t not defined.])], + [AC_INCLUDES_DEFAULT +#include <sys/types.h> +]) # # Check for <inttypes.h> diff --git a/tcpdump-stdinc.h b/tcpdump-stdinc.h index cf763cff..9a068e64 100644 --- a/tcpdump-stdinc.h +++ b/tcpdump-stdinc.h @@ -31,8 +31,8 @@ /* * Include the appropriate OS header files on Windows and various flavors - * of UNIX, and also define some additional items and include various - * non-OS header files on Windows, and; this isolates most of the platform + * of UNIX, include various non-OS header files on Windows, and define + * various items as needed, to isolate most of tcpdump's platform * differences to this one file. */ |
