From: Bruno Haible <bruno@clisp.org>
Date: Wed, 1 Jan 2020 15:42:49 +0000 (+0100)
Subject: hard-locale tests: Fix a conflict with the C++ tests.
X-Git-Tag: v1.0~4406
X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=bae00563655683adc5b14256dc2b85c2e8674605;p=gnulib.git

hard-locale tests: Fix a conflict with the C++ tests.

* modules/hard-locale-tests (Makefile.am): Build a program named
'current-locale', not 'locale'.
---

diff --git a/ChangeLog b/ChangeLog
index ac61fdf115..0bde2392a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-01-01  Bruno Haible  <bruno@clisp.org>
+
+	hard-locale tests: Fix a conflict with the C++ tests.
+	* modules/hard-locale-tests (Makefile.am): Build a program named
+	'current-locale', not 'locale'.
+
 2020-01-01  Bruno Haible  <bruno@clisp.org>
 
 	doc: Update documentation about wchar_t.
diff --git a/modules/hard-locale-tests b/modules/hard-locale-tests
index ddd101f175..ac7fcb2a67 100644
--- a/modules/hard-locale-tests
+++ b/modules/hard-locale-tests
@@ -15,5 +15,8 @@ AC_CHECK_FUNCS_ONCE([duplocale])
 Makefile.am:
 TESTS += test-hard-locale
 check_PROGRAMS += test-hard-locale
-noinst_PROGRAMS += locale
 test_hard_locale_LDADD = $(LDADD) $(LIB_SETLOCALE) @LIB_HARD_LOCALE@
+# We cannot call this program 'locale', because the C++ compiler on Mac OS X
+# would then barf upon '#include <locale>'. So, call it 'current-locale'.
+noinst_PROGRAMS += current-locale
+current_locale_SOURCES = locale.c