This is the mail archive of the cygwin-developers@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: LC_MESSAGES and gettext


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]