From 858c3d93703ef6a444effce583a8d45ac0753df6 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Sun, 23 Nov 2014 21:49:09 +0100 Subject: [PATCH] jansson: use config.h new name (like v2.7) to prevent config.h conflicts --- compat/jansson/.gitignore | 1 - compat/jansson/Makefile.am | 2 +- compat/jansson/configure.ac | 2 +- compat/jansson/jansson_config.h.in | 39 +++++ .../{config.h => jansson_private_config.h} | 4 +- compat/jansson/jansson_private_config.h.in | 139 ++++++++++++++++++ compat/jansson/strconv.c | 4 +- compat/jansson/utf.h | 2 +- 8 files changed, 185 insertions(+), 8 deletions(-) create mode 100644 compat/jansson/jansson_config.h.in rename compat/jansson/{config.h => jansson_private_config.h} (95%) create mode 100644 compat/jansson/jansson_private_config.h.in diff --git a/compat/jansson/.gitignore b/compat/jansson/.gitignore index 55344a1..1a81967 100644 --- a/compat/jansson/.gitignore +++ b/compat/jansson/.gitignore @@ -1,4 +1,3 @@ -*.h.in *.h.in~ libtool libjansson.a diff --git a/compat/jansson/Makefile.am b/compat/jansson/Makefile.am index e27f05a..29e9745 100644 --- a/compat/jansson/Makefile.am +++ b/compat/jansson/Makefile.am @@ -2,7 +2,7 @@ noinst_LIBRARIES = libjansson.a libjansson_a_SOURCES = \ - config.h \ + jansson_private_config.h \ dump.c \ error.c \ hashtable.c hashtable.h \ diff --git a/compat/jansson/configure.ac b/compat/jansson/configure.ac index e7e88a4..defa183 100644 --- a/compat/jansson/configure.ac +++ b/compat/jansson/configure.ac @@ -7,7 +7,7 @@ AM_INIT_AUTOMAKE([1.10 foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_CONFIG_SRCDIR([value.c]) -AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_HEADERS([jansson_private_config.h]) # Checks for programs. AC_PROG_CC diff --git a/compat/jansson/jansson_config.h.in b/compat/jansson/jansson_config.h.in new file mode 100644 index 0000000..12580a0 --- /dev/null +++ b/compat/jansson/jansson_config.h.in @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2010-2014 Petri Lehtinen + * + * Jansson is free software; you can redistribute it and/or modify + * it under the terms of the MIT license. See LICENSE for details. + * + * + * This file specifies a part of the site-specific configuration for + * Jansson, namely those things that affect the public API in + * jansson.h. + * + * The configure script copies this file to jansson_config.h and + * replaces @var@ substitutions by values that fit your system. If you + * cannot run the configure script, you can do the value substitution + * by hand. + */ + +#ifndef JANSSON_CONFIG_H +#define JANSSON_CONFIG_H + +/* If your compiler supports the inline keyword in C, JSON_INLINE is + defined to `inline', otherwise empty. In C++, the inline is always + supported. */ +#ifdef __cplusplus +#define JSON_INLINE inline +#else +#define JSON_INLINE @json_inline@ +#endif + +/* If your compiler supports the `long long` type and the strtoll() + library function, JSON_INTEGER_IS_LONG_LONG is defined to 1, + otherwise to 0. */ +#define JSON_INTEGER_IS_LONG_LONG @json_have_long_long@ + +/* If locale.h and localeconv() are available, define to 1, + otherwise to 0. */ +#define JSON_HAVE_LOCALECONV @json_have_localeconv@ + +#endif diff --git a/compat/jansson/config.h b/compat/jansson/jansson_private_config.h similarity index 95% rename from compat/jansson/config.h rename to compat/jansson/jansson_private_config.h index bbc54b9..2eb70a8 100644 --- a/compat/jansson/config.h +++ b/compat/jansson/jansson_private_config.h @@ -1,5 +1,5 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ +/* jansson_private_config.h. Generated from jansson_private_config.h.in by configure. */ +/* jansson_private_config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if gcc's __atomic builtins are available */ /* #undef HAVE_ATOMIC_BUILTINS */ diff --git a/compat/jansson/jansson_private_config.h.in b/compat/jansson/jansson_private_config.h.in new file mode 100644 index 0000000..7c07084 --- /dev/null +++ b/compat/jansson/jansson_private_config.h.in @@ -0,0 +1,139 @@ +/* jansson_private_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if gcc's __atomic builtins are available */ +#undef HAVE_ATOMIC_BUILTINS + +/* Define to 1 if you have the `close' function. */ +#undef HAVE_CLOSE + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ENDIAN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `getpid' function. */ +#undef HAVE_GETPID + +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `localeconv' function. */ +#undef HAVE_LOCALECONV + +/* Define to 1 if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define to 1 if the system has the type `long long int'. */ +#undef HAVE_LONG_LONG_INT + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `open' function. */ +#undef HAVE_OPEN + +/* Define to 1 if you have the `read' function. */ +#undef HAVE_READ + +/* Define to 1 if you have the header file. */ +#undef HAVE_SCHED_H + +/* Define to 1 if you have the `sched_yield' function. */ +#undef HAVE_SCHED_YIELD + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strtoll' function. */ +#undef HAVE_STRTOLL + +/* Define to 1 if gcc's __sync builtins are available */ +#undef HAVE_SYNC_BUILTINS + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if /dev/urandom should be used for seeding the hash function */ +#undef USE_URANDOM + +/* Define to 1 if CryptGenRandom should be used for seeding the hash function + */ +#undef USE_WINDOWS_CRYPTOAPI + +/* Version number of package */ +#undef VERSION + +/* Define for Solaris 2.5.1 so the uint32_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +#undef _UINT32_T + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define to the type of a signed integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +#undef int32_t + +/* Define to the type of an unsigned integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +#undef uint32_t diff --git a/compat/jansson/strconv.c b/compat/jansson/strconv.c index 3e2cb7c..1c2472e 100644 --- a/compat/jansson/strconv.c +++ b/compat/jansson/strconv.c @@ -5,9 +5,9 @@ #include "jansson_private.h" #include "strbuffer.h" -/* need config.h to get the correct snprintf */ +/* need jansson_private_config.h to get the correct snprintf */ #ifdef HAVE_CONFIG_H -#include +#include "jansson_private_config.h" #endif #if JSON_HAVE_LOCALECONV diff --git a/compat/jansson/utf.h b/compat/jansson/utf.h index c5af8ed..4c8fc57 100644 --- a/compat/jansson/utf.h +++ b/compat/jansson/utf.h @@ -9,7 +9,7 @@ #define UTF_H #ifdef HAVE_CONFIG_H -#include +#include "jansson_private_config.h" #ifdef HAVE_INTTYPES_H /* inttypes.h includes stdint.h in a standard environment, so there's