This is the mail archive of the
mailing list for the glibc project.
Re: [RFC][PATCH v2 3/6] Implement the %OB specifier - alternative month names (bug 10871)
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: Rafal Luzynski <digitalfreak at lingonborough dot com>, libc-alpha at sourceware dot org
- Date: Wed, 1 Jun 2016 15:20:01 -0700
- Subject: Re: [RFC][PATCH v2 3/6] Implement the %OB specifier - alternative month names (bug 10871)
- Authentication-results: sourceware.org; auth=none
- References: <1155243857 dot 420233 dot 60a90901-4334-4cea-aa99-f76884316a10 dot open-xchange at poczta dot nazwa dot pl> <20160329143132 dot GA28928 at altlinux dot org> <666336576 dot 426212 dot 9ea90152-1d54-4eec-8ffa-81bfd328d92b dot open-xchange at poczta dot nazwa dot pl> <20160601104220 dot GA1077 at altlinux dot org> <323322572 dot 685262 dot 92369107-bdae-4a8b-b71f-99b919bc0cf0 dot open-xchange at poczta dot nazwa dot pl>
On 06/01/2016 02:51 PM, Rafal Luzynski wrote:
I'm afraid that providing full backward compatibility is impossible.
If an application calls strftime("%B",...) or nl_langinfo(MON_...)
we have no way to tell if this particular application actually
meant "%OB" and ALTMON_... or it is indeed correct for it to call
"%B" and MON_.
Of course glibc cannot tell for sure; it is not an oracle. However, if
glibc uses the old behavior when the application links to the old
strftime, and the new behavior when the application links to the new
strftime, then old executables will have the same old behavior even when
linked to new glibc, which was Dmitry's point.
Even if the new behavior is standardized and is more likely to be what
the user wants, there will almost surely be cases where the old behavior
is preferable (if only to make regression tests pass :-), and the
natural way to tell programmers about this is to say that old programs
get the old behavior and new programs get the new one.