Check for the intN_t and u_intN_t types the same way we do for tcpdump;
that works better on Tru64 UNIX. Include the relevant headers for those types in savefile.c, for the same reason.
This commit is contained in:
parent
968888b3e0
commit
2723ec4198
|
@ -581,36 +581,6 @@ AC_DEFUN(AC_LBL_HAVE_RUN_PATH,
|
||||||
AC_MSG_RESULT($ac_cv_lbl_have_run_path)
|
AC_MSG_RESULT($ac_cv_lbl_have_run_path)
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl
|
|
||||||
dnl Due to the stupid way it's implemented, AC_CHECK_TYPE is nearly useless.
|
|
||||||
dnl
|
|
||||||
dnl usage:
|
|
||||||
dnl
|
|
||||||
dnl AC_LBL_CHECK_TYPE
|
|
||||||
dnl
|
|
||||||
dnl results:
|
|
||||||
dnl
|
|
||||||
dnl int32_t (defined)
|
|
||||||
dnl u_int32_t (defined)
|
|
||||||
dnl
|
|
||||||
AC_DEFUN(AC_LBL_CHECK_TYPE,
|
|
||||||
[AC_MSG_CHECKING(for $1 using $CC)
|
|
||||||
AC_CACHE_VAL(ac_cv_lbl_have_$1,
|
|
||||||
AC_TRY_COMPILE([
|
|
||||||
# include "confdefs.h"
|
|
||||||
# include <sys/types.h>
|
|
||||||
# if STDC_HEADERS
|
|
||||||
# include <stdlib.h>
|
|
||||||
# include <stddef.h>
|
|
||||||
# endif],
|
|
||||||
[$1 i],
|
|
||||||
ac_cv_lbl_have_$1=yes,
|
|
||||||
ac_cv_lbl_have_$1=no))
|
|
||||||
AC_MSG_RESULT($ac_cv_lbl_have_$1)
|
|
||||||
if test $ac_cv_lbl_have_$1 = no ; then
|
|
||||||
AC_DEFINE($1, $2, [if we have $1])
|
|
||||||
fi])
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Checks to see if unaligned memory accesses fail
|
dnl Checks to see if unaligned memory accesses fail
|
||||||
dnl
|
dnl
|
||||||
|
|
23
config.h.in
23
config.h.in
|
@ -130,6 +130,9 @@
|
||||||
/* Define to 1 if the system has the type `struct ether_addr'. */
|
/* Define to 1 if the system has the type `struct ether_addr'. */
|
||||||
#undef HAVE_STRUCT_ETHER_ADDR
|
#undef HAVE_STRUCT_ETHER_ADDR
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/bitypes.h> header file. */
|
||||||
|
#undef HAVE_SYS_BITYPES_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/bufmod.h> header file. */
|
/* Define to 1 if you have the <sys/bufmod.h> header file. */
|
||||||
#undef HAVE_SYS_BUFMOD_H
|
#undef HAVE_SYS_BUFMOD_H
|
||||||
|
|
||||||
|
@ -241,17 +244,29 @@
|
||||||
/* Define as token for inline if inlining supported */
|
/* Define as token for inline if inlining supported */
|
||||||
#undef inline
|
#undef inline
|
||||||
|
|
||||||
|
/* Define to `short' if int16_t not defined. */
|
||||||
|
#undef int16_t
|
||||||
|
|
||||||
|
/* Define to `int' if int32_t not defined. */
|
||||||
|
#undef int32_t
|
||||||
|
|
||||||
|
/* Define to `long long' if int64_t not defined. */
|
||||||
|
#undef int64_t
|
||||||
|
|
||||||
|
/* Define to `signed char' if int8_t not defined. */
|
||||||
|
#undef int8_t
|
||||||
|
|
||||||
/* on sinix */
|
/* on sinix */
|
||||||
#undef sinix
|
#undef sinix
|
||||||
|
|
||||||
/* if we have u_int16_t */
|
/* Define to `unsigned short' if u_int16_t not defined. */
|
||||||
#undef u_int16_t
|
#undef u_int16_t
|
||||||
|
|
||||||
/* if we have u_int32_t */
|
/* Define to `unsigned int' if u_int32_t not defined. */
|
||||||
#undef u_int32_t
|
#undef u_int32_t
|
||||||
|
|
||||||
/* if we have u_int64_t */
|
/* Define to `unsigned long long' if u_int64_t not defined. */
|
||||||
#undef u_int64_t
|
#undef u_int64_t
|
||||||
|
|
||||||
/* if we have u_int8_t */
|
/* Define to `unsigned char' if u_int8_t not defined. */
|
||||||
#undef u_int8_t
|
#undef u_int8_t
|
||||||
|
|
62
configure.in
62
configure.in
|
@ -25,10 +25,64 @@ AC_LBL_C_INIT(V_CCOPT, V_INCLS)
|
||||||
AC_LBL_C_INLINE
|
AC_LBL_C_INLINE
|
||||||
AC_C___ATTRIBUTE__
|
AC_C___ATTRIBUTE__
|
||||||
|
|
||||||
AC_LBL_CHECK_TYPE(u_int8_t, u_char)
|
AC_CHECK_HEADERS(sys/bitypes.h)
|
||||||
AC_LBL_CHECK_TYPE(u_int16_t, u_short)
|
|
||||||
AC_LBL_CHECK_TYPE(u_int32_t, u_int)
|
AC_CHECK_TYPE([int8_t], ,
|
||||||
AC_LBL_CHECK_TYPE(u_int64_t, unsigned long long)
|
[AC_DEFINE([int8_t], [signed char],
|
||||||
|
[Define to `signed char' if int8_t not defined.])],
|
||||||
|
[AC_INCLUDES_DEFAULT
|
||||||
|
#ifdef HAVE_SYS_BITYPES_H
|
||||||
|
#include <sys/bitypes.h>
|
||||||
|
#endif])
|
||||||
|
AC_CHECK_TYPE([u_int8_t], ,
|
||||||
|
[AC_DEFINE([u_int8_t], [unsigned char],
|
||||||
|
[Define to `unsigned char' if u_int8_t not defined.])],
|
||||||
|
[AC_INCLUDES_DEFAULT
|
||||||
|
#ifdef HAVE_SYS_BITYPES_H
|
||||||
|
#include <sys/bitypes.h>
|
||||||
|
#endif])
|
||||||
|
AC_CHECK_TYPE([int16_t], ,
|
||||||
|
[AC_DEFINE([int16_t], [short],
|
||||||
|
[Define to `short' if int16_t not defined.])]
|
||||||
|
[AC_INCLUDES_DEFAULT
|
||||||
|
#ifdef HAVE_SYS_BITYPES_H
|
||||||
|
#include <sys/bitypes.h>
|
||||||
|
#endif])
|
||||||
|
AC_CHECK_TYPE([u_int16_t], ,
|
||||||
|
[AC_DEFINE([u_int16_t], [unsigned short],
|
||||||
|
[Define to `unsigned short' if u_int16_t not defined.])],
|
||||||
|
[AC_INCLUDES_DEFAULT
|
||||||
|
#ifdef HAVE_SYS_BITYPES_H
|
||||||
|
#include <sys/bitypes.h>
|
||||||
|
#endif])
|
||||||
|
AC_CHECK_TYPE([int32_t], ,
|
||||||
|
[AC_DEFINE([int32_t], [int],
|
||||||
|
[Define to `int' if int32_t not defined.])],
|
||||||
|
[AC_INCLUDES_DEFAULT
|
||||||
|
#ifdef HAVE_SYS_BITYPES_H
|
||||||
|
#include <sys/bitypes.h>
|
||||||
|
#endif])
|
||||||
|
AC_CHECK_TYPE([u_int32_t], ,
|
||||||
|
[AC_DEFINE([u_int32_t], [unsigned int],
|
||||||
|
[Define to `unsigned int' if u_int32_t not defined.])],
|
||||||
|
[AC_INCLUDES_DEFAULT
|
||||||
|
#ifdef HAVE_SYS_BITYPES_H
|
||||||
|
#include <sys/bitypes.h>
|
||||||
|
#endif])
|
||||||
|
AC_CHECK_TYPE([int64_t], ,
|
||||||
|
[AC_DEFINE([int64_t], [long long],
|
||||||
|
[Define to `long long' if int64_t not defined.])],
|
||||||
|
[AC_INCLUDES_DEFAULT
|
||||||
|
#ifdef HAVE_SYS_BITYPES_H
|
||||||
|
#include <sys/bitypes.h>
|
||||||
|
#endif])
|
||||||
|
AC_CHECK_TYPE([u_int64_t], ,
|
||||||
|
[AC_DEFINE([u_int64_t], [unsigned long long],
|
||||||
|
[Define to `unsigned long long' if u_int64_t not defined.])],
|
||||||
|
[AC_INCLUDES_DEFAULT
|
||||||
|
#ifdef HAVE_SYS_BITYPES_H
|
||||||
|
#include <sys/bitypes.h>
|
||||||
|
#endif])
|
||||||
|
|
||||||
#
|
#
|
||||||
# Try to arrange for large file support.
|
# Try to arrange for large file support.
|
||||||
|
|
14
savefile.c
14
savefile.c
|
@ -37,6 +37,20 @@ static const char rcsid[] _U_ =
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <pcap-stdinc.h>
|
||||||
|
#else /* WIN32 */
|
||||||
|
#if HAVE_INTTYPES_H
|
||||||
|
#include <inttypes.h>
|
||||||
|
#elif HAVE_STDINT_H
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_BITYPES_H
|
||||||
|
#include <sys/bitypes.h>
|
||||||
|
#endif
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif /* WIN32 */
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
Reference in New Issue