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],
#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