]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
Issue #246: Include xlocale.h too, to get locale_t defined, since not all OSes includ...
authorEric Haszlakiewicz <erh+git@nimenees.com>
Wed, 3 Aug 2016 02:25:05 +0000 (22:25 -0400)
committerEric Haszlakiewicz <erh+git@nimenees.com>
Wed, 3 Aug 2016 02:25:05 +0000 (22:25 -0400)
configure.ac
json_tokener.c
tests/test_locale.c

index a08fa168ea073d061442d74fe0154f7957c310dd..161ff0073a268783f2c8692a7422bf7c8d0bc81e 100644 (file)
@@ -34,7 +34,7 @@ AC_PROG_CC_C99
 AC_CONFIG_HEADER(config.h)
 AC_CONFIG_HEADER(json_config.h)
 AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h limits.h strings.h syslog.h unistd.h [sys/cdefs.h] [sys/param.h] stdarg.h locale.h endian.h)
+AC_CHECK_HEADERS(fcntl.h limits.h strings.h syslog.h unistd.h [sys/cdefs.h] [sys/param.h] stdarg.h locale.h xlocale.h endian.h)
 AC_CHECK_HEADER(inttypes.h,[AC_DEFINE([JSON_C_HAVE_INTTYPES_H],[1],[Public define for json_inttypes.h])])
 
 # Checks for typedefs, structures, and compiler characteristics.
index 0c4007c48ef9d6305c05b27daa8c741813542386..fdee1b3b2c2887629394b4f55b0274c82f2f9c2a 100644 (file)
@@ -35,6 +35,9 @@
 #ifdef HAVE_LOCALE_H
 #include <locale.h>
 #endif /* HAVE_LOCALE_H */
+#ifdef HAVE_XLOCALE_H
+#include <xlocale.h>
+#endif
 
 #define jt_hexdigit(x) (((x) <= '9') ? (x) - '0' : ((x) & 7) + 9)
 
index f7f481c6c291e9d3f8e0d28ce000f22bb238f0ba..a3e319da1bfcd19fe2c6a0b5f48572e59629f865 100644 (file)
@@ -11,6 +11,9 @@
 #ifdef HAVE_LOCALE_H
 #include <locale.h>
 #endif /* HAVE_LOCALE_H */
+#ifdef HAVE_XLOCALE_H
+#include <xlocale.h>
+#endif
 
 int main(int argc, char **argv)
 {