LWN.net Logo

A turning point for GNU libc

A turning point for GNU libc

Posted Mar 30, 2012 21:58 UTC (Fri) by justincormack (subscriber, #70439)
In reply to: A turning point for GNU libc by nix
Parent article: A turning point for GNU libc

Why should a timezone database be in libc? I would rather a tz update i not require a libc update. And the locale support in libc is legacy and should go. I do not wnt locales in my low level libraries.


(Log in to post comments)

A turning point for GNU libc

Posted Mar 30, 2012 23:46 UTC (Fri) by nix (subscriber, #2304) [Link]

The tz database *itself* is no longer installed by glibc as of 2.16 (but is still in the source tree for the sake of testing).

The tz-manipulation code must stay, because widely-used functions in the exported API use it (notably tzset(), gmtime() and localtime()).

The locale support is very definitely not legacy: the C library is where all the internationalization code is located (found in libintl on many other Unix platforms). It is part of the API and ABI, used by every single internationalized program (which is most of them, these days) and can never ever be removed. (And printf() needs locale support for international printing of the decimal point and thousands grouping characters, and for the I alternative-output-digit flag character.)

A turning point for GNU libc

Posted Mar 31, 2012 10:01 UTC (Sat) by mpr22 (subscriber, #60784) [Link]

setlocale() and strcoll() (among other locale-related things) are both defined as part of the 1990 and 1999 versions of the ISO C standard, and I am not aware of them having been removed from the 2011 version. Therefore, every compliant hosted implementation of the C programming language is obliged to provide setlocale() and strcoll(), and by saying you don't want locales in your low-level libraries you are saying you don't want a compliant hosted implementation of the C programming language.

A turning point for GNU libc

Posted Apr 5, 2012 8:29 UTC (Thu) by nix (subscriber, #2304) [Link]

setlocale(), strcoll(), and for that matter localeconv() are, of course, still there in C11, just as they were in C99 and C89.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds