>From 407b452a469cb4deb1fb5d58860a6e7ceb4761be Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 7 Jan 2023 15:12:41 +0100 Subject: [PATCH 17/18] setlocale-null: Rename LIB_SETLOCALE_NULL to SETLOCALE_NULL_LIB. * m4/setlocale_null.m4: Rename LIB_SETLOCALE_NULL to SETLOCALE_NULL_LIB. All uses changed. * NEWS: Mention the change --- ChangeLog | 7 +++++++ NEWS | 3 +++ m4/duplocale.m4 | 4 ++-- m4/nl_langinfo.m4 | 4 ++-- m4/setlocale.m4 | 4 ++-- m4/setlocale_null.m4 | 15 +++++++++------ modules/hard-locale | 2 +- modules/setlocale-null | 2 +- modules/setlocale-null-tests | 6 +++--- tests/test-setlocale_null.c | 2 +- 10 files changed, 31 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index af5ae11f35..bd0f9bbfe5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2023-01-07 Bruno Haible + + setlocale-null: Rename LIB_SETLOCALE_NULL to SETLOCALE_NULL_LIB. + * m4/setlocale_null.m4: Rename LIB_SETLOCALE_NULL to SETLOCALE_NULL_LIB. + All uses changed. + * NEWS: Mention the change + 2023-01-07 Bruno Haible setlocale: Rename LIB_SETLOCALE to SETLOCALE_LIB. diff --git a/NEWS b/NEWS index adc1a5c7de..ee439a0784 100644 --- a/NEWS +++ b/NEWS @@ -74,6 +74,9 @@ User visible incompatible changes Date Modules Changes +2023-01-07 setlocale-null Link with $(SETLOCALE_NULL_LIB) instead of + $(LIB_SETLOCALE_NULL). + 2023-01-07 setlocale Link with $(SETLOCALE_LIB) instead of $(LIB_SETLOCALE). diff --git a/m4/duplocale.m4 b/m4/duplocale.m4 index 2e4686f078..c1525e90f5 100644 --- a/m4/duplocale.m4 +++ b/m4/duplocale.m4 @@ -1,4 +1,4 @@ -# duplocale.m4 serial 13 +# duplocale.m4 serial 14 dnl Copyright (C) 2009-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -111,7 +111,7 @@ int main () HAVE_DUPLOCALE=0 fi if test $REPLACE_DUPLOCALE = 1; then - DUPLOCALE_LIB="$LIB_SETLOCALE_NULL" + DUPLOCALE_LIB="$SETLOCALE_NULL_LIB" else DUPLOCALE_LIB= fi diff --git a/m4/nl_langinfo.m4 b/m4/nl_langinfo.m4 index 51e783ce86..f3192f30d1 100644 --- a/m4/nl_langinfo.m4 +++ b/m4/nl_langinfo.m4 @@ -1,4 +1,4 @@ -# nl_langinfo.m4 serial 8 +# nl_langinfo.m4 serial 9 dnl Copyright (C) 2009-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -62,7 +62,7 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO], HAVE_NL_LANGINFO=0 fi if test $HAVE_NL_LANGINFO = 0 || test $HAVE_LANGINFO_CODESET = 0; then - LIB_NL_LANGINFO="$LIB_SETLOCALE_NULL" + LIB_NL_LANGINFO="$SETLOCALE_NULL_LIB" else LIB_NL_LANGINFO= fi diff --git a/m4/setlocale.m4 b/m4/setlocale.m4 index 7e9e40889c..2e8094dc9a 100644 --- a/m4/setlocale.m4 +++ b/m4/setlocale.m4 @@ -1,4 +1,4 @@ -# setlocale.m4 serial 8 +# setlocale.m4 serial 9 dnl Copyright (C) 2011-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -66,7 +66,7 @@ int main () fi if test $NEED_SETLOCALE_MTSAFE = 1; then - SETLOCALE_LIB="$LIB_SETLOCALE_NULL" + SETLOCALE_LIB="$SETLOCALE_NULL_LIB" else SETLOCALE_LIB= fi diff --git a/m4/setlocale_null.m4 b/m4/setlocale_null.m4 index 032119d0f4..dd6a5ef538 100644 --- a/m4/setlocale_null.m4 +++ b/m4/setlocale_null.m4 @@ -1,4 +1,4 @@ -# setlocale_null.m4 serial 5 +# setlocale_null.m4 serial 6 dnl Copyright (C) 2019-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -74,20 +74,23 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL], dnl Determine link dependencies of lib/setlocale_null.c and lib/setlocale-lock.c. if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then case "$host_os" in - mingw*) LIB_SETLOCALE_NULL= ;; + mingw*) SETLOCALE_NULL_LIB= ;; *) gl_WEAK_SYMBOLS case "$gl_cv_have_weak" in - *yes) LIB_SETLOCALE_NULL= ;; - *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;; + *yes) SETLOCALE_NULL_LIB= ;; + *) SETLOCALE_NULL_LIB="$LIBPTHREAD" ;; esac ;; esac else - LIB_SETLOCALE_NULL= + SETLOCALE_NULL_LIB= fi - dnl LIB_SETLOCALE_NULL is expected to be '-pthread' or '-lpthread' on AIX + dnl SETLOCALE_NULL_LIB is expected to be '-pthread' or '-lpthread' on AIX dnl with gcc or xlc, and empty otherwise. + AC_SUBST([SETLOCALE_NULL_LIB]) + dnl For backward compatibility. + LIB_SETLOCALE_NULL="$SETLOCALE_NULL_LIB" AC_SUBST([LIB_SETLOCALE_NULL]) ]) diff --git a/modules/hard-locale b/modules/hard-locale index 2c7846442e..2dbe64e4a9 100644 --- a/modules/hard-locale +++ b/modules/hard-locale @@ -11,7 +11,7 @@ setlocale-null configure.ac: AC_REQUIRE([gl_FUNC_SETLOCALE_NULL]) -HARD_LOCALE_LIB="$LIB_SETLOCALE_NULL" +HARD_LOCALE_LIB="$SETLOCALE_NULL_LIB" AC_SUBST([HARD_LOCALE_LIB]) dnl For backward compatibility. LIB_HARD_LOCALE="$HARD_LOCALE_LIB" diff --git a/modules/setlocale-null b/modules/setlocale-null index 11ad6f1faa..91efd51483 100644 --- a/modules/setlocale-null +++ b/modules/setlocale-null @@ -33,7 +33,7 @@ Include: #include "setlocale_null.h" or #include Link: -$(LIB_SETLOCALE_NULL) +$(SETLOCALE_NULL_LIB) License: LGPLv2+ diff --git a/modules/setlocale-null-tests b/modules/setlocale-null-tests index 8f8b835f5a..d92e229133 100644 --- a/modules/setlocale-null-tests +++ b/modules/setlocale-null-tests @@ -18,6 +18,6 @@ check_PROGRAMS += \ test-setlocale_null \ test-setlocale_null-mt-one \ test-setlocale_null-mt-all -test_setlocale_null_LDADD = $(LDADD) @LIB_SETLOCALE_NULL@ -test_setlocale_null_mt_one_LDADD = $(LDADD) @LIB_SETLOCALE_NULL@ $(LIBMULTITHREAD) $(NANOSLEEP_LIB) -test_setlocale_null_mt_all_LDADD = $(LDADD) @LIB_SETLOCALE_NULL@ $(LIBMULTITHREAD) $(NANOSLEEP_LIB) +test_setlocale_null_LDADD = $(LDADD) @SETLOCALE_NULL_LIB@ +test_setlocale_null_mt_one_LDADD = $(LDADD) @SETLOCALE_NULL_LIB@ $(LIBMULTITHREAD) $(NANOSLEEP_LIB) +test_setlocale_null_mt_all_LDADD = $(LDADD) @SETLOCALE_NULL_LIB@ $(LIBMULTITHREAD) $(NANOSLEEP_LIB) diff --git a/tests/test-setlocale_null.c b/tests/test-setlocale_null.c index 73cbc3c095..2495964b60 100644 --- a/tests/test-setlocale_null.c +++ b/tests/test-setlocale_null.c @@ -27,6 +27,6 @@ static char buf[SETLOCALE_NULL_ALL_MAX]; int main () { - /* Check that setlocale_null_r() can be used with $(LIB_SETLOCALE_NULL). */ + /* Check that setlocale_null_r() can be used with $(SETLOCALE_NULL_LIB). */ return setlocale_null_r (LC_ALL, buf, sizeof (buf)) != 0; } -- 2.34.1