From 52f74ee1b448d6927811732a85e232cde37d5a32 Mon Sep 17 00:00:00 2001 From: Kevin Cernekee Date: Wed, 11 Feb 2015 15:22:58 -0800 Subject: [PATCH] duplocale: Fix Android build of duplocale-tests * modules/duplocale-tests (Depends-on): Add langinfo, as the header is included by test-duplocale.c (but not by duplocale.c). * modules/duplocale-tests (configure.ac): Check for monetary.h. * tests/test-duplocale.c: Skip test if monetary.h is absent. * doc/posix-headers/monetary.texi: Add Android to the list of platforms missing monetary.h. --- ChangeLog | 8 ++++++++ doc/posix-headers/monetary.texi | 2 +- modules/duplocale-tests | 2 ++ tests/test-duplocale.c | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d74ae320d5..99a97524c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -60,6 +60,14 @@ * lib/signal.in.h: Add Android to the list of platforms that declare pthread_sigmask() in instead of . + duplocale: Fix Android build of duplocale-tests + * modules/duplocale-tests (Depends-on): Add langinfo, as the header + is included by test-duplocale.c (but not by duplocale.c). + * modules/duplocale-tests (configure.ac): Check for monetary.h. + * tests/test-duplocale.c: Skip test if monetary.h is absent. + * doc/posix-headers/monetary.texi: Add Android to the list of + platforms missing monetary.h. + 2015-02-08 Daiki Ueno uniname/unimame-tests: don't link with -lunistring diff --git a/doc/posix-headers/monetary.texi b/doc/posix-headers/monetary.texi index 95170eb149..baf2cd61f0 100644 --- a/doc/posix-headers/monetary.texi +++ b/doc/posix-headers/monetary.texi @@ -13,5 +13,5 @@ Portability problems not fixed by Gnulib: @itemize @item This header file is missing on some platforms: -NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, BeOS. +NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, Cygwin, mingw, MSVC 9, BeOS, Android. @end itemize diff --git a/modules/duplocale-tests b/modules/duplocale-tests index af9dc9889d..9cd9d44f38 100644 --- a/modules/duplocale-tests +++ b/modules/duplocale-tests @@ -4,9 +4,11 @@ tests/signature.h tests/macros.h Depends-on: +langinfo configure.ac: AC_CHECK_FUNCS_ONCE([duplocale]) +AC_CHECK_HEADERS([monetary.h]) Makefile.am: TESTS += test-duplocale diff --git a/tests/test-duplocale.c b/tests/test-duplocale.c index f5da517bf3..18913f1b8b 100644 --- a/tests/test-duplocale.c +++ b/tests/test-duplocale.c @@ -20,7 +20,7 @@ #include -#if HAVE_DUPLOCALE +#if HAVE_DUPLOCALE && HAVE_MONETARY_H #include "signature.h" SIGNATURE_CHECK (duplocale, locale_t, (locale_t)); -- 2.39.5