Commit Graph

647 Commits

Author SHA1 Message Date
Eric Haszlakiewicz
c9c84ca7ee Issue #369: note some useful settings when building for Android. 2017-10-19 23:30:51 -04:00
Eric Haszlakiewicz
cf913621f1 Use cmake to create the json-c.pc file, as suggested by PR#362. 2017-10-09 13:16:00 -04:00
Eric Haszlakiewicz
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.
2017-10-03 22:50:29 -04:00
Eric Haszlakiewicz
cfbdf7757b The new cmake-generated VS builds now generate a dynamic .dll instead of a .lib 2017-09-17 21:44:04 -04:00
Eric Haszlakiewicz
139eb64b43 For appveyor builds, json_config.h is actually generated in the "include" directory. 2017-09-17 21:35:53 -04:00
Eric Haszlakiewicz
66a77d129a Split the list of cmake headers into public and private ones, and only install the public ones. 2017-09-17 21:27:07 -04:00
Eric Haszlakiewicz
8899f3fbfb Add a "cmake ." line to the appveyor build file to try to get it working again. 2017-09-17 21:25:49 -04:00
Eric Haszlakiewicz
dc79d94c38 Merge pull request #361 from schwehr/int64
Fix double to int cast overflow in json_object_get_int64.
2017-09-11 21:25:27 -04:00
Kurt Schwehr
d9879c2533 Fix double to int cast overflow in json_object_get_int64.
Found with autofuzz in GDAL
2017-09-11 07:23:00 -07:00
Eric Haszlakiewicz
5454c4eaa3 Merge pull request #360 from jasonbking/master
Use strtoll() to parse ints
2017-09-07 22:45:48 -04:00
Eric Haszlakiewicz
4ac47a0219 Issue#353: attempt to fix or ignore a few -Wdocumentation messages from Clang. 2017-09-07 22:22:25 -04:00
Eric Haszlakiewicz
edde8eff9f Issue#353: mark lh_abort as actually deprecated, not just in the docs. 2017-09-07 22:21:29 -04:00
Jason King
e3fabe9a44 Add long long 64-bit check 2017-09-08 01:46:06 +00:00
Jason King
5355d387e9 Use strtoll to parse ints 2017-09-07 17:21:14 +00:00
Eric Haszlakiewicz
e1561ed1df Remove the Visual Studio project files as they were out of date, and should now be generated by using cmake. 2017-09-06 23:50:03 -04:00
Eric Haszlakiewicz
7e608c5728 Issue #359: Use consistent spacing in CMakeLists.txt 2017-09-06 23:42:38 -04:00
Eric Haszlakiewicz
32f503f738 Issue #359: Don't duplicate lh_get_hash, just omit the "inline" for VS2010. 2017-09-06 23:42:30 -04:00
Eric Haszlakiewicz
d58693b0f0 Merge pull request #359 from Haffon/api-0.12
update CMakeLists.txt for compile with visual studio at least 2010
2017-09-06 23:20:36 -04:00
Haffon
837a249f01 set JSON_C_HEADERS full file name 2017-09-07 10:39:14 +08:00
Haffon
e9f9f14f22 if compile with vs2015, enable the "static inline" declare. 2017-09-07 10:28:26 +08:00
Haffon
b301f4ea01 rollback api to 0.12 2017-09-07 10:02:21 +08:00
Haffon
86a3a6475f Merge pull request #2 from json-c/master
merge upstream
2017-09-07 09:33:07 +08:00
Eric Haszlakiewicz
548d000891 Undo a bit of 2d1da5ab: handle per-thread formats for double serialization, even if --enable-threading wasn't specified. 2017-09-05 01:56:42 -04:00
Eric Haszlakiewicz
b2afca4560 Issue #173: since some sscanf implementations return 0 for non-zero inputs, directly check for "0" in the input. 2017-09-05 01:53:13 -04:00
Eric Haszlakiewicz
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. 2017-09-03 23:37:12 -04:00
Eric Haszlakiewicz
8777c9477a Use AC_CONFIG_MACRO_DIRS to specify path to the ax macros instead of passing -I to autoreconf in autogen.sh. 2017-09-03 22:35:58 -04:00
Eric Haszlakiewicz
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.
2017-09-02 14:48:17 -04:00
Eric Haszlakiewicz
ab0d4dbc69 Merge branch 'pull-211'
This is EmielBruijntes' "Atomic updates for the refcount"
2017-09-02 13:54:15 -04:00
Eric Haszlakiewicz
95dff31951 Issue #351: don't redefine SIZE_T_MAX if it's already defined. 2017-08-30 23:35:56 -04:00
Eric Haszlakiewicz
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. 2017-08-30 23:17:24 -04:00
Haffon
95e174e2fb Merge pull request #1 from json-c/master
want to merge the original repository
2017-08-30 00:02:59 +08:00
Eric Haszlakiewicz
81f6edbfd5 PR#331: for Visual Studio, use a snprintf/vsnprintf wrapper that ensures the string is terminated. 2017-08-25 01:15:39 -04:00
Haffon
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.
2017-08-22 13:53:47 +08:00
Eric Haszlakiewicz
256ebcd827 Merge pull request #346 from schwehr/get_int
Clamp double to int32 when narrowing in json_object_get_int.
2017-08-21 20:50:58 -05:00
Eric Haszlakiewicz
474376f30a Merge pull request #345 from MrAnno/fix-make-dist
Fix make dist and make distcheck
2017-08-21 20:50:20 -05:00
Eric Haszlakiewicz
2f1fe55f66 Merge pull request #344 from fastogt/master
Fix Mingw build
2017-08-21 20:39:11 -05:00
Kurt Schwehr
ef7b08ce7f Clamp double to int32 when narrowing in json_object_get_int.
Avoids undefined behavior.  Found by autofuzz.
2017-08-08 07:54:38 -07:00
László Várady
e0e34f0a13 Fix 'make distcheck'
Signed-off-by: László Várady <laszlo.varady@balabit.com>
2017-08-04 12:31:11 +02:00
László Várady
db8dbbf371 Fix 'make dist'
EXTRA_DIST copies the listed directories/files from the _source_ directory
into the distribution.

Since the doc directory does not exist after running autogen + configure
+ make dist, the distribution tarball generation fails.

Note that the dist-hook rule below operates on 'distdir', not on the source
directory where EXTRA_DIST expects the existence of the doc folder.

In summary, even if I removed 'doc' from EXTRA_DIST, the dist tarball will
always contain the documentation (due to the dist-hook rule).

Signed-off-by: László Várady <laszlo.varady@balabit.com>
2017-08-04 12:31:06 +02:00
topilski
0a99e7a5c1 Fix Mingw build 2017-07-30 07:37:17 +03:00
topilski
65884f4d9e Fix parsing doubles for mingw 2017-07-30 07:30:05 +03:00
Eric Haszlakiewicz
af87944585 PR #336: fix to previous change, be sure to include string.h when we're using the real strerror. 2017-07-27 20:17:25 -07:00
Eric Haszlakiewicz
36dbe2d74e PR #336: Fix typo in defining STRERROR_OVERRIDE_IMPL 2017-07-27 20:10:53 -07:00
Eric Haszlakiewicz
8d8a785bd2 Merge pull request #340 from commodo/fix-appveyor-build
strerror_override: add extern "C" and JSON_EXPORT specifiers for Visual C++ compilers
2017-07-27 23:09:12 -04:00
Alexandru Ardelean
d8fbfc7aa1 build,travis: drop -enable-strerror-override argument (no longer exists)
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-07-19 15:22:36 +03:00
Alexandru Ardelean
ddce7c28e4 strerror_override: add extern "C" and JSON_EXPORT specifiers for Visual C++ compilers
Fixes build on AppVeyor.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-07-19 15:17:39 +03:00
Eric Haszlakiewicz
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.
2017-07-15 07:12:44 -07:00
Eric Haszlakiewicz
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. 2017-07-15 07:07:28 -07:00
Eric Haszlakiewicz
40317f079e Allow USE_VALGRIND to be set to anything starting with 0, N or n to disable valgrind during tests. 2017-07-15 07:03:18 -07:00
Eric Haszlakiewicz
c0b7d762b2 Merge pull request #336 from commodo/fix-tests
tests: fix tests in travis-ci.org
2017-07-13 22:39:01 -04:00