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
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 >
2017-07-13 10:27:33 +03:00
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 >
2017-07-13 10:27:24 +03:00
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 >
2017-07-13 09:33:42 +03:00
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 >
2017-07-13 09:05:13 +03:00
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 >
2017-07-13 09:05:13 +03:00
Alexandru Ardelean
9d47ae824c
tests: compress test_utile_file with test_basic
...
More code compression/de-duplication.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2017-07-11 10:38:25 +03:00
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 >
2017-07-11 10:38:25 +03:00
Eric Haszlakiewicz
dd8dcb8228
Merge pull request #335 from commodo/build_status_travis
...
README.md: show build status tag from travis-ci.org
2017-07-11 00:16:12 -04:00
Alexandru Ardelean
061afc7993
README.md: show build status tag from travis & appveyor.
...
Looks nice to see a `Build Passing` tag when you
scroll to the README.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2017-07-10 11:45:24 +03:00
Eric Haszlakiewicz
b64402ede2
Move a variable declaration to the start of the block to work better with older compilers.
2017-07-09 16:09:09 -07:00
Eric Haszlakiewicz
a14ada5730
Remove a spurious comma in configure.ac
2017-07-09 16:00:32 -07:00
Eric Haszlakiewicz
33db761551
Updated expected test1 output which should have been included in commit fd9b3b2.
2017-07-09 15:22:53 -07:00
Eric Haszlakiewicz
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.
2017-07-09 15:13:02 -07:00
Eric Haszlakiewicz
f7a44ad101
Add extra casts to void * to squash some warning on certain systems (e.g. CentOS w/ gcc 4.1.2).
2017-07-09 15:08:21 -07:00
Eric Haszlakiewicz
7b7a76e161
Fix bad usage of strncat introduces in 1a94c70. Pointed out by @rouault in PR #331 .
2017-07-09 15:04:18 -07:00
Eric Haszlakiewicz
55ecae3e58
Eliminate static qualifiers on a couple local variables that were causing thread safety issues. Suggested by @rouault in PR #331 .
2017-07-09 14:56:18 -07:00
Eric Haszlakiewicz
5a99e527ff
Reformat json_object_double_to_json_string_format() to have consistent spacing.
2017-07-08 20:33:28 -07:00
Eric Haszlakiewicz
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 .
2017-07-08 19:35:06 -07:00
Eric Haszlakiewicz
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.
2017-07-08 19:04:35 -07:00
Eric Haszlakiewicz
7fd74fc7a3
Merge pull request #312 from Tailmon/master
...
Fix CMake Build process improved for MinGW and MSYS2
2017-07-08 21:25:48 -04:00
Eric Haszlakiewicz
4deed587e7
Merge pull request #319 from Dashlane/visual-studio-build
...
Windows: Fix dynamic library build with Visual Studio
2017-07-08 21:24:55 -04:00
Eric Haszlakiewicz
a3f97eeeeb
Merge pull request #329 from commodo/rename-static-lib
...
build,cmake: build,cmake: rename libjson-c-static.a to libjson-c.a
2017-07-08 15:44:27 -04:00
Eric Haszlakiewicz
db3115cee9
Merge pull request #330 from commodo/symlink_some_tests
...
tests: symlink basic tests to a single file that has the common code
2017-07-08 15:43:45 -04:00
Eric Haszlakiewicz
cc201fdcaa
Merge pull request #333 from besser82/bugfix/obsolete_macros_autotools
...
Replace obsolete AM_PROG_LIBTOOL
2017-07-08 15:17:17 -04:00
Björn Esser
cec97ebc6f
Replace obsolete AM_PROG_LIBTOOL
2017-07-04 12:54:46 +02:00
Alexandru Ardelean
73636c2ed0
tests: symlink basic tests to a single file that has the common code
...
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2017-06-22 10:08:26 +03:00
Alexandru Ardelean
8f6ecbf37b
build,cmake: set C_STANDARD 99 property to libjson-c-static
...
Apply the same property as to json-c.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2017-06-19 18:12:28 +03:00
Alexandru Ardelean
4fb2eefac2
build,cmake: rename libjson-c-static.a to libjson-c.a
...
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2017-06-19 18:08:45 +03:00
Eric Haszlakiewicz
a36396992d
Merge pull request #321 from commodo/fix-cmake-vasprintf
...
build,cmake: fix vasprintf implicit definition and generate both static & shared libs
2017-06-19 00:34:44 -04:00
Eric Haszlakiewicz
e8e574fbe4
Issue #161 : add a json_object_to_fd() function.
2017-06-18 18:44:45 +00:00
Eric Haszlakiewicz
23e064ad29
Fix test_double_serializer expected output.
2017-06-18 18:34:41 +00:00
Eric Haszlakiewicz
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.
2017-06-18 18:12:07 +00:00
Eric Haszlakiewicz
8581806558
Make _set_last_err() non-static so it can be used outside of json_util.c
2017-06-18 18:11:17 +00:00