This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Incorrect first_weekday for POSIX locale
- From: Petter Reinholdtsen <petter dot reinholdtsen at usit dot uio dot no>
- To: libc-alpha at sources dot redhat dot com
- Date: Wed, 26 May 2004 13:39:56 +0200
- Subject: Re: Incorrect first_weekday for POSIX locale
- References: <E1BQCa3-0003Vl-00@minerva.hungry.com>
- Reply-by: Tue, 1 Jan 1801 04:37:40 +1000
[Petter Reinholdtsen]
> The nb_NO locales with no first_weekday value return 1. Is the
> POSIX locale broken, or am I mistaken?
I concluded that the POSIX locale is broken. Here is a patch to fix
it.
I added the name of the variable as a comment, to make it easier to
keep track of which variable is which in the file. Would a patch to
add more of these comments be accepted?
2004-05-26 Petter Reinholdtsen <pere@hungry.com>
* locale/C-time.c: Correct first_weekday for C and POSIX locale.
First weekday should be sunday (1) and identical to first
workday. [BZ #181]
Index: locale/C-time.c
===================================================================
RCS file: /cvs/glibc/libc/locale/C-time.c,v
retrieving revision 1.26
diff -u -3 -p -u -r1.26 C-time.c
--- locale/C-time.c 16 Dec 2002 02:05:07 -0000 1.26
+++ locale/C-time.c 25 May 2004 21:50:32 -0000
@@ -136,7 +136,7 @@ const struct locale_data _nl_C_LC_TIME a
{ .string = "\7" },
{ .word = 19971130 },
{ .string = "\4" },
- { .string = "\7" },
+ { .string = "\1" }, /* _NL_TIME_FIRST_WEEKDAY */
{ .string = "\1" },
{ .string = "\1" },
{ .string = "" },