[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: remove strftime dependencies on multibyte modules?
From: |
Bruno Haible |
Subject: |
Re: remove strftime dependencies on multibyte modules? |
Date: |
Tue, 18 Jan 2011 13:11:10 +0100 |
User-agent: |
KMail/1.9.9 |
Hi Paul,
> strftime depended on mbrlen, mbsinit, and wchar, but these modules
> are needed only if ! MULTIBYTE_IS_FORMAT_SAFE, and that is true
> only if __osf__ is defined, and I suspect OSF doesn't need these
> other modules.
Nowadays, I would agree. I've never seen any use or mention of this
DEC-HANYU encoding in the wild in 11 years, so probably the number of
users of a locale in this encoding is nowadays between 0 and 0.01.
I propose that you merge in this change into your patch:
* lib/strftime.c (MULTIBYTE_IS_FORMAT_SAFE): Define to 1 always.
--- lib/strftime.c.orig Tue Jan 18 13:06:01 2011
+++ lib/strftime.c Tue Jan 18 13:04:32 2011
@@ -48,8 +48,10 @@
GB18030, EUC-TW, BIG5, BIG5-HKSCS, CP950, EUC-JP, EUC-KR, CP949,
SHIFT_JIS, CP932, JOHAB) are safe for formats, because the byte '%'
cannot occur in a multibyte character except in the first byte.
- But this does not hold for the DEC-HANYU encoding used on OSF/1. */
-#if !defined __osf__
+ But this does not hold for the DEC-HANYU encoding used on OSF/1.
+ This encoding has never been seen in real-life use. So we ignore
+ it */
+#if !(defined __osf__ && 0)
# define MULTIBYTE_IS_FORMAT_SAFE 1
#endif
#define DO_MULTIBYTE (! MULTIBYTE_IS_FORMAT_SAFE)