Commit a7b1f80d34233e5d7e63ff80505480b0aaabfa02

Ran Benita 2013-03-02T20:43:57

Build cleanly with clang clang doesn't like the use of typeof with out default flags, so just don't use it. Signed-off-by: Ran Benita <ran234@gmail.com>

diff --git a/configure.ac b/configure.ac
index 7ecca9c..a0fcfe6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,7 +50,6 @@ XORG_WITH_DOXYGEN
 
 # Check for compiler features
 AC_C_INLINE
-AC_C_TYPEOF
 
 # Check for programs
 AC_PROG_MKDIR_P
diff --git a/src/darray.h b/src/darray.h
index 569576e..0cf3747 100644
--- a/src/darray.h
+++ b/src/darray.h
@@ -218,12 +218,6 @@ typedef darray (unsigned long)  darray_ulong;
     darray_prepend_items(arr, __src, sizeof(__src) / sizeof(*__src)); \
 } while (0)
 
-#define darray_appends(arr, ...) \
-    darray_appends_t(arr, typeof((*(arr).item)), __VA_ARGS__)
-
-#define darray_prepends(arr, ...) \
-    darray_prepends_t(arr, typeof((*(arr).item)), __VA_ARGS__)
-
 /*** Removal ***/
 
 /* Warning: Do not call darray_pop on an empty darray. */
diff --git a/src/xkbcomp/keymap.c b/src/xkbcomp/keymap.c
index 1d69245..6686948 100644
--- a/src/xkbcomp/keymap.c
+++ b/src/xkbcomp/keymap.c
@@ -233,7 +233,7 @@ UpdateBuiltinKeymapFields(struct xkb_keymap *keymap)
      * Add predefined (AKA real, core, X11) modifiers.
      * The order is important!
      */
-    darray_appends(keymap->mods,
+    darray_appends_t(keymap->mods, struct xkb_mod,
         { .name = xkb_atom_intern(ctx, "Shift"),   .type = MOD_REAL },
         { .name = xkb_atom_intern(ctx, "Lock"),    .type = MOD_REAL },
         { .name = xkb_atom_intern(ctx, "Control"), .type = MOD_REAL },