Commit Graph

28 Commits

Author SHA1 Message Date
joerg 5d45063308 Go back to just using normal visibility for the locale symbols. Without
an actual specifier like dllimport, protected visibility is unusable.
2016-04-29 16:26:48 +00:00
christos 143f5307f7 disable dso protected for clang now, so that packages can be built.
(again this is the binutils warning about copy relocations on protected objects)
2016-03-17 17:36:32 +00:00
christos 25f8e5a66f undo protected symbol hack. 2016-03-08 03:58:31 +00:00
christos 8bdedb49af disable dso protected to work around binutils bug 2016-01-29 15:18:33 +00:00
joerg 844ef71922 Too many endif. 2013-05-17 14:11:55 +00:00
joerg 2aac8b87b0 Only provide LC_C_LOCALE under _NETBSD_SOURCE. 2013-05-17 13:00:40 +00:00
joerg e0ac190e1e Provide explicit LC_C_LOCALE accessor and drop the various NULL checks.
Provide LC_GLOBAL_LOCALE in a way that works with all locale functions.
Merge constant data used by the initial global locale and the C locale.
Drop function call layer for _current_locale() and directly return the
locale reference, not a pointer to it. Use protected access for global
variables, so that libc references can avoid the GOT overhead.
2013-05-17 12:55:56 +00:00
joerg 81d0329e8d Make that to process PATH_LOCALE the first time _find_category is
called. Use this to implement newlocale and provide duplocale/freelocale
as well. Based on patches by Takehiko Nozaki with simplications and fix
for the init order by myself.
2013-04-30 00:45:04 +00:00
joerg e8c1e0eee9 Include sys/featuretest.h before using _NETBSD_SOURCE. 2013-04-27 21:24:27 +00:00
joerg 6ffcdd8d70 Add localeconv_l. 2013-04-17 20:40:13 +00:00
joerg 14b179f1c9 Rename struct _locale_impl_t to struct _locale, since it will end up as
locale_t later.
2013-04-14 23:30:15 +00:00
tnozaki 9efec5bce3 1. MB_LEN_MAX switch MD to MI.
2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32
   so we have to add more setlocale(3) __RENAME func, __setlocale50.
3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/*
   prepareing for next libc major crunk.
4. bump libc minor version.
2010-06-07 13:52:28 +00:00
christos 50728e7823 merge christos-time_t 2009-01-11 02:57:17 +00:00
tnozaki 52ed7b035f Fixes PR lib/39662, shortcomings in LC_{MONETARY,NUMERIC,TIME,MESSAGES} db format.
ok'ed by core and releng.
(thanks for agc@, snj@ and i'm sorry for long time patience).

[libc]
- localeio.[ch] and lc*.[ch] in src/lib/libc/locale was replaced by
  new locale-db implementation using citrus_db backend,
  see src/lib/libc/citrus/citrus_lc_*.[ch].
- add citrus_bcs_strtou?l.c. don't use strtou?l locale implementation
  internally, because they're locale-aware function.
- add some stubs for multi-locale issue, see {current,global}_locale.c.
- remove some obsolete file, setrunelocale.c, ___runetype_mb.c.
- remove __savectype() from ctypeio.[ch].

[tools]
- mklocale(1): add new option ``-t'' that generates new style
  LC_{MONETARY,NUMERIC,TIME,MESSAGES} locale-db format.
- chrtbl(1): added ctypeio.[ch] for __savectype().

[locale-db]
- added en_US.US-ASCII locale.
- removed some shareable locale definition file:
    en_US.US-ASCII -> en_US.ISO8859-1, en_US.UTF-8
    zh_CN.eucCN -> zh_CN.GB18030
    and more...see src/share/locale/*/Makefile.
- remove obsoleted locale sr_YU, added new locale sr_ME, sr_RS.
- change locale name ja_JP.ISO2022-JP* -> ja_JP.ISO-2022-JP*
  for X11's locale.alias file alignments.
- fix regression test, wrong wcs?width(3), NAN/INF usage.

i tested release-build following arch:
  i386, amd64, hpc{mips,arm,sh}, sparc64, vax.

citrus_lc_*.[ch] also can read old-plain-text style locale-db.
so that backward compatibility is keeped, but lc*.[ch] can't read
new citrus_db'ed locale-db and localeio.c never check sanity,
so forward compatibility is broken ;-<

old mklocale(1) doesn't know -t option, so you have to rebuild toolchain.
2009-01-02 00:20:18 +00:00
perry 19b7469a00 de-__P -- the hack is long since useless. Discussed with christos,
matt, kleink, others. Approved by christos.
2005-02-03 04:39:32 +00:00
agc 039cc95684 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22270, verified by myself.
2003-08-07 09:44:09 +00:00
kleink 20a43da197 C99: add new parameters int_p_cs_precedes, int_n_cs_precedes,
int_p_sep_by_space, int_n_sep_by_space, int_p_sign_posn and
int_n_sign_posn to monetary locale information.
2001-01-02 10:53:24 +00:00
itojun 408f4697a6 first import of citrus LC_CTYPE locale. singlebyte only at this moment.
shot-term TODO:
- enable multibyte locales.  this includes loadable locale modules
  (#ifdef DLRUNE).
- populate LC_CTYPE definition files.
- other functions such as iconv()
- make libc functions more friendly with multibyte.
- multilingualize other LC_xx
- torture tests

XXX don't forget to "make depend" when you rebuild libc, multibyte.c is
moved from lib/libc/stdlib to lib/libc/locale.
2000-12-21 11:29:47 +00:00
tshiozak 51a53de0d5 Preparation for the future introduction of multibyte locale.
- MB_LEN_MAX is increased to 32.
 - To ensure binary compatibility for old executables
   under multibyte locale, versioned setlocale is added.
 - __mb_len_cur definision is added in setlocale.c
   and enable it in stdlib.h .
   It is also important for multibyte locale stuffs,
   but I just forgot.
2000-08-08 22:31:13 +00:00
kleink 6f29805ef3 Move <null.h> to <sys/null.h> for the purpose of avoiding conflicts due to
std C headers including it, and a kernel module written in C++ would benfit
as well.
2000-01-10 16:58:36 +00:00
kleink c07f17e8d9 For the benefit of G++'s null pointer constant implementation, #define NULL
as __null with egcs 1.0 (GCC 2.90) and above.  As several headers are affected
by this change, move the definition into a new header file, <null.h>, to ease
maintenance.
1999-12-22 21:26:15 +00:00
perry b7b7322c68 merge lite-2 1998-02-02 21:07:13 +00:00
cgd 4d2cbfce0a new RCS ID format. 1994-10-26 00:55:40 +00:00
jtc 22441ccd35 I've decided to move the definitions of private structures, etc. to
<sys/localedef.h> like AIX and OSF/1.
1994-09-29 05:00:37 +00:00
jtc 613d90c704 First of the locale support code is going in... 1994-05-25 01:14:14 +00:00
jtc 87edfb66b9 Add POSIX's LC_MESSAGES define. According to a net posting, it is needed
for xview.  Like the rest of the locale stuff, it doesn't do anything (yet).
1993-09-02 20:46:33 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00