build: remove check for typeof
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 6 Sep 2013 14:15:02 +0000 (11:15 -0300)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 6 Sep 2013 14:31:35 +0000 (11:31 -0300)
It's used in so many places without checking, that's really pointless to
check for it in macro.h.

Also remove AC_C_TYPEOF from configure.ac since we don't use -ansi.

configure.ac
libkmod/macro.h

index a192c81..e7416f6 100644 (file)
@@ -28,7 +28,6 @@ AS_IF([test "x$enable_static" = "xyes"],
 
 AC_PROG_CC
 AC_PROG_CC_C99
-AC_C_TYPEOF
 AM_PROG_CC_C_O
 AC_PROG_GCC_TRADITIONAL
 AC_C_BIGENDIAN
index 10392a3..7969072 100644 (file)
        do { (void) sizeof(char [1 - 2*!(expr)]); } while(0)
 #endif
 
-#if HAVE_TYPEOF
 #define check_types_match(expr1, expr2)                \
        ((typeof(expr1) *)0 != (typeof(expr2) *)0)
-#else
-/* Without typeof, we can only test the sizes. */
-#define check_types_match(expr1, expr2)                                \
-       assert_cc(sizeof(expr1) == sizeof(expr2))
-#endif /* HAVE_TYPEOF */
 
 #define container_of(member_ptr, containing_type, member)              \
        ((containing_type *)                                            \