jansson_config.h.cmake 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. #ifndef JANSSON_CONFIG_H
  16. #define JANSSON_CONFIG_H
  17. /* Define this so that we can disable scattered automake configuration in source files */
  18. #ifndef JANSSON_USING_CMAKE
  19. #define JANSSON_USING_CMAKE
  20. #endif
  21. /* Note: when using cmake, JSON_INTEGER_IS_LONG_LONG is not defined nor used,
  22. * as we will also check for __int64 etc types.
  23. * (the definition was used in the automake system) */
  24. /* Bring in the cmake-detected defines */
  25. #cmakedefine HAVE_STDINT_H 1
  26. #cmakedefine HAVE_INTTYPES_H 1
  27. #cmakedefine HAVE_SYS_TYPES_H 1
  28. /* Include our standard type header for the integer typedef */
  29. #if defined(HAVE_STDINT_H)
  30. # include <stdint.h>
  31. #elif defined(HAVE_INTTYPES_H)
  32. # include <inttypes.h>
  33. #elif defined(HAVE_SYS_TYPES_H)
  34. # include <sys/types.h>
  35. #endif
  36. /* If your compiler supports the inline keyword in C, JSON_INLINE is
  37. defined to `inline', otherwise empty. In C++, the inline is always
  38. supported. */
  39. #ifdef __cplusplus
  40. #define JSON_INLINE inline
  41. #else
  42. #define JSON_INLINE @JSON_INLINE@
  43. #endif
  44. #define json_int_t @JSON_INT_T@
  45. #define json_strtoint @JSON_STRTOINT@
  46. #define JSON_INTEGER_FORMAT @JSON_INTEGER_FORMAT@
  47. /* If locale.h and localeconv() are available, define to 1, otherwise to 0. */
  48. #define JSON_HAVE_LOCALECONV @JSON_HAVE_LOCALECONV@
  49. /* Maximum recursion depth for parsing JSON input.
  50. This limits the depth of e.g. array-within-array constructions. */
  51. #define JSON_PARSER_MAX_DEPTH 2048
  52. #endif