diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-01-14 07:55:37 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-01-14 07:55:37 +0800 |
commit | 81482506607042ffb006d571f02da9382b6ca33b (patch) | |
tree | f2132fe4d65570680c9b0d813c0ca3a3b1090a6a | |
parent | 8d4b8195833c9ace6b5a2259a7daaa567bc6eee0 (diff) |
langinfo use is based on header presence
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | handler.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 7f4be42..f18a8c9 100644 --- a/configure.ac +++ b/configure.ac @@ -6,6 +6,8 @@ LT_INIT PKG_CHECK_MODULES([TIDY], [tidy]) AC_CHECK_HEADERS([threads.h], [AC_DEFINE([HAVE_THREADS_H])]) +AC_CHECK_HEADERS([langinfo.h], + [AC_DEFINE([HAVE_LANGINFO_H])]) AC_CHECK_HEADER_STDBOOL AC_C_INLINE AC_CHECK_FUNCS([memset]) @@ -1,6 +1,8 @@ #include <stdbool.h> #include <locale.h> +#ifdef HAVE_LANGINFO_H #include <langinfo.h> +#endif #include <tidy.h> #include <tidybuffio.h> #include "icclient.h" @@ -99,7 +101,7 @@ static void recurse(TidyDoc doc, TidyNode tnod, struct icclient_catalog **catalo strcpy(*category, text); } else { is_price = false; -#ifndef __ANDROID__ +#ifdef HAVE_LANGINFO_H char *symbol = nl_langinfo_l(CRNCYSTR, loc); size_t symbol_len = strlen(symbol) - 1; if (symbol[0] == '-') |