summaryrefslogtreecommitdiff
path: root/dbind
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-06-25 22:12:16 +0200
committerMike Gorse <mgorse@suse.com>2016-04-01 11:30:32 -0500
commit44329fb78ee6a0fd1bd5f906084fc0b7dd912fc6 (patch)
tree04b6ed14b560daae87add366f78a5c4531310823 /dbind
parent3c083b9bbb9a710c923c5d3a49c1ff8ce55f651c (diff)
downloadat-spi2-core-44329fb78ee6a0fd1bd5f906084fc0b7dd912fc6.tar.gz
Get rid of the DBIND_ALIGNOF_* definitions and directly use ALIGNOF_*
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>
Diffstat (limited to 'dbind')
-rw-r--r--dbind/Makefile.am3
-rw-r--r--dbind/dbind-any.c25
-rw-r--r--dbind/dbind-config.h.in8
3 files changed, 12 insertions, 24 deletions
diff --git a/dbind/Makefile.am b/dbind/Makefile.am
index 79a65097..c3d7bb57 100644
--- a/dbind/Makefile.am
+++ b/dbind/Makefile.am
@@ -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
diff --git a/dbind/dbind-any.c b/dbind/dbind-any.c
index fdde7b64..ae499d71 100644
--- a/dbind/dbind-any.c
+++ b/dbind/dbind-any.c
@@ -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
index 779c4c6c..00000000
--- a/dbind/dbind-config.h.in
+++ /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