fabb84a785
Remove out of date win32 build information, and mention the need to use cmake there.
Eric Haszlakiewicz
2017-10-22 22:46:05 -04:00
e424af32b7
Fix definition of NELEM in the tests.
Eric Haszlakiewicz
2017-10-22 22:28:35 -04:00
ac09581cc2
Issue #370: work around Clang-on-windows oddities by rearranging ifdefs.
Eric Haszlakiewicz
2017-10-22 22:19:41 -04:00
c9c84ca7ee
Issue #369: note some useful settings when building for Android.
Eric Haszlakiewicz
2017-10-19 23:30:51 -04:00
cf913621f1
Use cmake to create the json-c.pc file, as suggested by PR#362.
Eric Haszlakiewicz
2017-10-09 13:16:00 -04:00
ddc97b2950
Merge pull request #365 from mbehr1/json-c-0.12
Eric Haszlakiewicz
2017-10-04 18:19:40 -04:00
579f0746f0
Issue #173, follow up to using strtoll to allow this to work on older Windows environments: Use cmake to generate config.h from config.h.win32, including checking for strtoll with cmake, or fall back to _strtoi64 for older MSVC's. Also, add a few missing files to the list of sources to build.
Eric Haszlakiewicz
2017-10-03 22:50:29 -04:00
ec8912bb91
added fallthrough for gcc7
Matthias Behr
2017-10-03 09:26:59 +02:00
cfbdf7757b
The new cmake-generated VS builds now generate a dynamic .dll instead of a .lib
Eric Haszlakiewicz
2017-09-17 21:44:04 -04:00
139eb64b43
For appveyor builds, json_config.h is actually generated in the "include" directory.
Eric Haszlakiewicz
2017-09-17 21:35:53 -04:00
66a77d129a
Split the list of cmake headers into public and private ones, and only install the public ones.
Eric Haszlakiewicz
2017-09-17 21:27:07 -04:00
8899f3fbfb
Add a "cmake ." line to the appveyor build file to try to get it working again.
Eric Haszlakiewicz
2017-09-17 21:25:49 -04:00
1110e84cce
Add json_object_add_int functions
Juraj Vijtiuk
2017-09-14 08:05:33 -04:00
dc79d94c38
Merge pull request #361 from schwehr/int64
Eric Haszlakiewicz
2017-09-11 21:25:27 -04:00
d9879c2533
Fix double to int cast overflow in json_object_get_int64.
Kurt Schwehr
2017-09-11 07:23:00 -07:00
5454c4eaa3
Merge pull request #360 from jasonbking/master
Eric Haszlakiewicz
2017-09-07 22:45:48 -04:00
4ac47a0219
Issue#353: attempt to fix or ignore a few -Wdocumentation messages from Clang.
Eric Haszlakiewicz
2017-09-07 22:22:25 -04:00
edde8eff9f
Issue#353: mark lh_abort as actually deprecated, not just in the docs.
Eric Haszlakiewicz
2017-09-07 22:21:29 -04:00
e3fabe9a44
Add long long 64-bit check
Jason King
2017-09-08 01:46:06 +00:00
5355d387e9
Use strtoll to parse ints
Jason King
2017-09-07 17:21:14 +00:00
e1561ed1df
Remove the Visual Studio project files as they were out of date, and should now be generated by using cmake.
Eric Haszlakiewicz
2017-09-06 23:50:03 -04:00
7e608c5728
Issue #359: Use consistent spacing in CMakeLists.txt
Eric Haszlakiewicz
2017-09-06 23:40:20 -04:00
32f503f738
Issue #359: Don't duplicate lh_get_hash, just omit the "inline" for VS2010.
Eric Haszlakiewicz
2017-09-06 23:39:23 -04:00
d58693b0f0
Merge pull request #359 from Haffon/api-0.12
Eric Haszlakiewicz
2017-09-06 23:20:36 -04:00
837a249f01
set JSON_C_HEADERS full file name
Haffon
2017-09-07 10:39:14 +08:00
e9f9f14f22
if compile with vs2015, enable the "static inline" declare.
Haffon
2017-09-07 10:28:26 +08:00
b301f4ea01
rollback api to 0.12
Haffon
2017-09-07 10:02:21 +08:00
548d000891
Undo a bit of 2d1da5ab: handle per-thread formats for double serialization, even if --enable-threading wasn't specified.
Eric Haszlakiewicz
2017-09-05 01:56:42 -04:00
b2afca4560
Issue #173: since some sscanf implementations return 0 for non-zero inputs, directly check for "0" in the input.
Eric Haszlakiewicz
2017-09-05 01:53:13 -04:00
2d1da5ab13
Add a --enable-threading configure option, and only use the (slower) __sync_add_and_fetch()/__sync_sub_and_fetch() function when it is specified.
Eric Haszlakiewicz
2017-09-03 23:37:12 -04:00
8777c9477a
Use AC_CONFIG_MACRO_DIRS to specify path to the ax macros instead of passing -I to autoreconf in autogen.sh.
Eric Haszlakiewicz
2017-09-03 22:35:58 -04:00
5b11e9adff
Explicitly check for GCC's atomic functions instead of depending on the __GNUC__ define. Add a comment mentioning the limitation even though the _ref_count value is hanled atomically.
Eric Haszlakiewicz
2017-09-02 14:48:17 -04:00
ab0d4dbc69
Merge branch 'pull-211' This is EmielBruijntes' "Atomic updates for the refcount"
Eric Haszlakiewicz
2017-09-02 13:54:15 -04:00
95dff31951
Issue #351: don't redefine SIZE_T_MAX if it's already defined.
Eric Haszlakiewicz
2017-08-30 23:35:56 -04:00
447d67d5f3
Issue #349: none of automake's clean targets are suite for really cleaning up everything, so add a local "really-clean" target that does so.
Eric Haszlakiewicz
2017-08-30 23:17:24 -04:00
81f6edbfd5
PR#331: for Visual Studio, use a snprintf/vsnprintf wrapper that ensures the string is terminated.
Eric Haszlakiewicz
2017-08-25 01:15:39 -04:00
3141c3976b
1.make it can been compiled with Visual Studio 2010 2.replace json_object_get/put API with json_object_retain/release, as they operate the reference counter, and confused with array_list_get/put_idx. 3.replace array_list_get/put_idx API with array_list_get/insert to make them more clear to use.
Haffon
2017-08-22 13:53:47 +08:00
256ebcd827
Merge pull request #346 from schwehr/get_int
Eric Haszlakiewicz
2017-08-21 20:50:58 -05:00
474376f30a
Merge pull request #345 from MrAnno/fix-make-dist
Eric Haszlakiewicz
2017-08-21 20:50:20 -05:00
2f1fe55f66
Merge pull request #344 from fastogt/master
Eric Haszlakiewicz
2017-08-21 20:39:11 -05:00
ef7b08ce7f
Clamp double to int32 when narrowing in json_object_get_int.
Kurt Schwehr
2017-08-08 07:54:38 -07:00
e0e34f0a13
Fix 'make distcheck'
László Várady
2017-08-04 12:26:54 +02:00
db8dbbf371
Fix 'make dist'
László Várady
2017-08-04 11:59:14 +02:00
65884f4d9e
Fix parsing doubles for mingw
topilski
2017-07-30 07:30:05 +03:00
af87944585
PR #336: fix to previous change, be sure to include string.h when we're using the real strerror.
Eric Haszlakiewicz
2017-07-27 20:17:25 -07:00
36dbe2d74e
PR #336: Fix typo in defining STRERROR_OVERRIDE_IMPL
Eric Haszlakiewicz
2017-07-27 20:10:53 -07:00
8d8a785bd2
Merge pull request #340 from commodo/fix-appveyor-build
Eric Haszlakiewicz
2017-07-27 23:09:12 -04:00
d8fbfc7aa1
build,travis: drop -enable-strerror-override argument (no longer exists)
Alexandru Ardelean
2017-07-19 15:22:36 +03:00
ddce7c28e4
strerror_override: add extern "C" and JSON_EXPORT specifiers for Visual C++ compilers
Alexandru Ardelean
2017-07-19 15:10:10 +03:00
fcad0ec015
PR #336: since we can't use function overriding (due to problems with it on OSX) always include the _json_c_strerror function but only enable it with a flag during tests.
Eric Haszlakiewicz
2017-07-15 07:12:44 -07:00
730ab7b019
PR #336: since we can't use function overriding (due to problems with it on OSX) always include the _json_c_strerror function but only enable it with a flag during tests.
Eric Haszlakiewicz
2017-07-15 07:07:28 -07:00
40317f079e
Allow USE_VALGRIND to be set to anything starting with 0, N or n to disable valgrind during tests.
Eric Haszlakiewicz
2017-07-15 07:03:18 -07:00
c0b7d762b2
Merge pull request #336 from commodo/fix-tests
Eric Haszlakiewicz
2017-07-13 22:39:01 -04:00
bc2e30453b
build,travis: enable strerror override option in build
Alexandru Ardelean
2017-07-13 10:24:27 +03:00
fb72160caf
build: make strerror() override-able
Alexandru Ardelean
2017-07-13 10:11:15 +03:00
85f57859fd
configure.ac: check for uselocale function only on Linux platforms
Alexandru Ardelean
2017-07-13 09:33:39 +03:00
7b9432d564
tests: fix leak in test_util_file ; found by cppcheck
Alexandru Ardelean
2017-07-10 18:00:41 +03:00
effab3f91a
travis,tests: run cppcheck only if it exists
Alexandru Ardelean
2017-07-10 17:47:00 +03:00
9d47ae824c
tests: compress test_utile_file with test_basic
Alexandru Ardelean
2017-07-10 13:30:49 +03:00
ba8625a701
tests: add set -e specifier to bail early on build run
Alexandru Ardelean
2017-07-10 12:01:56 +03:00
dd8dcb8228
Merge pull request #335 from commodo/build_status_travis
Eric Haszlakiewicz
2017-07-11 00:16:12 -04:00
061afc7993
README.md: show build status tag from travis & appveyor.
Alexandru Ardelean
2017-07-10 11:28:10 +03:00
b64402ede2
Move a variable declaration to the start of the block to work better with older compilers.
Eric Haszlakiewicz
2017-07-09 16:08:29 -07:00
a14ada5730
Remove a spurious comma in configure.ac
Eric Haszlakiewicz
2017-07-09 16:00:32 -07:00
33db761551
Updated expected test1 output which should have been included in commit fd9b3b2.
Eric Haszlakiewicz
2017-07-09 15:22:53 -07:00
1d3e97f2ab
Comment out the warning about racy random seed initialization in lh_char_hash(), if you're on a platform where it'll be triggered it just makes it a pain to build.
Eric Haszlakiewicz
2017-07-09 15:13:02 -07:00
f7a44ad101
Add extra casts to void * to squash some warning on certain systems (e.g. CentOS w/ gcc 4.1.2).
Eric Haszlakiewicz
2017-07-09 15:08:21 -07:00
7b7a76e161
Fix bad usage of strncat introduces in 1a94c70. Pointed out by @rouault in PR #331.
Eric Haszlakiewicz
2017-07-09 15:04:18 -07:00
55ecae3e58
Eliminate static qualifiers on a couple local variables that were causing thread safety issues. Suggested by @rouault in PR #331.
Eric Haszlakiewicz
2017-07-09 14:56:18 -07:00
5a99e527ff
Reformat json_object_double_to_json_string_format() to have consistent spacing.
Eric Haszlakiewicz
2017-07-08 20:33:28 -07:00
5e33dabda1
Issue #308: improve the build instructions in README.md to include the exact commands to run for installing prerequisites, as mentioned earlier on Issue #308.
Eric Haszlakiewicz
2017-07-08 19:35:06 -07:00
fd9b3b2260
Issue #332: fix a long-standing bug in array_list_put_idx() where it would attempt to free previously free'd entries due to not checking the current array length. Add a test that triggers the problem to ensure it stays fixed.
Eric Haszlakiewicz
2017-07-08 19:04:35 -07:00
7fd74fc7a3
Merge pull request #312 from Tailmon/master
Eric Haszlakiewicz
2017-07-08 21:25:48 -04:00
4deed587e7
Merge pull request #319 from Dashlane/visual-studio-build
Eric Haszlakiewicz
2017-07-08 21:24:55 -04:00
a3f97eeeeb
Merge pull request #329 from commodo/rename-static-lib
Eric Haszlakiewicz
2017-07-08 15:44:27 -04:00
db3115cee9
Merge pull request #330 from commodo/symlink_some_tests
Eric Haszlakiewicz
2017-07-08 15:43:45 -04:00
cc201fdcaa
Merge pull request #333 from besser82/bugfix/obsolete_macros_autotools
Eric Haszlakiewicz
2017-07-08 15:17:17 -04:00
cec97ebc6f
Replace obsolete AM_PROG_LIBTOOL
Björn Esser
2017-07-03 12:17:36 +02:00
73636c2ed0
tests: symlink basic tests to a single file that has the common code
Alexandru Ardelean
2017-06-22 09:53:30 +03:00
8f6ecbf37b
build,cmake: set C_STANDARD 99 property to libjson-c-static
Alexandru Ardelean
2017-06-19 18:12:03 +03:00
4fb2eefac2
build,cmake: rename libjson-c-static.a to libjson-c.a
Alexandru Ardelean
2017-06-19 18:08:13 +03:00
a36396992d
Merge pull request #321 from commodo/fix-cmake-vasprintf
Eric Haszlakiewicz
2017-06-19 00:34:44 -04:00
e8e574fbe4
Issue #161: add a json_object_to_fd() function.
Eric Haszlakiewicz
2017-06-18 18:44:45 +00:00
23e064ad29
Fix test_double_serializer expected output.
Eric Haszlakiewicz
2017-06-18 18:34:41 +00:00
1a94c70336
Add a json_c_set_serialization_double_format() function to set the *library-wide* format for how doubles are written to a serialized JSON output.
Eric Haszlakiewicz
2017-06-18 18:04:49 +00:00
8581806558
Make _set_last_err() non-static so it can be used outside of json_util.c
Eric Haszlakiewicz
2017-06-04 18:25:51 +00:00
e76ea37772
Merge pull request #325 from rouault/fix_stack_overflow_in_json_object_double_to_json_string_format
Eric Haszlakiewicz
2017-05-21 21:35:16 -04:00
2c2deb87f8
Fix stack buffer overflow in json_object_double_to_json_string_format()
Even Rouault
2017-05-18 22:36:35 +02:00
4b5e39c89c
build,cmake: generate both static and shared libjson
Alexandru Ardelean
2017-05-03 11:59:31 +03:00
cfbbb23141
build,cmake: add _GNU_SOURCE to CFLAGS
Alexandru Ardelean
2017-05-03 11:29:12 +03:00
a9f265d166
Fix library build with Visual Studio
David Henot
2017-04-26 14:08:31 +02:00
d3f813a14e
Fixed linkhash.c for MinGW
Pablo Sanabria
2017-03-25 19:18:29 -03:00
2cda677d06
Fix CMake Build process for MinGW and MSYS2
Pablo Sanabria
2017-03-25 16:31:22 -03:00
6bd86d1044
Merge pull request #311 from jj1118/master
Eric Haszlakiewicz
2017-03-26 03:52:57 +00:00
0f81ecf5f4
Fix error C3688 when compiling on Visual Studio 2015: invalid literal suffix 'PRId64'; literal operator or literal operator template 'operator ""PRId64' not found
Jason Li
2017-03-24 14:53:25 +08:00
4e673656a1
Merge pull request #310 from marxin/fix-gcc7-warnings
Eric Haszlakiewicz
2017-03-22 23:37:14 -04:00