diff options
author | Kamil Rytarowski <n54@gmx.com> | 2015-11-28 10:01:05 +0100 |
---|---|---|
committer | David Henningsson <david.henningsson@canonical.com> | 2015-12-07 09:01:21 +0100 |
commit | 2d555ba15cc3c795c14962c7d5b5be69ee269a5a (patch) | |
tree | 4a63191215b798b048f0016fc34c807287decfba | |
parent | 04737989ec537e01d63c155807a5d19b0ec5b294 (diff) | |
download | pulseaudio-2d555ba15cc3c795c14962c7d5b5be69ee269a5a.tar.gz |
netbsd: Improve handling of <locale> and <xlocale.h> headers
NetBSD ships with strtod_l(3) in <stdlib.h>.
Having strtol_l(3) doesn't imply to have <xlocale.h>.
Generalize inclusion of <locale.h> and <xlocale.h>.
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | src/pulsecore/core-util.c | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index abfb8d91c..640be09f9 100644 --- a/configure.ac +++ b/configure.ac @@ -447,6 +447,7 @@ AC_CHECK_HEADERS_ONCE([sys/eventfd.h]) AC_CHECK_HEADERS_ONCE([execinfo.h]) AC_CHECK_HEADERS_ONCE([langinfo.h]) AC_CHECK_HEADERS_ONCE([regex.h pcreposix.h]) +AC_CHECK_HEADERS_ONCE([locale.h xlocale.h]) AM_CONDITIONAL(HAVE_SYS_EVENTFD_H, test "x$ac_cv_header_sys_eventfd_h" = "xyes") diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index b5ddd3d9b..3d36993b6 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -53,9 +53,13 @@ #endif #ifdef HAVE_STRTOD_L +#ifdef HAVE_LOCALE_H #include <locale.h> +#endif +#ifdef HAVE_XLOCALE_H #include <xlocale.h> #endif +#endif #ifdef HAVE_SCHED_H #include <sched.h> @@ -106,7 +110,6 @@ #endif #ifdef __APPLE__ -#include <xlocale.h> #include <mach/mach_init.h> #include <mach/thread_act.h> #include <mach/thread_policy.h> |