[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Are we going with X_LOCALE or not?

On Sat, Sep 12, 1998 at 02:21:15AM +0900, Fumitoshi UKAI wrote:

> If you build xlib6g without X_LOCALE in the future, you should do it ASAP.
> Packages depending xlib6g and built with current xlib6g won't work
> with xlib6g without X_LOCALE.  For example, program referencing _Xsetlocale()
> will cause segmentation fault with xlib6g without X_LOCALE.
> These packages should be rebuilt in new xlib6g without X_LOCALE.

Reading Xlocale.h I think X_LOCALE isn't automatically used if present:

#ifndef X_LOCALE
#include <locale.h>

[some stuff]

extern char *_Xsetlocale(
#if NeedFunctionPrototypes
    int /* category */,
    _Xconst char* /* name */

#define setlocale _Xsetlocale



The only programs affected are the ones passing -DX_LOCALE at compile time.
The only case seems to be WindowMaker at the moment.

It would be my guess that X's uses that flag at compile time to determine
whether or not to use the emulation itself (internally). The _Xsetlocale
should be always present... but that's obviously not true.

> In Hamm-JP (ftp://ftp.debian.or.jp/pub/linux/debian-jp/hamm-jp/), 
> there are 2 pacakges to support Japanese locales,
> libc6_2.0.7t-1.wcsmbs.4.1.deb and wcsmbs-locale_4.1.deb.
> With these 2 packages, there are no major problems using Japanese
> without X_LOCALE.

Does it make a difference to use the _MB_ functions in X or not, I mean,
does it matter if one uses XDrawString or X-whatever-MB-whatver-String (I
can't recall the name of the MB function)?

Reply to: