mirror of
https://github.com/OISF/suricata.git
synced 2026-10-11 22:09:53 +00:00
configure: check for u_int and friends
This commit is contained in:
@@ -9,6 +9,51 @@ AC_DEFUN([AC_TYPE_UINT16_T], [_AC_TYPE_UNSIGNED_INT(16)])
|
||||
AC_DEFUN([AC_TYPE_UINT32_T], [_AC_TYPE_UNSIGNED_INT(32)])
|
||||
AC_DEFUN([AC_TYPE_UINT64_T], [_AC_TYPE_UNSIGNED_INT(64)])
|
||||
|
||||
AC_DEFUN([AC_TYPE_UINT], [_AC_TYPE_UTYPE(u_int)])
|
||||
AC_DEFUN([AC_TYPE_ULONG], [_AC_TYPE_UTYPE(u_long)])
|
||||
AC_DEFUN([AC_TYPE_UCHAR], [_AC_TYPE_UTYPE(u_char)])
|
||||
AC_DEFUN([AC_TYPE_USHORT], [_AC_TYPE_UTYPE(u_short)])
|
||||
|
||||
# _AC_TYPE_UTYPE(BASE)
|
||||
# -------------------
|
||||
AC_DEFUN([_AC_TYPE_UTYPE],
|
||||
[
|
||||
AC_CACHE_CHECK([for $1], [ac_cv_c_$1],
|
||||
[ac_cv_c_$1=no
|
||||
case $1 in
|
||||
"u_long")
|
||||
ac_cv_c_$1_type="U_LONG"
|
||||
;;
|
||||
"u_int")
|
||||
ac_cv_c_$1_type="U_INT"
|
||||
;;
|
||||
"u_short")
|
||||
ac_cv_c_$1_type="U_SHORT"
|
||||
;;
|
||||
"u_char")
|
||||
ac_cv_c_$1_type="U_CHAR"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_BOOL_COMPILE_TRY(
|
||||
[AC_INCLUDES_DEFAULT],
|
||||
[[($1) -1 >> ((sizeof($1) * 8) - 1) == 1]])],
|
||||
[AS_CASE([$1], [$1],
|
||||
[ac_cv_c_$1=yes],
|
||||
[ac_cv_c_$1=no])])
|
||||
])
|
||||
case $ac_cv_c_$1 in #(
|
||||
no)
|
||||
AC_DEFINE_UNQUOTED([HAVE_TYPE_$ac_cv_c_$1_type_NOT_DEFINED], [1], [$1 is undefined])
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
])# _AC_TYPE_UTYPE
|
||||
|
||||
# _AC_TYPE_INT(NBITS)
|
||||
# -------------------
|
||||
AC_DEFUN([_AC_TYPE_INT],
|
||||
|
||||
@@ -223,6 +223,10 @@
|
||||
AC_TYPE_UINT16_T
|
||||
AC_TYPE_UINT32_T
|
||||
AC_TYPE_UINT64_T
|
||||
AC_TYPE_UINT
|
||||
AC_TYPE_USHORT
|
||||
AC_TYPE_ULONG
|
||||
AC_TYPE_UCHAR
|
||||
AC_STRUCT_TIMEZONE
|
||||
AC_CHECK_TYPES([ptrdiff_t])
|
||||
AC_HEADER_STDBOOL
|
||||
|
||||
@@ -125,6 +125,19 @@
|
||||
#include <sched.h> /* for sched_setaffinity(2) */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TYPE_U_LONG_NOT_DEFINED
|
||||
typedef unsigned long int u_long
|
||||
#endif
|
||||
#ifdef HAVE_TYPE_U_INT_NOT_DEFINED
|
||||
typedef unsigned int u_int
|
||||
#endif
|
||||
#ifdef HAVE_TYPE_U_SHORT_NOT_DEFINED
|
||||
typedef unsigned short u_short
|
||||
#endif
|
||||
#ifdef HAVE_TYPE_U_CHAR_NOT_DEFINED
|
||||
typedef unsigned char u_char
|
||||
#endif
|
||||
|
||||
#include <pcre.h>
|
||||
|
||||
#ifdef HAVE_SYSLOG_H
|
||||
|
||||
Reference in New Issue
Block a user