Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
jansson_config.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010-2016 Petri Lehtinen <petri@digip.org>
3 *
4 * Jansson is free software; you can redistribute it and/or modify
5 * it under the terms of the MIT license. See LICENSE for details.
6 *
7 *
8 * This file specifies a part of the site-specific configuration for
9 * Jansson, namely those things that affect the public API in
10 * jansson.h.
11 *
12 * The CMake system will generate the jansson_config.h file and
13 * copy it to the build and install directories.
14 */
15
16#ifndef JANSSON_CONFIG_H
17#define JANSSON_CONFIG_H
18
19/* Define this so that we can disable scattered automake configuration in source files */
20#ifndef JANSSON_USING_CMAKE
21#define JANSSON_USING_CMAKE
22#endif
23
24/* Note: when using cmake, JSON_INTEGER_IS_LONG_LONG is not defined nor used,
25 * as we will also check for __int64 etc types.
26 * (the definition was used in the automake system) */
27
28/* Bring in the cmake-detected defines */
29#define HAVE_STDINT_H 1
30/* #undef HAVE_INTTYPES_H */
31#define HAVE_SYS_TYPES_H 1
32
33/* Include our standard type header for the integer typedef */
34
35#if defined(HAVE_STDINT_H)
36# include <stdint.h>
37#elif defined(HAVE_INTTYPES_H)
38# include <inttypes.h>
39#elif defined(HAVE_SYS_TYPES_H)
40# include <sys/types.h>
41#endif
42
43
44/* If your compiler supports the inline keyword in C, JSON_INLINE is
45 defined to `inline', otherwise empty. In C++, the inline is always
46 supported. */
47#ifdef __cplusplus
48#define JSON_INLINE inline
49#else
50#define JSON_INLINE inline
51#endif
52
53
54#define json_int_t long long
55#define json_strtoint strtoll
56#define JSON_INTEGER_FORMAT "lld"
57
58
59/* If locale.h and localeconv() are available, define to 1, otherwise to 0. */
60#define JSON_HAVE_LOCALECONV 1
61
62/* If __atomic builtins are available they will be used to manage
63 reference counts of json_t. */
64#define JSON_HAVE_ATOMIC_BUILTINS 1
65
66/* If __atomic builtins are not available we try using __sync builtins
67 to manage reference counts of json_t. */
68#define JSON_HAVE_SYNC_BUILTINS 1
69
70/* Maximum recursion depth for parsing JSON input.
71 This limits the depth of e.g. array-within-array constructions. */
72#define JSON_PARSER_MAX_DEPTH 2048
73
74#endif