changeset 17911:05a21d5b996b

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.
author Kevin Cernekee <cernekee@google.com>
date Wed, 11 Feb 2015 15:22:58 -0800
parents 805a8eab2969
children 11fd1a35f9cf
files ChangeLog doc/posix-headers/monetary.texi modules/duplocale-tests tests/test-duplocale.c
diffstat 4 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Feb 11 15:22:57 2015 -0800
+++ b/ChangeLog	Wed Feb 11 15:22:58 2015 -0800
@@ -60,6 +60,14 @@
 	* lib/signal.in.h: Add Android to the list of platforms that declare
 	pthread_sigmask() in <pthread.h> instead of <signal.h>.
 
+	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  <ueno@gnu.org>
 
 	uniname/unimame-tests: don't link with -lunistring
--- a/doc/posix-headers/monetary.texi	Wed Feb 11 15:22:57 2015 -0800
+++ b/doc/posix-headers/monetary.texi	Wed Feb 11 15:22:58 2015 -0800
@@ -13,5 +13,5 @@
 @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
--- a/modules/duplocale-tests	Wed Feb 11 15:22:57 2015 -0800
+++ b/modules/duplocale-tests	Wed Feb 11 15:22:58 2015 -0800
@@ -4,9 +4,11 @@
 tests/macros.h
 
 Depends-on:
+langinfo
 
 configure.ac:
 AC_CHECK_FUNCS_ONCE([duplocale])
+AC_CHECK_HEADERS([monetary.h])
 
 Makefile.am:
 TESTS += test-duplocale
--- a/tests/test-duplocale.c	Wed Feb 11 15:22:57 2015 -0800
+++ b/tests/test-duplocale.c	Wed Feb 11 15:22:58 2015 -0800
@@ -20,7 +20,7 @@
 
 #include <locale.h>
 
-#if HAVE_DUPLOCALE
+#if HAVE_DUPLOCALE && HAVE_MONETARY_H
 
 #include "signature.h"
 SIGNATURE_CHECK (duplocale, locale_t, (locale_t));