Open greenduck opened 7 months ago
As it's declared in README:
cJSON is written in ANSI C (C89) in order to support as many platforms and compilers as possible.
cJSON is designed to use ANSI C/c89
. Many users are relying on this. We do not want to break this.
The purpose of this PR is to enable using cJSON in the kernel space, in particular Linux kernel.
This requirement has 3 consequences:
When building as a part of Linux kernel code, the KERNEL macro will be recognized automatically.
In order to build with no floating point numbers, introduce NO_FLOATING_POINT macro. This macro is automatically introduced in case KERNEL is present.
This PR strives to keep all the existing functionality unchanged.