* iconv/gconv_cache.c (__gconv_lookup_cache): Return __GCONV_NULCONV
if from and to charsets are the same.
* iconv/gconv_db.c (__gconv_find_transform): Likewise.
* intl/dcigettext.c (_nl_find_msg): Return NULL even if __gconv_open
returns __GCONV_NOCONV, but not for __GCONV_NULCONV.
2007-07-17 Jakub Jelinek <jakub@redhat.com>
* wcsmbs/wchar.h: Only define wint_t if __need_wint_t.
Don't define wint_t when __need_mbstate_t unless it
is necessary.
(__mbstate_t): Use __WINT_TYPE__ rather than wint_t
in the typedef if possible.
* wctype/wctype.h (wint_t): Define by including
wchar.h with __need_wint_t instead of including stddef.h
with __need_wint_t and as fallback definining it ourselves.
* iconv/gconv.h (__need_wint_t): Define before including
wchar.h.
* sysdeps/gnu/_G_config.h: Don't include gconv.h if not _LIBC
or _GLIBCPP_USE_WCHAR_T.
(__need_wchar_t): Don't define
if not _LIBC or _GLIBCPP_USE_WCHAR_T.
(__need_wint_t): Don't define before including stddef.h,
define before including wchar.h only if _LIBC or
_GLIBCPP_USE_WCHAR_T.
(_G_iconv_t): Don't define if not _LIBC or _GLIBCPP_USE_WCHAR_T.
* sysdeps/mach/hurd/_G_config.h: Likewise.
* sysdeps/generic/_G_config.h: Likewise.
* libio/libio.h (__wunderflow, __wuflow, __woverflow): Only
prototype if _LIBC or _GLIBCPP_USE_WCHAR_T.
(_IO_getwc_unlocked, _IO_putwc_unlocked): Only define
if _LIBC or _GLIBCPP_USE_WCHAR_T.
* stdio-common/_i18n_number.h: Support printing localized decimal
point and thousand separator.
* wctype/wctrans.c: Add __wctrans alias.
* include/wctype.h: Declare __wctrans.
Based on a patch by Hamed Malek.
* include/sys/socket.h: Declare __libc_sa_len_internal and define
SA_LEN macro to use it if not NOT_IN_libc.
* sysdeps/unix/sysv/linux/sa_len.c: Use INTDEF for __libc_sa_len.
* include/fcntl.h: Declare __open_internal and define __open and
__libc_open macros if not NOT_IN_libc.
* sysdeps/generic/open.c: Use INTDEF for __open.
* sysdeps/mach/hurd/open.c: Likewise.
* sysdeps/unix/sysv/aix/open.c: Likewise.
* sysdeps/unix/syscalls.list: Add __open_internal alias.
* sysdeps/generic/check_fds.c: Make sure newly opened file descriptor
has correct number.
* include/fcntl.h: Define __libc_fcntl macro if not NOT_IN_libc.
* sysdeps/mach/hurd/fcntl.c: Undefine __libc_fcntl as well.
* sysdeps/unix/sysv/aix/fcntl.c: Likewise.
* sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.
* include/wctype.h: Declare __iswalpha_l_internal,
__iswdigit_l_internal, __iswspace_l_internal,
__iswxdigit_l_internal, and __iswctype_internal. Define
__iswalpha_l, __iswctype, __iswdigit_l, __iswspace_l, and
__iswxdigit_l macros if not NOT_IN_libc.
* wctype/iswctype.c: Use INTDEF for __iswctype.
* wctype/wcfuncs_l.c: Use INTDEF for all __iswXXX_l.
2001-07-06 Paul Eggert <eggert@twinsun.com>
* manual/argp.texi: Remove ignored LGPL copyright notice; it's
not appropriate for documentation anyway.
* manual/libc-texinfo.sh: "Library General Public License" ->
"Lesser General Public License".
2001-07-06 Andreas Jaeger <aj@suse.de>
* All files under GPL/LGPL version 2: Place under LGPL version
2.1.
2001-02-06 Andreas Jaeger <aj@suse.de>
* include/pthread.h: New file.
* wctype/wctype.h: Move internal interfaces from here to...
* include/wctype.h: ...here.
* wcsmbs/wchar.h: Move __wcslen from here to...
* include/wchar.h: ...here.
* posix/sys/wait.h: Move __wait from here to...
* include/sys/wait.h: ...here.
* string/string.h: Move __ffs and __strerror_r from here to...
* include/string.h: ...here.
* stdlib/stdlib.h: Move __on_exit from here to...
* include/stdlib.h: ...here.
* libio/stdio.h: Move __vsnprintf from here to...
* include/stdio.h: ...here.
* ctype/ctype.h (isblank): Make available if ISO C99.
* wctype/wctype.h (iswblank): Make available if ISO C99.
* math/math.h (signgam): Don't make available if ISO C99.
* math/tgmath.h (tgamma): Renamed from gamma.
Patches by Joseph S. Myers <jsm28@cam.ac.uk>.
2000-07-27 Bruno Haible <haible@clisp.cons.org>
* locale/C-ctype.c (_nl_C_LC_CTYPE): Swap the two names in
_NL_CTYPE_MAP_NAMES.
* locale/localeinfo.h (__TOW_toupper, __TOW_tolower): New enum values.
* wctype/wcfuncs.c (towlower, towupper): Use them.
* wctype/wcfuncs_l.c (__towlower_l, __towupper_l): Likewise.
* wctype/wctrans.c (wctrans): Likewise.
* wctype/wctrans_l.c (__wctrans_l): Likewise.
2000-07-27 Bruno Haible <haible@clisp.cons.org>
* posix/fnmatch.c (is_char_class): Fix logic. Avoid buffer overrun.
Use the optimized version of this function outside glibc as well.
2000-07-25 Bruno Haible <haible@clisp.cons.org>
* wctype/wctype.h (__wctrans_l): New declaration.
* wctype/wctrans_l.c: New file.
* wctype/Makefile (routines): Add wctrans_l.
* rt/tst-aio4.c: New file, slightly modified version of tst-aio2.
* rt/tst-aio5.c: New file, slightly modified version of tst-aio2.
2000-07-23 Bruno Haible <haible@clisp.cons.org>
* wctype/wchar-lookup.h: New file.
* wctype/iswctype.c: Include "wchar-lookup.h".
(__iswctype): Support alternate locale format with 3-level tables.
* wctype/iswctype_l.c (__iswctype_l): Likewise.
* wctype/towctrans.c (__towctrans): Likewise.
* wctype/towctrans_l.c (__towctrans_l): Likewise.
* wctype/wcfuncs.c: Include "wchar-lookup.h".
(__ctype32_wctype, __ctype32_wctrans): Declare external.
(__iswalnum, __iswalpha, __iswcntrl, __iswdigit, __iswlower,
__iswgraph, __iswprint, __iswpunct, __iswspace, __iswupper,
__iswxdigit, towlower, towupper): Support alternate locale format
with 3-level tables.
* wctype/wcextra.c (iswblank): Likewise.
* wctype/wcfuncs_l.c: Include "wchar-lookup.h".
(__iswalnum_l, __iswalpha_l, __iswcntrl_l, __iswdigit_l, __iswlower_l,
__iswgraph_l, __iswprint_l, __iswpunct_l, __iswspace_l, __iswupper_l,
__iswxdigit_l, __towlower_l, __towupper_l): Support alternate locale
format with 3-level tables.
* wctype/wcextra_l.c (__iswblank_l): Likewise.
* wctype/wctype.c (__wctype): Likewise. In the alternate locale
format, return a 3-level table pointer.
* wctype/wctype_l.c (__wctype_l): Likewise.
* wctype/wctrans.c (wctrans): Likewise.
* wctype/wctype.h (__ISwupper, __ISwlower, __ISwalpha, __ISwdigit,
__ISwxdigit, __ISwspace, __ISwprint, __ISwgraph, __ISwblank,
__ISwcntrl, __ISwpunct, __ISwalnum): New enum values.
(iswctype): Remove macro definition.
* wcsmbs/wcwidth.h: Include "wchar-lookup.h".
(internal_wcwidth): Support alternate locale format with 3-level
tables.
* locale/langinfo.h (_NL_CTYPE_CLASS_OFFSET, _NL_CTYPE_MAP_OFFSET):
New nl_items.
* locale/categories.def (_NL_CTYPE_CLASS_OFFSET, _NL_CTYPE_MAP_OFFSET):
Define them as being type "word".
* locale/C-ctype.c (_nl_C_LC_CTYPE): Add initializers for them.
* ctype/ctype-info.c (__ctype32_wctype, __ctype32_wctrans,
__ctype32_width): New exported variables.
* locale/lc-ctype.c (_nl_postload_ctype): Initialize them in the
alternate locale format. Don't initialize __ctype_names and
__ctype_width in the alternate locale format.
* locale/programs/localedef.h (oldstyle_tables): New declaration.
* locale/programs/localedef.c (oldstyle_tables): New variable.
(OPT_OLDSTYLE): New macro.
(options): Add --old-style option.
(parse_opt): Handle --old-style option.
* locale/programs/ld-ctype.c (locale_ctype_t): Add class_offset,
map_offset, class_3level, map_3level, width_3level members.
(ctype_output): Support for alternate locale format: Computation of
nelems changes. _NL_CTYPE_TOUPPER32, _NL_CTYPE_TOLOWER32 and
_NL_CTYPE_CLASS32 only 256 characters. _NL_CTYPE_NAMES empty.
New fields _NL_CTYPE_CLASS_OFFSET, _NL_CTYPE_MAP_OFFSET. Field
_NL_CTYPE_WIDTH now contains the three-level table. Extra elems
now contain both class and map tables.
(struct wctype_table): New type.
(wctype_table_init, wctype_table_add, wctype_table_finalize): New
functions.
(struct wcwidth_table): New type.
(wcwidth_table_init, wcwidth_table_add, wcwidth_table_finalize): New
functions.
(struct wctrans_table): New type.
(wctrans_table_init, wctrans_table_add, wctrans_table_finalize): New
functions.
(allocate_arrays): Support for alternate locale format: Set
plane_size and plane_cnt to 0. Restrict ctype->ctype32_b to the first
256 characters. Compute ctype->class_3level. Restrict ctype->map32[idx]
to the first 256 characters. Compute ctype->map_3level. Set
ctype->class_offset and ctype->map_offset. Compute ctype->width_3level
instead of ctype->width.
* locale/programs/ld-ctype.c (ctype_finish): Take all characters from
the input charset into account when generating the hash table.
(allocate_arrays): Correct setting default width. Not all empty slots
in the table are filled, only those not covert explicitly by the
locale description and in the charset.
* stdio-common/vfscanf.c: Make sure to always return WEOF and EOF for
wide character version.
For %C handling, test correct pointer variable for NULL.
* wcsmbs/wctob.c: Handle WEOF special.
* wcsmbs/wcwidth.h: 0xff in width array means invalid character.
* wctype/wctype.h: Protect gcc-isms with __extension__. Avoid
always-true test to avoid warning.
2000-06-27 Ulrich Drepper <drepper@redhat.com>
* wctype/towctrans.c (__towctrans): Be graceful and accept error
return values from the wctrans function.
2000-04-05 Cristian Gafton <gafton@redhat.com>
* ctype/ctype.h (__isctype_l): Define even if not __OPTIMIZE__
because it is used in generic code.
* wctype/wctrans.c: Define __ctype32_toupper and __ctype32_tolower.
* wcsmbs/wcwidth.h: Declare __ctype32_b.
* intl/gettext.c: Include <locale.h>.
* intl/ngettext.c: Likewise.
2000-04-05 Jakub Jelinek <jakub@redhat.com>
* resolv/inet_ntop.c (inet_ntop4, inet_ntop6, inet_ntop): Use
socklen_t type for size.
* sysdeps/sparc/sparc32/dl-machine.h (RTLD_START): Rewrite for new
init function interface.
* sysdeps/sparc/sparc64/dl-machine.h (RTLD_START): Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/setjmp.h: Don't include
sys/ucontext.h.
(__jmp_buf): Declare the whole type structure here, don't use
ucontext.
* iconv/skeleton.c (put16u): Fix typo.
Reported by Bruno Haible <haible@ilog.fr>.
2000-02-12 Ulrich Drepper <drepper@redhat.com>
* locale/nl_langinfo.h: Add casts to prevent warnings.
* wctype/iswctype_l.c: Use correct types for mapped data.
* wctype/wcfuncs.c: Add one more comment for clarification.
* wctype/wcfuncs_l.c: Use __ctype32_tolower and __ctype32_toupper.
* wctype/wctrans.c: Likewise.
* wctype/wctrans.c (wctrans): Use correct base index to access
extra mapping tables.
* locale/loadlocale.c (_nl_load_locale): Use actual number of
entries from file and not the fixed (minimal number from the
langinfo.h list.
* locale/programs/ld-ctype.c (ctype_output): Correct computation of
nelems. Correctly compute index for additional character classes.
(ctype_read): Handle charclass and charconv definitions. Also
recognize arbitrary strings as mapping names.
* locale/programs/ld-time.c (time_finish): Correctly skip over wide
character era strings.
* locale/lc-time.c (_nl_get_era_entry): Correctly skip era name
and format for wide characters.
* time/strftime.c: Correctly determine era information for wide
wcsftime.
* wctrans.c: Fix after removal of second endianess table.
* wctype/wctype.h (_ISwbit): Correctly handle bits > 16.
Patches by Shinya Hanataka <hanataka@abyss.rim.or.jp>.
* wcsmbs/wcwidth.h (internal_wcwidth): Reject non-printable characters.
1999-04-14 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* wctype/wcfuncs.c (towlower): Use __ctype_tolower.
Reported by Kalle Olavi Niemitalo <tosi@ees2.oulu.fi>
1999-02-16 Ulrich Drepper <drepper@cygnus.com>
* wctype/wctype.h (_ISwbit): Cast result of shift operations to
int to avoid warning about `ISO C restricts enumerator values to
range of `int''.