guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

06/07: gnu: glibc: Ensure C.UTF-8 locale is always found.


From: guix-commits
Subject: 06/07: gnu: glibc: Ensure C.UTF-8 locale is always found.
Date: Sat, 9 Dec 2023 09:54:38 -0500 (EST)

civodul pushed a commit to branch core-updates
in repository guix.

commit 1cebc334a77030c0c94955981652f4df7608c9e3
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Dec 7 10:48:23 2023 +0100

    gnu: glibc: Ensure C.UTF-8 locale is always found.
    
    This change ensures that $prefix/lib/locale, which now contains C.UTF-8
    data, is always searched.  Thus, “setlocale (LC_ALL, "C.UTF-8")” is
    guaranteed to always succeed.
    
    * gnu/packages/patches/glibc-2.37-versioned-locpath.patch: Adjust.
    
    Change-Id: I6aaf2757da98e811aa55e0959126065537cd8970
---
 .../patches/glibc-2.37-versioned-locpath.patch     | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/patches/glibc-2.37-versioned-locpath.patch 
b/gnu/packages/patches/glibc-2.37-versioned-locpath.patch
index 8685f2c3b7..1f34292ad0 100644
--- a/gnu/packages/patches/glibc-2.37-versioned-locpath.patch
+++ b/gnu/packages/patches/glibc-2.37-versioned-locpath.patch
@@ -12,6 +12,20 @@ that variable.  So, if GUIX_LOCPATH=/foo:/bar, locale data 
is searched for in
 That way, a single 'GUIX_LOCPATH' setting can work even if different libc
 versions coexist on the system.
 
+diff --git a/locale/Makefile b/locale/Makefile
+index d7036b08..b5125166 100644
+--- a/locale/Makefile
++++ b/locale/Makefile
+@@ -94,7 +94,9 @@ localepath = "$(complocaledir):$(i18ndir)"
+ # -Iprograms doesn't really belong here, but this gets it at the head
+ # of the list instead of the tail, where CPPFLAGS-$(lib) gets added.
+ # We need it before the standard -I's to see programs/config.h first.
++# Define 'LOCALEDIR' for use in 'compute_locale_search_path'.
+ locale-CPPFLAGS = -DCOMPLOCALEDIR='"$(complocaledir)"' \
++                -DLOCALEDIR='"$(libdir)/locale"'     \
+                 -DLOCALE_ALIAS_PATH='"$(localedir)"' \
+                 -Iprograms
+ 
 diff --git a/locale/newlocale.c b/locale/newlocale.c
 index 108d2428..6218e0fa 100644
 --- a/locale/newlocale.c
@@ -56,7 +70,7 @@ diff --git a/locale/setlocale.c b/locale/setlocale.c
 index 6a902faa..2d07a644 100644
 --- a/locale/setlocale.c
 +++ b/locale/setlocale.c
-@@ -213,12 +213,65 @@ setdata (int category, struct __locale_data *data)
+@@ -213,12 +213,71 @@ setdata (int category, struct __locale_data *data)
      }
  }
  
@@ -104,6 +118,12 @@ index 6a902faa..2d07a644 100644
 +      goto bail_out;
 +    }
 +
++  /* Last, unconditionally append our own locale directory, which should
++     contain data for C.UTF-8.  */
++  if (__argz_add_sep (locale_path, locale_path_len,
++                    LOCALEDIR "/" VERSION, ':') != 0)
++    goto bail_out;
++
 +  return 0;
 +
 + bail_out:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]