Fix compilation of libjson 0.12

This commit is contained in:
2016-02-26 22:48:34 +01:00
parent 9bfae91f93
commit 6d5f11268b
4 changed files with 5 additions and 38 deletions

View File

@@ -16,14 +16,13 @@ file(
../../json_util.c ../../json_util.c
../../linkhash.c ../../linkhash.c
../../printbuf.c ../../printbuf.c
../../random_seed.c
) )
set(CMAKE_C_FLAGS "-Wall -Werror -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT") set(CMAKE_C_FLAGS "-Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT")
add_library( add_library(
json-c json-c
SHARED SHARED
${source_files} ${source_files}
) )
target_include_directories (json-c PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@@ -1,31 +0,0 @@
ifeq (,$(filter _%,$(notdir $(CURDIR))))
include $(AWOXCVS)/AwoxSoftware/builders/linux-gcc/target.mk
else
include $(BUILDERS)/main.mk
include $(AUDIOBUILDERS)/use-libjson-c.mk
VPATH = ../../..
OBJS += arraylist.o
OBJS += debug.o
OBJS += json_c_version.o
OBJS += json_object.o
OBJS += json_object_iterator.o
OBJS += json_tokener.o
OBJS += json_util.o
OBJS += linkhash.o
OBJS += printbuf.o
AWOX_CFLAGS += -I../../../
AWOX_CFLAGS += -Wall -Werror -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT
MAKELIB_TARGET=json-c
LIB_DEPS=$(AWOX_LIB_DEPS)
include $(BUILDERS)/make-lib.mk
endif

View File

@@ -130,8 +130,7 @@
/* Public define for json_inttypes.h */ /* Public define for json_inttypes.h */
#undef JSON_C_HAVE_INTTYPES_H #undef JSON_C_HAVE_INTTYPES_H
/* Define to the sub-directory in which libtool stores uninstalled libraries. /* Define to the sub-directory where libtool stores uninstalled libraries. */
*/
#undef LT_OBJDIR #undef LT_OBJDIR
/* Name of package */ /* Name of package */

View File

@@ -352,12 +352,12 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
case json_tokener_state_inf: /* aka starts with 'i' */ case json_tokener_state_inf: /* aka starts with 'i' */
{ {
int size; //int size;
int size_inf; int size_inf;
int is_negative = 0; int is_negative = 0;
printbuf_memappend_fast(tok->pb, &c, 1); printbuf_memappend_fast(tok->pb, &c, 1);
size = json_min(tok->st_pos+1, json_null_str_len); //size = json_min(tok->st_pos+1, json_null_str_len);
size_inf = json_min(tok->st_pos+1, json_inf_str_len); size_inf = json_min(tok->st_pos+1, json_inf_str_len);
char *infbuf = tok->pb->buf; char *infbuf = tok->pb->buf;
if (*infbuf == '-') if (*infbuf == '-')