This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Roland McGrath <roland@frob.com> writes: > Not that I don't like this idea, but another, more general solution also > comes to mind. We could move the locale data structures out of global > variables and provide a way for a thread to change its per-thread current > locale without changing the global one used for other threads. This seems > like it could be useful in general, e.g. for a network server that reports > results to different clients in different languages/formats. This is, I think, the next step. You certainly have seen that many things are already prepared for this. Locales are objects. From there it is not such a big step creating a function `setthreadlocale' or so. I don't want to introduce this before the locale implementation is complete and the selection in the fopen() parameters is still useful since i won't require you to change the locale. E.g., in situations like this: fd = socket (...); read (fd, &header, sizeof (header)); <... determine charset from header ...> snprintf (buf, sizeof (buf), "r,ccs=%s", charset); fp = fdopen (fd, buf); ... -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Cygnus Solutions `--' drepper at cygnus.com `------------------------
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |