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>.
This commit is contained in:
Kamil Rytarowski 2015-11-28 10:01:05 +01:00 committed by David Henningsson
parent 04737989ec
commit 2d555ba15c
2 changed files with 5 additions and 1 deletions

View file

@ -447,6 +447,7 @@ AC_CHECK_HEADERS_ONCE([sys/eventfd.h])
AC_CHECK_HEADERS_ONCE([execinfo.h]) AC_CHECK_HEADERS_ONCE([execinfo.h])
AC_CHECK_HEADERS_ONCE([langinfo.h]) AC_CHECK_HEADERS_ONCE([langinfo.h])
AC_CHECK_HEADERS_ONCE([regex.h pcreposix.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") AM_CONDITIONAL(HAVE_SYS_EVENTFD_H, test "x$ac_cv_header_sys_eventfd_h" = "xyes")

View file

@ -53,9 +53,13 @@
#endif #endif
#ifdef HAVE_STRTOD_L #ifdef HAVE_STRTOD_L
#ifdef HAVE_LOCALE_H
#include <locale.h> #include <locale.h>
#endif
#ifdef HAVE_XLOCALE_H
#include <xlocale.h> #include <xlocale.h>
#endif #endif
#endif
#ifdef HAVE_SCHED_H #ifdef HAVE_SCHED_H
#include <sched.h> #include <sched.h>
@ -106,7 +110,6 @@
#endif #endif
#ifdef __APPLE__ #ifdef __APPLE__
#include <xlocale.h>
#include <mach/mach_init.h> #include <mach/mach_init.h>
#include <mach/thread_act.h> #include <mach/thread_act.h>
#include <mach/thread_policy.h> #include <mach/thread_policy.h>