Commit Graph

911 Commits

Author SHA1 Message Date
Eric Haszlakiewicz
95737df9d4 Remove autoconf machinery, we're using cmake now. Update the release checklist to account for that, plus fill in other tasks and clean it up a bit. 2020-04-09 02:15:31 +00:00
Eric Haszlakiewicz
96ab2f6596 osx builds also need -DDISABLE_BSYMBOLIC=ON 2020-04-08 03:04:27 +00:00
Eric Haszlakiewicz
96bb334650 I have NFC why osx fails when "set -e" is in effect, but leave it off and clean up the rest of the debuging code in the travis config. 2020-04-08 02:54:10 +00:00
Eric Haszlakiewicz
f357081b57 Not all systems (e.g. osx) have malloc.h, include stdlib.h instead. 2020-04-08 02:53:48 +00:00
Eric Haszlakiewicz
2782a6b62c Try yet again to fix the osx build, this time do set +e 2020-04-08 02:39:03 +00:00
Eric Haszlakiewicz
a86ae1df9a Another attempt at debugging the travis osx build, this time just ignore errors. 2020-04-08 02:28:02 +00:00
Eric Haszlakiewicz
829e0829dd Wait a while before exiting travis to allow output to flush. 2020-04-08 02:17:14 +00:00
Eric Haszlakiewicz
cf8421c36d Apparently cmake is already installed on travis osx builds. Try another approach to figure out what was failing. 2020-04-08 02:02:25 +00:00
Eric Haszlakiewicz
fb0b653612 Install cmake on osx travis builds. s/make check/make test/ 2020-04-08 01:45:49 +00:00
Eric Haszlakiewicz
a3b82cbc77 Perform the travis build in a subdir, so the distcheck target works. 2020-04-08 01:34:22 +00:00
Eric Haszlakiewicz
677a8ccf44 Switch travis to use cmake instead of autoconf. 2020-04-08 01:21:11 +00:00
Eric Haszlakiewicz
19bbf2c069 Add includes and split off json_types.h to help ensure that headers can be included in any order. 2020-04-06 13:55:27 +00:00
Eric Haszlakiewicz
5e19c26cae Don't let clang-format rearrange Windows includes, since they need to be in a particular order. 2020-04-06 02:47:34 +00:00
Eric Haszlakiewicz
9acc4e9d71 Format random_seed.c with clang-format, with key asm sections excluded. 2020-04-06 01:52:28 +00:00
Eric Haszlakiewicz
9a494081cb Update the style guide to mention that we're using clang-format now. 2020-04-06 01:49:14 +00:00
Eric Haszlakiewicz
31f1ab2be1 Merge pull request #555 from dota17/chang_format_3
Format json-c with clang-format tool
2020-04-03 00:13:34 -04:00
dota17
8b162c4b89 clang-format the files 2020-04-03 11:39:30 +08:00
dota17
c117d8a8a8 add the disabling formatting coments and adjust the partial code manuly 2020-04-03 11:28:04 +08:00
dota17
a8cec740f0 add options 2020-04-03 11:27:25 +08:00
dota17
df7833e9a3 clang-format 2020-04-03 11:27:08 +08:00
Eric Haszlakiewicz
ed54353d84 Merge pull request #563 from robybeen/master
Changed order of calloc args to match stdlib
2020-04-02 22:35:21 -04:00
Robert
5d9b8e0fef Changed order of calloc args to match stdlib (2)
Although it is currently working, it's worth to stick with the stdlib definition to avoid further problems
2020-04-02 19:28:55 +02:00
Robert
56f81811c2 Changed order of calloc args to match stdlib
Although it is currently working, it's worth to stick with the stdlib definition to avoid further problems
2020-04-02 19:23:10 +02:00
Eric Haszlakiewicz
6afcf1606b Merge pull request #562 from dota17/testcase_add
Bugfix and testcases supplements
2020-04-02 11:23:39 -04:00
dota17
3822177473 add test cases 2020-03-31 19:12:45 +08:00
Chen
c2ba379b03 Merge pull request #561 from dota17/add_badge
add the badge in README.md and test the coveralls
2020-03-31 10:54:45 +08:00
dota17
203bacb24d add the badge in README.md and test the coveralls 2020-03-30 17:17:28 +08:00
Chen
d1650a582e Merge pull request #541 from dota17/coveralls_final
add coveralls auto tool to json-c
2020-03-28 10:42:17 +08:00
dota17
541a0b609a modify the coveralls configuration file 2020-03-23 11:38:18 +08:00
Chen
353ef26bda Merge pull request #558 from dota17/doc_message_modify
modify the doc target message
2020-03-20 11:17:20 +08:00
dota17
1204a1fded modify the doc target message 2020-03-19 10:27:27 +08:00
Eric Haszlakiewicz
a06339215e Merge pull request #556 from Jehan/wip/Jehan/fix-broken-mingw-w64
Fixes various Wreturn-type and Wimplicit-fallthrough errors on Mingw-w64
2020-03-16 21:24:14 -05:00
Jehan
b15e7ba470 Fixes various Wreturn-type and Wimplicit-fallthrough errors on Mingw-w64
This is a recent regression since commit
6359b79847 which added various assert(0)
calls (often replacing return-s).
With Ming-W64 compiler, json-c build was failing with various errors of
the sort:

> /home/jehan/dev/src/json-c/json_object.c: In function 'json_object_int_inc':
> /home/jehan/dev/src/json-c/json_object.c:841:1: error: control reaches end of non-void function [-Werror=return-type]
>   841 | }
>       | ^
> In file included from /home/jehan/dev/src/json-c/json_object.c:17:
> /home/jehan/dev/src/json-c/json_object.c: In function 'json_object_get_double':
> /home/jehan/.local/share/crossroad/roads/w64/json-c/include/assert.h:76:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
>    76 |   (_assert(#_Expression,__FILE__,__LINE__),0))
>       |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /home/jehan/dev/src/json-c/json_object.c:1070:7: note: in expansion of macro 'assert'
>  1070 |       assert(0);
>       |       ^~~~~~
> /home/jehan/dev/src/json-c/json_object.c:1072:3: note: here
>  1072 |   case json_type_boolean:
>       |   ^~~~

The problem is that Mingw-w64 does not consider assert() as a noreturn
(even assert(0)), because it has to be compatible by Microsoft
libraries. See the discussion here:
https://sourceforge.net/p/mingw-w64/bugs/306/

Instead let's create a new json_abort() function which is basically just
an abort() function with an optional message, for such cases where
abortion was non-conditional (using assert() and using the assertion
condition as a message here was clearly a misuse of the function). And
mark json_abort() as 'noreturn', as well as 'cold' for optimization
purpose (this is code we expect to never run, unless there is a bug,
that is).

Finally let's use this json_abort() instead of previous misused assert()
calls.
2020-03-16 19:53:28 +01:00
Eric Haszlakiewicz
e94eb90f9f Merge pull request #546 from dota17/make_unistall
Add uninstall target in cmake
2020-03-10 22:12:13 -05:00
dota17
c14c6caa32 delete -r in uninstall 2020-03-11 10:47:04 +08:00
Eric Haszlakiewicz
a8c9284f06 Merge pull request #547 from dota17/assert_test
modify json-c default build type, and fix up the assert() errors in t…
2020-03-03 07:54:21 -06:00
dota17
0030e905b4 modify RELEASE 2020-03-03 14:16:13 +08:00
dota17
e56ab0146f update testcase and delete debug -O0 build 2020-03-02 20:19:35 +08:00
Eric Haszlakiewicz
b3296e778f Follow up the PR#542: improve assert() calls, simplify code in json_object_equal(). 2020-03-02 02:08:49 +00:00
Eric Haszlakiewicz
737aee40c4 Merge pull request #542 from dota17/adduint64_final
add uint64 data to json-c
2020-03-01 08:51:26 -05:00
dota17
2d44f865c3 modify json-c default build type, and fix up the assert() errors in testcase 2020-02-29 15:32:42 +08:00
dota17
6359b79847 update json_object.c and testcase, delete json_object_uint_inc() 2020-02-28 17:51:56 +08:00
dota17
9532f94fa4 modify partial functions and testcase, in order to support automatic conversion for int64/uint64 2020-02-28 09:25:02 +08:00
dota17
1160c8625c Add uninstall target in cmake 2020-02-27 21:02:31 +08:00
dota17
c816de212b modify the json_object, replace c_int64/c_uint64 with struct{union{int64, uint64},...} 2020-02-27 10:26:27 +08:00
Eric Haszlakiewicz
30e00cf757 Merge pull request #545 from dota17/make_doc
add doc target in cmake
2020-02-26 20:56:22 -05:00
dota17
e3b6521baa add doc target on cmake 2020-02-26 18:18:07 +08:00
Eric Haszlakiewicz
5a2b9139f9 Merge pull request #544 from dota17/distcheck
Increase distcheck target in cmake
2020-02-25 21:48:35 -05:00
Eric Haszlakiewicz
a0129c9761 Merge pull request #543 from dota17/readme
Readme
2020-02-25 21:38:18 -05:00
dota17
77d7a99c75 Increase distcheck target in cmake 2020-02-25 19:15:40 +08:00