From 8fbc54a7960312d1626f4032d5fef5bf8a37db70 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Thu, 13 Feb 2014 23:18:08 +0000 Subject: [PATCH] no way to avoid the typedef for supporting old json releases --- src/lp_json.c | 7 ------- src/lp_json.h | 8 ++++++++ tests/Makefile.am | 2 +- tests/Makefile.in | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/lp_json.c b/src/lp_json.c index e02ef62..c9379c5 100644 --- a/src/lp_json.c +++ b/src/lp_json.c @@ -23,16 +23,9 @@ #include #include -#include #include "lp_json.h" #include "lp_ws.h" -/* Declares json_bool to have consistent code even with - old json lib releases using boolean instead of json_bool.*/ -#ifndef HAVE_JSON_BOOL -typedef boolean json_bool; -#endif - static time_t json_to_time(json_object *json) { const char *str; diff --git a/src/lp_json.h b/src/lp_json.h index cfb803d..99add45 100644 --- a/src/lp_json.h +++ b/src/lp_json.h @@ -22,6 +22,14 @@ #include +#include + +/* Declares json_bool to have consistent code even with + old json lib releases using boolean instead of json_bool.*/ +#ifndef HAVE_JSON_BOOL +typedef boolean json_bool; +#endif + #include "lp.h" struct bpph **json_object_to_bpph_list(json_object *o); diff --git a/tests/Makefile.am b/tests/Makefile.am index 466b5be..0a5f3ef 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,6 @@ check-local: checkpatch.pl find $(top_srcdir)/src -name \*.c -exec $(srcdir)/checkpatch.pl --show-types -q --no-tree -emacs -f {} \; - find $(top_srcdir)/src -name \*.h -exec $(srcdir)/checkpatch.pl --show-types -q --no-tree -emacs -f {} \; + find $(top_srcdir)/src -name \*.h -exec $(srcdir)/checkpatch.pl --ignore NEW_TYPEDEFS --show-types -q --no-tree -emacs -f {} \; EXTRA_DIST = \ checkpatch.pl \ diff --git a/tests/Makefile.in b/tests/Makefile.in index ae5a8dc..7c0fa62 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -595,7 +595,7 @@ uninstall-am: check-local: checkpatch.pl find $(top_srcdir)/src -name \*.c -exec $(srcdir)/checkpatch.pl --show-types -q --no-tree -emacs -f {} \; - find $(top_srcdir)/src -name \*.h -exec $(srcdir)/checkpatch.pl --show-types -q --no-tree -emacs -f {} \; + find $(top_srcdir)/src -name \*.h -exec $(srcdir)/checkpatch.pl --ignore NEW_TYPEDEFS --show-types -q --no-tree -emacs -f {} \; # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. -- 2.7.4