LC_MESSAGES and gettext

Charles Wilson cwilson@ece.gatech.edu
Thu Feb 1 21:31:00 GMT 2001


DJ Delorie wrote:
> 
> > What system functions are required for 'true' LC_MESSAGES support, and
> > where can I find documentation on them so I can generate a patch for
> > newlib?
> 
> DJGPP's locale "kit" includes these:
> 
> localeconv()
> setlocale()
> mbcurmax()
> mblen()
> mbstowcs()
> mbtowc()
> wcstombs()
> wctomb()

Well, the following functions are all exported by cygwin1.dll (listed in
cygwin.din)

localeconv  (declared in /usr/include/locale.h)
setlocale   (ditto)
mblen       (declared in /usr/include/stdlib.h)
mbstowcs    (ditto)
mbtowc      (ditto)
wcstombs    (ditto)
wctomb      (ditto)

The only function 'missing' from your list is mbcurmax().  But, if you
look at the file mbcurmax.c in the djgpp source code, that file just
declares the variable "__dj_mb_cur_max".  Well, cygwin's stdlib.h
declares __mb_cur_max, and that symbol is exported by cygwin1.dll
(listed in cygwin.din).

So, it looks like the *only* thing necessary is just my tiny little
change to newlib/libc/locale/locale.h == /usr/include/locale.h

Right?

--Chuck


More information about the Cygwin-developers mailing list