diff --git a/CMakeLists.txt b/CMakeLists.txt index fbc5164..90c3a28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -321,13 +321,13 @@ set(JSON_C_HEADERS ${JSON_C_PUBLIC_HEADERS} ${PROJECT_BINARY_DIR}/config.h ${PROJECT_SOURCE_DIR}/json_object_private.h - ${PROJECT_SOURCE_DIR}/random_seed.h - ${PROJECT_SOURCE_DIR}/strerror_override.h - ${PROJECT_SOURCE_DIR}/strerror_override_private.h - ${PROJECT_SOURCE_DIR}/math_compat.h - ${PROJECT_SOURCE_DIR}/snprintf_compat.h - ${PROJECT_SOURCE_DIR}/strdup_compat.h - ${PROJECT_SOURCE_DIR}/vasprintf_compat.h + ${PROJECT_SOURCE_DIR}/json_c_random_seed.h + ${PROJECT_SOURCE_DIR}/json_c_strerror_override.h + ${PROJECT_SOURCE_DIR}/json_c_strerror_override_private.h + ${PROJECT_SOURCE_DIR}/json_c_math_compat.h + ${PROJECT_SOURCE_DIR}/json_c_snprintf_compat.h + ${PROJECT_SOURCE_DIR}/json_c_strdup_compat.h + ${PROJECT_SOURCE_DIR}/json_c_vasprintf_compat.h ) set(JSON_C_SOURCES @@ -342,8 +342,8 @@ set(JSON_C_SOURCES ${PROJECT_SOURCE_DIR}/json_visit.c ${PROJECT_SOURCE_DIR}/json_c_linkhash.c ${PROJECT_SOURCE_DIR}/json_c_printbuf.c - ${PROJECT_SOURCE_DIR}/random_seed.c - ${PROJECT_SOURCE_DIR}/strerror_override.c + ${PROJECT_SOURCE_DIR}/json_c_random_seed.c + ${PROJECT_SOURCE_DIR}/json_c_strerror_override.c ) include_directories(${PROJECT_SOURCE_DIR}) diff --git a/json_c_linkhash.c b/json_c_linkhash.c index f85038c..9d34a54 100644 --- a/json_c_linkhash.c +++ b/json_c_linkhash.c @@ -29,7 +29,7 @@ #endif #include "json_c_linkhash.h" -#include "random_seed.h" +#include "json_c_random_seed.h" /* hash functions */ static unsigned long lh_char_hash(const void *k); diff --git a/math_compat.h b/json_c_math_compat.h similarity index 90% rename from math_compat.h rename to json_c_math_compat.h index fdbad4d..18f8b14 100644 --- a/math_compat.h +++ b/json_c_math_compat.h @@ -1,5 +1,5 @@ -#ifndef __math_compat_h -#define __math_compat_h +#ifndef __json_c_math_compat_h +#define __json_c_math_compat_h /** * @file diff --git a/json_c_printbuf.c b/json_c_printbuf.c index 7b3e0da..14d1367 100644 --- a/json_c_printbuf.c +++ b/json_c_printbuf.c @@ -27,8 +27,8 @@ #include "json_c_debug.h" #include "json_c_printbuf.h" -#include "snprintf_compat.h" -#include "vasprintf_compat.h" +#include "json_c_snprintf_compat.h" +#include "json_c_vasprintf_compat.h" static int printbuf_extend(struct printbuf *p, int min_size); diff --git a/random_seed.c b/json_c_random_seed.c similarity index 97% rename from random_seed.c rename to json_c_random_seed.c index fc19e26..4221b92 100644 --- a/random_seed.c +++ b/json_c_random_seed.c @@ -1,5 +1,5 @@ /* - * random_seed.c + * json_c_random_seed.c * * Copyright (c) 2013 Metaparadigm Pte. Ltd. * Michael Clark @@ -9,9 +9,9 @@ * */ -#include "random_seed.h" +#include "json_c_random_seed.h" #include "config.h" -#include "strerror_override.h" +#include "json_c_strerror_override.h" #include #define DEBUG_SEED(s) diff --git a/random_seed.h b/json_c_random_seed.h similarity index 95% rename from random_seed.h rename to json_c_random_seed.h index 72ee5f6..569bd0b 100644 --- a/random_seed.h +++ b/json_c_random_seed.h @@ -1,5 +1,5 @@ /* - * random_seed.h + * json_c_random_seed.h * * Copyright (c) 2013 Metaparadigm Pte. Ltd. * Michael Clark diff --git a/snprintf_compat.h b/json_c_snprintf_compat.h similarity index 88% rename from snprintf_compat.h rename to json_c_snprintf_compat.h index cae3215..45b5a36 100644 --- a/snprintf_compat.h +++ b/json_c_snprintf_compat.h @@ -1,5 +1,5 @@ -#ifndef __snprintf_compat_h -#define __snprintf_compat_h +#ifndef __json_c_snprintf_compat_h +#define __json_c_snprintf_compat_h /** * @file @@ -38,4 +38,4 @@ static int json_c_snprintf(char *str, size_t size, const char *format, ...) #error Need vsnprintf! #endif /* !HAVE_SNPRINTF && defined(WIN32) */ -#endif /* __snprintf_compat_h */ +#endif /* __json_c_snprintf_compat_h */ diff --git a/strdup_compat.h b/json_c_strdup_compat.h similarity index 82% rename from strdup_compat.h rename to json_c_strdup_compat.h index 2f2df65..bfbf69e 100644 --- a/strdup_compat.h +++ b/json_c_strdup_compat.h @@ -1,5 +1,5 @@ -#ifndef __strdup_compat_h -#define __strdup_compat_h +#ifndef __json_c_strdup_compat_h +#define __json_c_strdup_compat_h /** * @file diff --git a/strerror_override.c b/json_c_strerror_override.c similarity index 98% rename from strerror_override.c rename to json_c_strerror_override.c index 041bd92..37e82de 100644 --- a/strerror_override.c +++ b/json_c_strerror_override.c @@ -1,5 +1,5 @@ #define STRERROR_OVERRIDE_IMPL 1 -#include "strerror_override.h" +#include "json_c_strerror_override.h" /* * Override strerror() to get consistent output across platforms. diff --git a/strerror_override.h b/json_c_strerror_override.h similarity index 75% rename from strerror_override.h rename to json_c_strerror_override.h index 0b04eb4..2fd47bf 100644 --- a/strerror_override.h +++ b/json_c_strerror_override.h @@ -1,5 +1,5 @@ -#ifndef _json_strerror_override_h_ -#define _json_strerror_override_h_ +#ifndef _json_json_c_strerror_override_h_ +#define _json_json_c_strerror_override_h_ /** * @file @@ -27,4 +27,4 @@ JSON_EXPORT char *_json_c_strerror(int errno_in); } #endif -#endif /* _json_strerror_override_h_ */ +#endif /* _json_json_c_strerror_override_h_ */ diff --git a/strerror_override_private.h b/json_c_strerror_override_private.h similarity index 67% rename from strerror_override_private.h rename to json_c_strerror_override_private.h index 8726e59..98d50be 100644 --- a/strerror_override_private.h +++ b/json_c_strerror_override_private.h @@ -1,5 +1,5 @@ -#ifndef __json_strerror_override_private_h__ -#define __json_strerror_override_private_h__ +#ifndef __json_json_c_strerror_override_private_h__ +#define __json_json_c_strerror_override_private_h__ /** * @file diff --git a/vasprintf_compat.h b/json_c_vasprintf_compat.h similarity index 86% rename from vasprintf_compat.h rename to json_c_vasprintf_compat.h index 5264272..3a5d6a2 100644 --- a/vasprintf_compat.h +++ b/json_c_vasprintf_compat.h @@ -1,12 +1,12 @@ -#ifndef __vasprintf_compat_h -#define __vasprintf_compat_h +#ifndef __json_c_vasprintf_compat_h +#define __json_c_vasprintf_compat_h /** * @file * @brief Do not use, json-c internal, may be changed or removed at any time. */ -#include "snprintf_compat.h" +#include "json_c_snprintf_compat.h" #include @@ -57,4 +57,4 @@ static int vasprintf(char **buf, const char *fmt, va_list ap) } #endif /* !HAVE_VASPRINTF */ -#endif /* __vasprintf_compat_h */ +#endif /* __json_c_vasprintf_compat_h */ diff --git a/json_object.c b/json_object.c index 52426ec..b635ef6 100644 --- a/json_object.c +++ b/json_object.c @@ -12,7 +12,7 @@ #include "config.h" -#include "strerror_override.h" +#include "json_c_strerror_override.h" #include #include @@ -29,10 +29,10 @@ #include "json_object_private.h" #include "json_util.h" #include "json_c_linkhash.h" -#include "math_compat.h" +#include "json_c_math_compat.h" #include "json_c_printbuf.h" -#include "snprintf_compat.h" -#include "strdup_compat.h" +#include "json_c_snprintf_compat.h" +#include "json_c_strdup_compat.h" #if SIZEOF_LONG_LONG != SIZEOF_INT64_T #error "The long long type isn't 64-bits" diff --git a/json_pointer.c b/json_pointer.c index 99cc542..4790c49 100644 --- a/json_pointer.c +++ b/json_pointer.c @@ -8,7 +8,7 @@ #include "config.h" -#include "strerror_override.h" +#include "json_c_strerror_override.h" #include #include @@ -17,8 +17,8 @@ #include #include "json_pointer.h" -#include "strdup_compat.h" -#include "vasprintf_compat.h" +#include "json_c_strdup_compat.h" +#include "json_c_vasprintf_compat.h" /** * JavaScript Object Notation (JSON) Pointer diff --git a/json_tokener.c b/json_tokener.c index ba9b527..ff7c00d 100644 --- a/json_tokener.c +++ b/json_tokener.c @@ -15,7 +15,7 @@ #include "config.h" -#include "math_compat.h" +#include "json_c_math_compat.h" #include #include #include @@ -33,7 +33,7 @@ #include "json_tokener.h" #include "json_util.h" #include "json_c_printbuf.h" -#include "strdup_compat.h" +#include "json_c_strdup_compat.h" #ifdef HAVE_LOCALE_H #include diff --git a/json_util.c b/json_util.c index 558ce60..192e43c 100644 --- a/json_util.c +++ b/json_util.c @@ -12,7 +12,7 @@ #include "config.h" #undef realloc -#include "strerror_override.h" +#include "json_c_strerror_override.h" #include #include @@ -48,7 +48,7 @@ #define open _open #endif -#include "snprintf_compat.h" +#include "json_c_snprintf_compat.h" #include "json_c_debug.h" #include "json_inttypes.h" diff --git a/tests/test_json_pointer.c b/tests/test_json_pointer.c index 7ad9905..9539244 100644 --- a/tests/test_json_pointer.c +++ b/tests/test_json_pointer.c @@ -1,5 +1,5 @@ -#include "strerror_override.h" -#include "strerror_override_private.h" +#include "json_c_strerror_override.h" +#include "json_c_strerror_override_private.h" #ifdef NDEBUG #undef NDEBUG #endif diff --git a/tests/test_locale.c b/tests/test_locale.c index 55c9cc6..9507822 100644 --- a/tests/test_locale.c +++ b/tests/test_locale.c @@ -7,7 +7,7 @@ #include "config.h" #include "json.h" #include "json_tokener.h" -#include "snprintf_compat.h" +#include "json_c_snprintf_compat.h" #ifdef HAVE_LOCALE_H #include diff --git a/tests/test_util_file.c b/tests/test_util_file.c index 2f8f8b5..a57633c 100644 --- a/tests/test_util_file.c +++ b/tests/test_util_file.c @@ -1,5 +1,5 @@ -#include "strerror_override.h" -#include "strerror_override_private.h" +#include "json_c_strerror_override.h" +#include "json_c_strerror_override_private.h" #ifdef WIN32 #define WIN32_LEAN_AND_MEAN #include @@ -20,7 +20,7 @@ #include "json.h" #include "json_util.h" -#include "snprintf_compat.h" +#include "json_c_snprintf_compat.h" static void test_read_valid_with_fd(const char *testdir); static void test_read_valid_nested_with_fd(const char *testdir);