Get rid of the DBIND_ALIGNOF_* definitions and directly use ALIGNOF_*
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 25 Jun 2014 20:12:16 +0000 (22:12 +0200)
committerMike Gorse <mgorse@suse.com>
Fri, 1 Apr 2016 16:30:32 +0000 (11:30 -0500)
Since the AC_CHECK_ALIGNOF() macro fills the config.h header with
ALIGNOF_<type> definitions, there's no longer a need for the
DBIND_ALIGNOF_<type> definitions. This commit gets rid of them, and
also gets rid of the dbing-config.h file.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
configure.ac
dbind/Makefile.am
dbind/dbind-any.c
dbind/dbind-config.h.in [deleted file]

index cdea54cb9a3ad64566d31b180415e45e8ad4d21f..4be893e21bddac73f23242a82ea4cf074534e294 100644 (file)
@@ -213,7 +213,6 @@ CPPFLAGS=$orig_CPPFLAGS
 AC_CONFIG_FILES([Makefile po/Makefile.in
        xml/Makefile
        dbind/Makefile
-dbind/dbind-config.h
        atspi/Makefile
        registryd/Makefile
        bus/Makefile
index 79a6509777c6cefa8d2c906f7e33bd3cfe283ed0..c3d7bb57c30332b02b37aab414c0dc910b1f0939 100644 (file)
@@ -17,9 +17,6 @@ libdbind_la_SOURCES = \
        dbind-any.c
 libdbind_la_LIBADD = $(DBUS_LIBS) $(GLIB_LIBS)
 
-nodist_libdbind_la_sources = \
-        dbind-config.h
-
 TESTS = dbtest
 
 check_PROGRAMS = dbtest
index fdde7b64b20cead0bf541118d1d77642d1ca3d13..ae499d71fc9ff214c93cf0bf0a26469e2918130e 100644 (file)
@@ -22,7 +22,6 @@
 #include <glib.h>
 
 #include "config.h"
-#include "dbind-config.h"
 #include "dbind-any.h"
 
 #undef DEBUG
@@ -79,30 +78,30 @@ dbind_find_c_alignment_r (const char **type)
 
         switch (t) {
     case DBUS_TYPE_BYTE:
-        return DBIND_ALIGNOF_CHAR;
+        return ALIGNOF_CHAR;
     case DBUS_TYPE_BOOLEAN:
-        return DBIND_ALIGNOF_DBUS_BOOL_T;
+        return ALIGNOF_DBUS_BOOL_T;
     case DBUS_TYPE_INT16:
     case DBUS_TYPE_UINT16:
-        return DBIND_ALIGNOF_DBUS_INT16_T;
+        return ALIGNOF_DBUS_INT16_T;
     case DBUS_TYPE_INT32:
     case DBUS_TYPE_UINT32:
-        return DBIND_ALIGNOF_DBUS_INT32_T;
+        return ALIGNOF_DBUS_INT32_T;
     case DBUS_TYPE_INT64:
     case DBUS_TYPE_UINT64:
-        return DBIND_ALIGNOF_DBUS_INT64_T;
+        return ALIGNOF_DBUS_INT64_T;
     case DBUS_TYPE_DOUBLE:
-        return DBIND_ALIGNOF_DOUBLE;
+        return ALIGNOF_DOUBLE;
     /* ptr types */
     case DBUS_TYPE_STRING:
     case DBUS_TYPE_OBJECT_PATH:
     case DBUS_TYPE_SIGNATURE:
     case DBUS_TYPE_ARRAY:
-        return DBIND_ALIGNOF_DBIND_POINTER;
+        return ALIGNOF_DBIND_POINTER;
     case DBUS_STRUCT_BEGIN_CHAR:
       /* TODO: I think this would break with a nested struct */
-#if DBIND_ALIGNOF_DBIND_STRUCT > 1
-                retval = MAX (retval, DBIND_ALIGNOF_DBIND_STRUCT);
+#if ALIGNOF_DBIND_STRUCT > 1
+                retval = MAX (retval, ALIGNOF_DBIND_STRUCT);
 #endif
         while (**type != DBUS_STRUCT_END_CHAR) {
             int elem_align = dbind_find_c_alignment_r (type);
@@ -111,8 +110,8 @@ dbind_find_c_alignment_r (const char **type)
         (*type)++;
         return retval;
     case DBUS_DICT_ENTRY_BEGIN_CHAR:
-#if DBIND_ALIGNOF_DBIND_STRUCT > 1
-                retval = MAX (retval, DBIND_ALIGNOF_DBIND_STRUCT);
+#if ALIGNOF_DBIND_STRUCT > 1
+                retval = MAX (retval, ALIGNOF_DBIND_STRUCT);
 #endif
         while (**type != DBUS_DICT_ENTRY_END_CHAR) {
             int elem_align = dbind_find_c_alignment_r (type);
@@ -123,7 +122,7 @@ dbind_find_c_alignment_r (const char **type)
     case DBUS_TYPE_STRUCT:
     case DBUS_TYPE_DICT_ENTRY:
         warn_braces ();
-        return DBIND_ALIGNOF_DBIND_POINTER;
+        return ALIGNOF_DBIND_POINTER;
     case '\0':
         g_assert_not_reached();
         break;
diff --git a/dbind/dbind-config.h.in b/dbind/dbind-config.h.in
deleted file mode 100644 (file)
index 779c4c6..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#define DBIND_ALIGNOF_CHAR          ALIGNOF_CHAR
-#define DBIND_ALIGNOF_DBIND_POINTER ALIGNOF_DBIND_POINTER
-#define DBIND_ALIGNOF_DBIND_STRUCT  ALIGNOF_DBIND_STRUCT
-#define DBIND_ALIGNOF_DBUS_BOOL_T   ALIGNOF_DBUS_BOOL_T
-#define DBIND_ALIGNOF_DBUS_INT16_T  ALIGNOF_DBUS_INT16_T
-#define DBIND_ALIGNOF_DBUS_INT32_T  ALIGNOF_DBUS_INT32_T
-#define DBIND_ALIGNOF_DBUS_INT64_T  ALIGNOF_DBUS_INT64_T
-#define DBIND_ALIGNOF_DOUBLE        ALIGNOF_DOUBLE