diff --git a/SRC/configure.ac b/SRC/configure.ac index 25599b6..76c5a0f 100644 --- a/SRC/configure.ac +++ b/SRC/configure.ac @@ -174,6 +174,10 @@ AC_CHECK_FUNCS(dlopen, , [AC_CHECK_LIB(dl,dlopen, , [AC_MSG_ERROR([echoping requires dlopen (dynamic loading of libraries) for plugins])])]) +dnl Checking size of ints, we often need it for binary protocols like ICP +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(long) + if test "$LIBIDN" = "1"; then CF_LIB_LIBIDN fi diff --git a/SRC/icp.h b/SRC/icp.h index bfdf726..9528459 100644 --- a/SRC/icp.h +++ b/SRC/icp.h @@ -11,10 +11,12 @@ #define ICP_FLAG_HIT_OBJ 0x80000000ul #define ICP_FLAG_SRC_RTT 0x40000000ul -#ifdef __alpha__ +#if SIZEOF_INT == 4 typedef unsigned int u_num32; -#else +#elif SIZEOF_LONG == 4 typedef unsigned long u_num32; +#else +#error "No suitable type for representing a 32-bits value" #endif struct icp_common_s {