Eric Haszlakiewicz
dc79d94c38
Merge pull request #361 from schwehr/int64
Fix double to int cast overflow in json_object_get_int64.
8 years ago
Kurt Schwehr
d9879c2533
Fix double to int cast overflow in json_object_get_int64.
Found with autofuzz in GDAL
8 years ago
Eric Haszlakiewicz
5454c4eaa3
Merge pull request #360 from jasonbking/master
Use strtoll() to parse ints
8 years ago
Eric Haszlakiewicz
4ac47a0219
Issue#353: attempt to fix or ignore a few -Wdocumentation messages from Clang.
8 years ago
Eric Haszlakiewicz
edde8eff9f
Issue#353: mark lh_abort as actually deprecated, not just in the docs.
8 years ago
Jason King
e3fabe9a44
Add long long 64-bit check
8 years ago
Jason King
5355d387e9
Use strtoll to parse ints
8 years ago
Eric Haszlakiewicz
e1561ed1df
Remove the Visual Studio project files as they were out of date, and should now be generated by using cmake.
8 years ago
Eric Haszlakiewicz
7e608c5728
Issue #359 : Use consistent spacing in CMakeLists.txt
8 years ago
Eric Haszlakiewicz
32f503f738
Issue #359 : Don't duplicate lh_get_hash, just omit the "inline" for VS2010.
8 years ago
Eric Haszlakiewicz
d58693b0f0
Merge pull request #359 from Haffon/api-0.12
update CMakeLists.txt for compile with visual studio at least 2010
8 years ago
Haffon
837a249f01
set JSON_C_HEADERS full file name
8 years ago
Haffon
e9f9f14f22
if compile with vs2015, enable the "static inline" declare.
8 years ago
Haffon
b301f4ea01
rollback api to 0.12
8 years ago
Haffon
86a3a6475f
Merge pull request #2 from json-c/master
merge upstream
8 years ago
Eric Haszlakiewicz
548d000891
Undo a bit of 2d1da5ab: handle per-thread formats for double serialization, even if --enable-threading wasn't specified.
8 years ago
Eric Haszlakiewicz
b2afca4560
Issue #173 : since some sscanf implementations return 0 for non-zero inputs, directly check for "0" in the input.
8 years ago
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.
8 years ago
Eric Haszlakiewicz
8777c9477a
Use AC_CONFIG_MACRO_DIRS to specify path to the ax macros instead of passing -I to autoreconf in autogen.sh.
8 years ago
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.
8 years ago
Eric Haszlakiewicz
ab0d4dbc69
Merge branch 'pull-211'
This is EmielBruijntes' "Atomic updates for the refcount"
8 years ago
Eric Haszlakiewicz
95dff31951
Issue #351 : don't redefine SIZE_T_MAX if it's already defined.
8 years ago
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.
8 years ago
Haffon
95e174e2fb
Merge pull request #1 from json-c/master
want to merge the original repository
8 years ago
Eric Haszlakiewicz
81f6edbfd5
PR#331: for Visual Studio, use a snprintf/vsnprintf wrapper that ensures the string is terminated.
8 years ago
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.
8 years ago
Eric Haszlakiewicz
256ebcd827
Merge pull request #346 from schwehr/get_int
Clamp double to int32 when narrowing in json_object_get_int.
8 years ago
Eric Haszlakiewicz
474376f30a
Merge pull request #345 from MrAnno/fix-make-dist
Fix make dist and make distcheck
8 years ago
Eric Haszlakiewicz
2f1fe55f66
Merge pull request #344 from fastogt/master
Fix Mingw build
8 years ago
Kurt Schwehr
ef7b08ce7f
Clamp double to int32 when narrowing in json_object_get_int.
Avoids undefined behavior. Found by autofuzz.
8 years ago
László Várady
e0e34f0a13
Fix 'make distcheck'
Signed-off-by: László Várady <laszlo.varady@balabit.com>
8 years ago
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>
8 years ago
topilski
0a99e7a5c1
Fix Mingw build
8 years ago
topilski
65884f4d9e
Fix parsing doubles for mingw
8 years ago
Eric Haszlakiewicz
af87944585
PR #336 : fix to previous change, be sure to include string.h when we're using the real strerror.
8 years ago
Eric Haszlakiewicz
36dbe2d74e
PR #336 : Fix typo in defining STRERROR_OVERRIDE_IMPL
8 years ago
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
8 years ago
Alexandru Ardelean
d8fbfc7aa1
build,travis: drop `-enable-strerror-override` argument (no longer exists)
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
8 years ago
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>
8 years ago
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.
8 years ago
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.
8 years ago
Eric Haszlakiewicz
40317f079e
Allow USE_VALGRIND to be set to anything starting with 0, N or n to disable valgrind during tests.
8 years ago
Eric Haszlakiewicz
c0b7d762b2
Merge pull request #336 from commodo/fix-tests
tests: fix tests in travis-ci.org
8 years ago
Alexandru Ardelean
bc2e30453b
build,travis: enable strerror override option in build
To get consistent output between Linux & OS X.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
8 years ago
Alexandru Ardelean
fb72160caf
build: make `strerror()` override-able
If we want to override `strerror()` in libjson-c
to make tests consistent across platforms, we
need to do it build-wide as configure/build
option.
Apple linkers make it really hard to override functions
at link-time, and this seems to be locked down on travis-ci.org
[ for security reasons I assume ].
While I got it to work locally, it did not work
when running on travis.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
8 years ago
Alexandru Ardelean
85f57859fd
configure.ac: check for `uselocale` function only on Linux platforms
On Apple this seems to fail the `test_locale` test,
which would imply that the `uselocale` function
does not behave as expected.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
8 years ago
Alexandru Ardelean
7b9432d564
tests: fix leak in `test_util_file` ; found by cppcheck
Which now seems to fail the build.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
8 years ago
Alexandru Ardelean
effab3f91a
travis,tests: run cppcheck only if it exists
ugh... seems cppcheck is not packaged for OS X
And `set -e` exposes this.
And also `cppcheck` seems to exit with non-zero
exit codes by default [even if errs found].
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
8 years ago
Alexandru Ardelean
9d47ae824c
tests: compress test_utile_file with test_basic
More code compression/de-duplication.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
8 years ago
Alexandru Ardelean
ba8625a701
tests: add `set -e` specifier to bail early on build run
Seems that test1 is failing, but travis is not catching it.
Likely, this is because the `cppcheck` returns success
and we need to bail on the `make check` step.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
8 years ago