summaryrefslogtreecommitdiffstats
path: root/newlib/libc
Commit message (Collapse)AuthorAgeFilesLines
* * libc/Makefile.am (stmp-sigset, stmp-iconvset, stmp-extra,DJ Delorie2010-05-062-40/+44
| | | | | | | stmp-stdio64, stmp-posix,stmp-targetdep): Use unique temporary file names to allow for parallel installs. (CLEANFILES): Add new temporary file names. * libc/Makefile.in: Regenerate.
* * libc/locale/lctype.c: Include <string.h> and "setlocale.h".Corinna Vinschen2010-05-032-9/+14
| | | | | | | (_C_ctype_locale): Add braces to initializer. (__ctype_load_locale): Fix compiler warnings in non-Cygwin case. * libc/locale/nl_langinfo.c (nl_langinfo): Expose _NL_CTYPE_MB_CUR_MAX case only if __HAVE_LOCALE_INFO__ is defined.
* * libc/stdlib/wctob.c (wctob): Reorganize and fix WEOF check. RenameCorinna Vinschen2010-05-021-10/+8
| | | | | | pwc to pmb and convert to array to avoid buffer overflow. Rename c to wc. Check wc for WEOF instead of for EOF. Return first byte of pmb if __wctomb conversion returned exactly one byte, EOF otherwise.
* * libc/include/langinfo.h: Fix #endif positioning.Corinna Vinschen2010-04-301-1/+2
|
* Extend locale support to maintain wide char values of native stringsCorinna Vinschen2010-04-2818-163/+889
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if __HAVE_LOCALE_INFO_EXTENDED__ is defined. * libc/include/langinfo.h (enum __nl_item): New type. Define all native values accessible through nl_langinfo. Define previously existing POSIX-compatible values as macros as well. * libc/include/stdlib.h (__mb_cur_max): Drop declaration. (__locale_mb_cur_max): Declare. (MB_CUR_MAX): Re-define calling __locale_mb_cur_max. * libc/locale/Makefile.am (ELIX_SOURCES): Add lctype.c. * libc/locale/Makefile.in: Regenerate. * libc/locale/lctype.c: New file to define and load LC_CTYPE category. * libc/locale/lctype.h: New file, matching header. * libc/locale/lmessages.c (_C_messages_locale): Add default values for wide char members. (__messages_load_locale): Add _C_messages_locale in call to __set_lc_messages_from_win. * libc/locale/lmessages.h (struct lc_messages_T): Add wide char members. * libc/locale/lmonetary.c (_C_monetary_locale): Add default values for wide char members. (__monetary_load_locale): Add _C_monetary_locale in call to __set_lc_monetary_from_win. * libc/locale/lmonetary.h (struct lc_monetary_T): Add wide char members. Add numerical values for international currency formatting per POSIX-1.2008, if __HAVE_LOCALE_INFO_EXTENDED__ is defined. * libc/locale/lnumeric.c (_C_numeric_locale): Add default values for wide char members. (__numeric_load_locale): Add _C_numeric_locale in call to __set_lc_numeric_from_win. * libc/locale/lnumeric.h (struct lc_numeric_T): Add wide char members. * libc/locale/locale.c (loadlocale): Return doing nothing if category locale didn't change. Convert category if chain to switch statement. Call __ctype_load_locale in LC_CTYPE case. (__locale_charset): Add (but disable for now) returning codeset from __get_current_ctype_locale. (__locale_mb_cur_max): Add (but disable for now) returning mb_cur_max from __get_current_ctype_locale. (__locale_msgcharset): Add returning codeset from __get_current_messages_locale. (_localeconv_r): Accommodate int_XXX values. * libc/locale/nl_langinfo.c (nl_ext): New array to define what is to be returned for non-POSIX values. (nl_Langinfo): Return correct codeset for each locale category. Return extended values if __HAVE_LOCALE_INFO_EXTENDED__ is defined. * libc/locale/timelocal.c (_C_time_locale): Add default values for wide char members. (__time_load_locale): Add _C_time_locale in call to __set_lc_time_from_win. * libc/locale/timelocal.h (struct lc_time_T): Add wide char members. * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Use wide char decimal point and thousands_sep if __HAVE_LOCALE_INFO_EXTENDED__ is defined. * libc/time/strftime.c: Rework to accommodate availability of wide char strings in LC_TIME category if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
* * libc/Makefile.am (SUBDEFS): Add LIBC_POSIX_DEF.DJ Delorie2010-04-2229-11/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (libc.info): Add posix.texi. (libc.dvi): Likewise. (stmp-posix): New. (posix.texi): New. (libc_TEXINFOS): Add posix.texi. * libc/configure.in (LIBC_POSIX_LIB, LIBC_POSIX_DEF): Add tests. * libc/libc.texinfo: Include posix.texi * libc/locale/locale.c: Fix texinfo typo. * libc/time/strftime.c: Fix texinfo typo. * libc/configure: Regenerate. * libc/Makefile.in: Regenerate. * libc/argz/Makefile.in: Regenerate. * libc/ctype/Makefile.in: Regenerate. * libc/errno/Makefile.in: Regenerate. * libc/iconv/Makefile.in: Regenerate. * libc/iconv/ccs/Makefile.in: Regenerate. * libc/iconv/ccs/binary/Makefile.in: Regenerate. * libc/iconv/ces/Makefile.in: Regenerate. * libc/iconv/lib/Makefile.in: Regenerate. * libc/locale/Makefile.in: Regenerate. * libc/misc/Makefile.in: Regenerate. * libc/posix/Makefile.in: Regenerate. * libc/reent/Makefile.in: Regenerate. * libc/search/Makefile.in: Regenerate. * libc/signal/Makefile.in: Regenerate. * libc/stdio/Makefile.in: Regenerate. * libc/stdio64/Makefile.in: Regenerate. * libc/stdlib/Makefile.in: Regenerate. * libc/string/Makefile.in: Regenerate. * libc/syscalls/Makefile.in: Regenerate. * libc/time/Makefile.in: Regenerate. * libc/unix/Makefile.in: Regenerate. * libc/xdr/Makefile.in: Regenerate.
* 2010-04-06 Dave Korn <dave.korn.cygwin@googlemail.com>Jeff Johnston2010-04-062-6/+6
| | | | | | | * libc/stdlib/__atexit.c (__atexit_lock): Initialise as recursive rather than non-recursive lock type. (__register_exitproc): Use recursive locking APIs on it. * libc/stdlib/__call_atexit.c (__call_exitprocs): Likewise.
* * libc/stdlib/btowc.c (btowc): Reorganize EOF check. Fix incorrectCorinna Vinschen2010-04-061-3/+6
| | | | return value if input byte is ASCII NUL.
* 2010-04-01 Joel Sherrill <joel.sherrill@oarcorp.com>Jeff Johnston2010-04-012-20/+105
| | | | | | | | * libc/include/sched.h: Include prototypes for sched_* methods. * libc/include/sys/sched.h: Update to POSIX 1003.1b-2008. Rework constants to allow sharing between RTEMS and Cygwin.
* * libc/locale/locale.c (loadlocale): Optimize "EUC" charset check.Corinna Vinschen2010-03-272-9/+24
| | | | | | | Cygwin only: Allow GB2312 and EUC-CN as alternative codeset names for GBK. Add to documentation. * libc/locale/nl_langinfo.c (nl_langinfo): On Cygwin, translate EUCCN to GB2312.
* * libc/include/sys/features.h: Allow for _XOPEN_SOURCE to have anCorinna Vinschen2010-03-171-3/+9
| | | | empty definition. Also add support for values of 500 or less.
* 2010-03-09 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2010-03-091-25/+32
| | | | | | * libc/posix/telldir.c (dd_loccnt): Change start index to be 1 instead of 0. (_seekdir): A loc of 0 now means rewind dir.
* * libm/math/ef_sqrt.c: Delete unused variable sign.Corinna Vinschen2010-03-055-11/+8
| | | | | | | | | | | | * libc/stdlib/getenv.c: Delete "char *_findenv_r ();", as is not a proper prototype, and is properly prototyped in stdlib.h, anyway. * libc/stdlib/getenv_r.c: Ditto. * libc/search/hash.c: Add _DEFUN to __hash_open() declaration; add #define __DBINTERFACE_PRIVATE to activate prototypes from db_local.h. * libc/search/db_local.h: Correct __hash_open() prototype. * libc/sys/linux/cmath/math_private.h: Eliminate compiler warnings: Remove #define INFINITY (redefines from math.h); remove #define __isnanf and #define __isinff isinff.
* 2010-03-02 Craig Howland <howland@LGSInnovations.com>Jeff Johnston2010-03-022-0/+14
| | | | | | | | * libc/include/sys/features.h: Add POSIX.1-permitted definition of _POSIX_C_SOURCE if not already defined and _XOPEN_SOURCE has an appropriate value. Specifically, check for POSIX.1-2008 & 2001 values. * libc/include/sys/config.h: Add #include <sys/features.h> so that all includes get the new check added to it.
* * libc/xdr/README: Correct grammatical errors.Corinna Vinschen2010-03-025-21/+39
| | | | | | | | | * libc/include/rpc/types.h: Add public types used by RPC implementations. * libc/include/rpc/xdr.h: Add defines used by RPC implementations. * libc/xdr/Makefile.am: Eliminate automake warning. * libc/xdr/Makefile.in: Regenerate.
* * libc/xdr/Makefile.in: Regenerate.Corinna Vinschen2010-03-021-11/+23
|
* Add eXtensible Data Record (XDR) supportCorinna Vinschen2010-03-0242-14/+4934
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.host: Build libc/xdr only on cygwin. * Makefile.am: Install xdr headers. * libc/configure.in: Support new libc/xdr subdirectory. * libc/Makefile.am: Support new libc/xdr subdirectory. * libc/include/rpc/types.h: New. * libc/include/rpc/xdr.h: New. * libc/xdr/README: New. * libc/xdr/Makefile.am: New. * libc/xdr/dummy.c: New. * libc/xdr/xdr.c: New. * libc/xdr/xdr_array.c: New. * libc/xdr/xdr_float.c: New. * libc/xdr/xdr_float_vax.c: New. * libc/xdr/xdr_mem.c: New. * libc/xdr/xdr_private.c: New. * libc/xdr/xdr_private.h: New. * libc/xdr/xdr_rec.c: New. * libc/xdr/xdr_reference.c: New. * libc/xdr/xdr_sizeof.c: New. * libc/xdr/xdr_stdio.c: New. Regenerate using ac-2.63 and am-1.11.1 * libc/xdr/Makefile.in: New. * Makefile.in: Regenerate. * libc/configure: Regenerate. * libc/Makefile.in: Regenerate. * libc/argz/Makefile.in: Regenerate. * libc/ctype/Makefile.in: Regenerate. * libc/errno/Makefile.in: Regenerate. * libc/iconv/ccs/binary/Makefile.in: Regenerate. * libc/iconv/ccs/Makefile.in: Regenerate. * libc/iconv/ces/Makefile.in: Regenerate. * libc/iconv/lib/Makefile.in: Regenerate. * libc/iconv/Makefile.in: Regenerate. * libc/locale/Makefile.in: Regenerate. * libc/misc/Makefile.in: Regenerate. * libc/posix/Makefile.in: Regenerate. * libc/reent/Makefile.in: Regenerate. * libc/search/Makefile.in: Regenerate. * libc/signal/Makefile.in: Regenerate. * libc/stdio/Makefile.in: Regenerate. * libc/stdio64/Makefile.in: Regenerate. * libc/stdlib/Makefile.in: Regenerate. * libc/string/Makefile.in: Regenerate. * libc/syscalls/Makefile.in: Regenerate. * libc/time/Makefile.in: Regenerate. * libc/unix/Makefile.in: Regenerate.
* * libc/time/strftime.c: Add support for era and alt_digits data fromCorinna Vinschen2010-02-263-103/+611
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LC_TIME locale category. Conditionalize using _WANT_C99_TIME_FORMATS flag. (STRTOUL): Define differently for building strftime or wcsftime. (STRCPY): Ditto. (STRCHR): Ditto. (STRLEN): Ditto. (CHECK_LENGTH): Define to simplify code. (era_info_t): New type to store era info. (get_era_info): New function to fetch era info matching incoming struct tm. (free_era_info): New function to free era info. (alt_digits_t): New type to store alternative digits. (get_alt_digits): New function to convert alt_digits string into alt_digits_t structure. (free_alt_digits): New function to free alt_digits info. (conv_to_alt_digits): New function to convert unsigned value into alternative digits. (strftime): Conditionalize on _WANT_C99_TIME_FORMATS. If _WANT_C99_TIME_FORMATS is defined, define as just a wrapper function providing era_info and alt_digits pointers and call ... (__strftime): Rename from strftime and make static if _WANT_C99_TIME_FORMATS is defined. Add parameters for era_info and alt_digits pointers. Handle conversion modifiers according to POSIX-1.2008. Redefine %F and %Y according to POSIX. Add default case to allow to bail out on invalid conversion specifiers. * libc/include/sys/config.h: Move Cygwin build flags to Cygwin's config.h. * libc/include/stdio.h: Remove __CYGWIN_USE_BIG_TYPES__ condition.
* * libc/locale/locale.c (loadlocale): Fix typo in comment.Corinna Vinschen2010-02-251-1/+1
|
* * libc/locale/locale.c: Throughout, extensively comment on theCorinna Vinschen2010-02-252-8/+33
| | | | | | | | reason for using __CYGWIN__. (lconv): Remove _CONST entirely. (loadlocale): Guard calls to function loading locale-specific category data with __HAVE_LOCALE_INFO__ rather than __CYGWIN__. * libc/sys/config.h (__HAVE_LOCALE_INFO__): Define for Cygwin.
* 2010-02-24 Charles Wilson <...>Jeff Johnston2010-02-24197-5322/+6749
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Work around issues with new libtool files in .. * configure.in: Unconditionally call _LT_PROG_ECHO_BACKSLASH. * iconvdata/configure.in: Ditto. * libc/configure.in: Ditto. * libc/machine/configure.in: Ditto. * libc/machine/i386/configure.in: Ditto. * libc/sys/configure.in: Ditto. * libc/sys/linux/configure.in: Ditto. * libc/sys/linux/linuxthreads/configure.in: Ditto. * libc/sys/linux/linuxthreads/machine/configure.in: Ditto. * libc/sys/linux/linuxthreads/machine/i386/configure.in: Ditto. * libc/sys/linux/machine/configure.in: Ditto. * libc/sys/linux/machine/i386/configure.in: Ditto. * libm/configure.in: Ditto. * libm/machine/configure.in: Ditto. * libm/machine/i386/configure.in: Ditto. * libc/machine/sh/configure.in: Ditto. Also, call AC_NO_EXECUTABLES before NEWLIB_CONFIGURE. * aclocal.m4: Regenerated. * configure: Ditto. * Makefile.in: Ditto. * doc/aclocal.m4: Ditto. * doc/Makefile.in: Ditto. * libc/*/aclocal.m4: Ditto. * libc/*/Makefile.in: Ditto. * libc/*/configure: Ditto. * libm/*/aclocal.m4: Ditto. * libm/*/Makefile.in: Ditto. * libm/*/configure: Ditto.
* 2010-02-24 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2010-02-241-0/+1
| | | | * libc/stdlib/__call_exit.c: Add include of sys/lock.h.
* 2010-02-23 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2010-02-231-57/+2
| | | | | * libc/include/sys/types.h: Fix __XMK__ sectioning and remove redundant code section for __XMK__.
* * libc/include/langinfo.h (_NL_TIME_DATE_FMT): Define new nl_itemCorinna Vinschen2010-02-222-0/+6
| | | | | | value for LC_TIME entry date_fmt. (_DATE_FMT): Define "official" GNU name same as _NL_TIME_DATE_FMT. * libc/locale/nl_langinfo.c (nl_langinfo): Add case for _DATE_FMT.
* * libc/ctype/iswalpha.c (iswalpha): Update to Unicode 5.2.Corinna Vinschen2010-02-189-841/+1103
| | | | | | | | | | | | | | * libc/ctype/iswprint.c (iswprint): Ditto. * libc/ctype/iswpunct.c (iswpunct): Drop standalone implementation. Define in terms of other wctype functions instead. * libc/ctype/towlower.c (towlower): Update to Unicode 5.2. Add comment to explain how to fetch the data from the Unicode database. * libc/ctype/towupper.c (towupper): Ditto. * libc/ctype/utf8alpha.h: Ditto. * libc/ctype/utf8print.h: Ditto. * libc/ctype/utf8punct.h: Remove. * libc/ctype/iswcntrl.c (iswcntrl): Add comment to explain how to fetch the data from the Unicode database.
* * libc/locale/timelocal.h (struct lc_time_T): Add missing ERA-relatedCorinna Vinschen2010-02-183-11/+37
| | | | | | | | members. * libc/locale/timelocal.c (_C_time_local): Set new members to empty strings. * libc/locale/nl_langinfo.c (nl_langinfo): Return values from __get_current_time_locale() for ERA related requests.
* * libc/ctype/iswblank.c (iswblank): Remove Unicode charactersCorinna Vinschen2010-02-172-4/+10
| | | | | | U+00A0 and U+200B. Add Unicode character U+180E. Add comment to explain how to generate from Unicode data file. * libc/ctype/iswspace.c (iswspace): Ditto.
* * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Apply previous patch hereCorinna Vinschen2010-02-151-1/+1
| | | | as well.
* * libc/stdio/vfprintf.c (_VFPRINTF_R): Drop printing a redundantCorinna Vinschen2010-02-151-1/+1
| | | | decimal point in case the float argument is an integral value.
* 2010-02-11 Craig Howland <howland@LGSInnovations.com>Jeff Johnston2010-02-111-4/+5
| | | | | * libc/include/machine/ieeefp.h: isfinite macro modified to run faster by only calling fpclassify once instead of possibly twice.
* 2010-02-09 Daniel Gutson <dgutson@codesourcery.com>Jeff Johnston2010-02-091-1/+2
| | | | | * libc/machine/arm/arm_asm.h (_ISA_THUMB_2): __ARM_ARCH_7EM__ added to the preprocessor condition.
* * libc/locale/lmessages.c (__messages_load_locale): Take additionalCorinna Vinschen2010-02-096-7/+44
| | | | | | | | | | | | | | | parameters for wide char to multibyte conversion. Call __set_lc_messages_from_win on Cygwin. * libc/locale/lmessages.h: Make C++-safe. (__messages_load_locale): Change declaration. * libc/locale/lmonetary.c (__monetary_load_locale): Use _monetary_locale_buf as buffer pointer. * libc/locale/lnumeric.c (__numeric_load_locale): Use _numeric_locale_buf as buffer pointer. * libc/locale/timelocal.c (__time_load_locale): Use time_locale_buf as buffer pointer. * libc/locale/locale.c (loadlocale): Enable loading LC_MESSAGES data on Cygwin.
* 2010-02-08 Josef Wolf <jw@raven.inka.de>Jeff Johnston2010-02-081-1/+1
| | | | | * libc/machine/m68k/memcpy.S: MISALIGEND_OK should not be set for __mcpu32__.
* * libc/locale/locale.c: Add Cygwin's /usr/share/locale/locale.aliasCorinna Vinschen2010-02-071-26/+45
| | | | | | | | | support to documentation. (__set_locale_from_locale_alias): Declare when build for Cygwin. (loadlocale): On Cygwin, if locale can't be recognized, call __set_locale_from_locale_alias to check for locale alias. Define FAIL macro to replace `return NULL' statements. Replace throughout.
* * libc/locale/locale.c: Fix typo in documentation. Remove uselessCorinna Vinschen2010-02-071-42/+6
| | | | | _MB_CAPABLE guards within other _MB_CAPABLE guards. Add comment to remaining #endif's.
* * libc/ctype/ctype_cp.h (_CTYPE_GEORGIAN_PS_128_254): Define.Corinna Vinschen2010-02-064-35/+198
| | | | | | | | | | | | | | | | | (_CTYPE_GEORGIAN_PS_255): Define. (_CTYPE_PT154_128_254): Define. (_CTYPE_PT154_255): Define. (__ctype_cp): Add array members for above ctype definitions. * libc/locale/locale.c (loadlocale): Make TIS-620 charset name available for all targets. Add guards for setting the conversion function pointers. Add support for GEORGIAN-PS and PT154 charsets. Change documentation to reflect current behaviour more closely. * libc/locale/nl_langinfo.c (nl_langinfo): On Cygwin, translate "CP101" to "GEORGIAN-PS" and "CP102" to "PT154". * libc/stdlib/sb_charsets.c (__cp_conv): Add conversion arrays for GEORGIAN-PS and PT154. (__cp_index): Map invalid Windows codepage number 101 to GEORGIAN-PS conversion array, 102 to PT154 conversion array.
* * libc/posix/telldir.c: Remove bogus nested prototype of lseek().Corinna Vinschen2010-02-061-1/+0
|
* * libc/locale/locale.c (loadlocale): Handle ISO-8859 and KOI8 charsetsCorinna Vinschen2010-02-051-13/+31
| | | | so that the dashes are optional. Align documentation.
* * libc/stdio/vfprintf.c: Include locale.h also if _WANT_IO_C99_FORMATSCorinna Vinschen2010-02-052-76/+321
| | | | | | | | is defined. Raise conversion buffer size to make sure it has enough room for numbers plus grouping character. Define GROUPING flag. (_VFPRINTF_R): Add PRINTANDPAD macro. Handle grouping flag character. Handle grouping for decimal integer and float values. * libc/stdio/vfwprintf.c: Ditto.
* * libc/stdlib/__atexit.c (__atexit_lock): Define a global lock for atexitChristopher Faylor2010-02-042-5/+17
| | | | | | functions. (__register_exitproc): Use __atexit_lock rather than a local static lock. * libc/stdlib/__call_atexit.c: Ditto.
* 2010-01-29 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2010-01-293-2/+15
| | | | | | * libc/search/Makefile.am: Create .def files for bsearch and qsort. * libc/search/Makefile.in: Regenerated. * libc/stdlib/stdlib.tex: Add bsearch and qsort.
* * libc/locale/nl_langinfo.c (nl_langinfo): Return "CP932" when usingCorinna Vinschen2010-01-241-0/+14
| | | | SJIS on Cygwin. Explain why.
* * libc/locale/locale.c (loadlocale): Allow CP932 as alias for SJIS.Corinna Vinschen2010-01-231-9/+16
| | | | Add to documentation. Add a few comments to #endif's for Cygwin.
* * libc/locale/locale.c (loadlocale): Disable JIS entirely on Cygwin.Corinna Vinschen2010-01-231-1/+14
| | | | Allow TIS620 and TIS-620 as aliases for CP874 on Cygwin.
* * libc/locale/lmonetary.c (__monetary_load_locale): Take additionalCorinna Vinschen2010-01-2210-172/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parameters for wide char to multibyte conversion. Call __set_lc_monetary_from_win on Cygwin. * libc/locale/lmonetary.h: Make C++-safe. (__monetary_load_locale): Change declaration. * libc/locale/lnumeric.c (__numeric_load_locale): Take additional parameters for wide char to multibyte conversion. Call __set_lc_numeric_from_win on Cygwin. * libc/locale/lnumeric.h: Make C++-safe. (__numeric_load_locale): Change declaration. * libc/locale/locale.c (lconv): De-constify for Cygwin. (__set_charset_from_locale): Rename from __set_charset_from_codepage. Take locale as parameter instead of a codepage. (loadlocale): Allow "EUC-JP" for "EUCJP" and "EUC-KR" for "EUCKR". Change documnetation accordingly. Enable LC_COLLATE, LC_MONETARY, LC_NUMERIC, and LC_TIME handling on Cygwin. (_localeconv_r): On Cygwin, copy values from monetary and numeric domain if change has been noted. * libc/locale/nl_langinfo.c (nl_langinfo): Accommodate change of am/pm layout in struct lc_time_T. * libc/locale/timelocal.c (_C_time_locale): Accommodate redefinition of am/pm members. (__time_load_locale): Take additional parameters for wide char to multibyte conversion. Call __set_lc_time_from_win on Cygwin. * libc/locale/timelocal.h: Make C++-safe. (struct lc_time_T): Convert am and pm to a am_pm array for easier consumption by strftime and strptime. (__time_load_locale): Change declaration. * libc/time/strftime.c: Change documentation to reflect changes to strftime. Remove locale constant strings in favor of access to locale-specifc data. (_ctloc): Define access method for locale-specifc data. (TOLOWER): Define for tolower conversion. (strftime): Throughout, convert locale-specific formats to use locale-specific data. Add GNU-specific "%P" format. * libc/time/strptime.c: Remove locale constant strings in favor of access to locale-specifc data. (_ctloc): Define access method for locale-specifc data. (strptime): Throughout, convert locale-specific formats to use locale-specific data.
* * libc/locale/nl_langinfo.c (nl_langinfo): On Cygwin, translateCorinna Vinschen2010-01-201-6/+19
| | | | often-used charsets into Linux compatible codesets.
* 2010-01-19 Andy Koppe <andy.koppe@gmail.com>Jeff Johnston2010-01-191-4/+15
| | | | | * libc/stdio/vfscanf.c (__SVFSCANF_R): Fix handling of non-ASCII characters and allow invalid bytes in format string.
* * libc/stdlib/wcstombs_r.c (_wcstombs_r): Handle invalid charactersCorinna Vinschen2010-01-191-3/+8
| | | | correctly also in the s==NULL case.
* * libc/locale/locale.c (loadlocale): Change comments to refer toCorinna Vinschen2010-01-171-2/+2
| | | | ISO 639-3 rather than 639-2.
* * libc/locale/locale.c (loadlocale): Allow three characterCorinna Vinschen2010-01-171-2/+7
| | | | language codes to accommodate ISO 639-2 codes.