All our public headers strive to C90 compatibility with a few
extensions, and thus avoided stdbool.h and bool.
The sd_json_format_enabled() helper seems like a poor place to start
requiring stdbool.h now.
Also drop __extension__ since we are not using it anywhere else in very
similar inline functions.
(And we probably should drop any _sd_const declarations on inline
functions. Given that the compiler has the function implementation
around always, because it's in the header there's really no reason to
specify this manually, the compiler can trivially figure this out on its
own. But that's for another time.)
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
-#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
const char* sd_json_variant_type_to_string(sd_json_variant_type_t t);
sd_json_variant_type_t sd_json_variant_type_from_string(const char *s);
-__extension__ _sd_const_ static __inline__ bool sd_json_format_enabled(sd_json_format_flags_t flags) {
+_sd_const_ static __inline__ int sd_json_format_enabled(sd_json_format_flags_t flags) {
return !(flags & SD_JSON_FORMAT_OFF);
}
***/
#include <errno.h>
-#include <stdbool.h>
#include <stdio.h>
#include "sd-json.h"