summaryrefslogtreecommitdiff
path: root/strerror_override.c
Commit message (Collapse)AuthorAgeFilesLines
* Properly format errnos in _json_c_strerrorTobias Stoeckmann2020-08-221-1/+2
| | | | | | | | | | | | | | | The function _json_c_strerror does not properly format unknown errnos. The int to ascii loop ignores the leading digit if the number can be divided by 10 and if an errno has been formatted, shorter errnos would not properly terminate the newly created string, showing the ending numbers of the previous output. A test case has been added to show these effects. Since this function has been introduced for tests, the effect of this on real life code is basically non-existing. First an environment variable has to be set to activate this strerror code and second an unknown errno would have to be encountered.
* Change the strerror_override handling to check $_JSON_C_STRERROR_OVERRIDE ↵Eric Haszlakiewicz2020-07-041-1/+4
| | | | instead of using a variable, so we don't need to export it.
* Improved support for IBM operating systemsDavid McCann2020-05-141-0/+2
| | | | Fix compiler errors and warnings when building on IBM operating systems such as AIX and IBM i.
* clang-format the filesdota172020-04-031-4/+5
|
* add the disabling formatting coments and adjust the partial code manulydota172020-04-031-0/+2
|
* PR #336: Fix typo in defining STRERROR_OVERRIDE_IMPLEric Haszlakiewicz2017-07-271-1/+1
|
* PR #336: since we can't use function overriding (due to problems with it onEric Haszlakiewicz2017-07-151-0/+7
| | | | | OSX) always include the _json_c_strerror function but only enable it with a flag during tests.
* build: make `strerror()` override-ableAlexandru Ardelean2017-07-131-0/+94
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>