no way to avoid the typedef for supporting old json releases
authorJean-Philippe Orsini <jeanfi@gmail.com>
Thu, 13 Feb 2014 23:18:08 +0000 (23:18 +0000)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Thu, 13 Feb 2014 23:18:08 +0000 (23:18 +0000)
src/lp_json.c
src/lp_json.h
tests/Makefile.am
tests/Makefile.in

index e02ef62..c9379c5 100644 (file)
 #include <string.h>
 #include <time.h>
 
-#include <config.h>
 #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;
index cfb803d..99add45 100644 (file)
 
 #include <json/json.h>
 
+#include <config.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
+
 #include "lp.h"
 
 struct bpph **json_object_to_bpph_list(json_object *o);
index 466b5be..0a5f3ef 100644 (file)
@@ -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 \
index ae5a8dc..7c0fa62 100644 (file)
@@ -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.