summaryrefslogtreecommitdiffstats
path: root/newlib/libc
Commit message (Collapse)AuthorAgeFilesLines
* * 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.
* * libc/locale/locale.c (lc_ctype_charset): Disable defaulting toCorinna Vinschen2010-01-173-2/+4
| | | | | | | | | "UTF-8" on Cygwin. (lc_message_charset): Ditto. (loadlocale): Disable setting charset of the "C" locale to "UTF-8" on Cygwin. * libc/stdlib/mbtowc_r.c (__mbtowc): Add Cygwin-specific comment. * libc/stdlib/wctomb_r.c (__wctomb): Ditto.
* * libc/include/sys/_default_fcntl.h (O_CLOEXEC): Define as _FNOINHERIT.Corinna Vinschen2010-01-142-0/+9
| | | | | | (F_DUPFD_CLOEXEC): Define for Cygwin. * libc/include/sys/unistd.h (dup3): Define for Cygwin. (pipe2): Ditto.
* * libc/stdio/vfprintf.c (_VFPRINTF_R): Just wave bytes invalid inCorinna Vinschen2010-01-141-2/+7
| | | | the current charset through.
* 2010-01-11 Sebastian Huber <sebastian.huber@embedded-brains.de>Jeff Johnston2010-01-111-11/+11
| | | | * libc/posix/telldir.c (_cleanupdir): Fixed usage of freed memory.
* 2010-01-11 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>Jeff Johnston2010-01-111-0/+4
| | | | | | | * libc/include/math.h (log2, log2f): Disable macro versions for C++, as they are incompatible with OpenMP/C++ headers. 2
* * libc/stdlib/mbtowc_r.c (__ascii_mbtowc): Disallow conversion ofCorinna Vinschen2010-01-102-0/+12
| | | | | non-ASCII chars on Cygwin. * libc/stdlib/wctomb_r.c (__ascii_wctomb): Ditto.
* Fix getsubopt declaration.Eric Blake2009-12-222-3/+4
| | | | | * libc/include/sys/unistd.h (suboptarg, getsubopt): Move... * libc/include/stdlib.h: ...here, to match POSIX for getsubopt.
* 2009-12-17 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-12-171-0/+1
| | | | * libc/include/_syslist.h: Add _mkdir transform.
* 2009-12-17 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-12-1776-4575/+5947
| | | | | | | | | | | | | | | | | * NEWS: Update with 1.18.0 info. * README: Ditto. * acinclude.m4: Change version number to 1.18.0. * aclocal.m4: Regenerated. * configure: Ditto. * doc/aclocal.m4: Ditto. * doc/configure: Ditto. * libc/*/aclocal.m4: Ditto. * libc/*/configure: Ditto. * libc/libc.texinfo: Ditto. * libm/*/aclocal.m4: Ditto. * libm/*/configure: Ditto. * libm/libm.texinfo: Ditto. * libc/sys/linux/shared.ld: Add VERS_1.18
* 2008-12-17 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-12-172-11/+11
| | | | | | | | | | | | | | | | | * NEWS: Update with 1.18.0 info. * README: Ditto. * acinclude.m4: Change version number to 1.18.0. * aclocal.m4: Regenerated. * configure: Ditto. * doc/aclocal.m4: Ditto. * doc/configure: Ditto. * libc/*/aclocal.m4: Ditto. * libc/*/configure: Ditto. * libc/libc.texinfo: Ditto. * libm/*/aclocal.m4: Ditto. * libm/*/configure: Ditto. * libm/libm.texinfo: Ditto. * libc/sys/linux/shared.ld: Add VERS_1.18
* 2009-12-17 Jerker Back <jerker.back@gmail.com>Jeff Johnston2009-12-172-2/+7
| | | | | | | * libc/iconv/lib/local.h[!__GNUC__]: Add alternative version of ICONV_ZERO_MB_STATE_T macro. * libc/iconv/lib/ucsconv.c (ucs_based_conversion_get_state): Use temporary local variable nullstate to hold empty mbstate_t.
* 2009-12-17 Jerker Back <jerker.back@gmail.com>Jeff Johnston2009-12-1711-45/+47
| | | | | | | | | | | | | | | * libc/include/_ansi.h: Add new _EXFNPTR macro for using with function pointer arguments. * libc/iconv/lib/conv.h: Use _EXFNPTR rather than _EXPARM macro. * libc/iconv/lib/ucsconv.h: Ditto. * libc/include/stdlib.h: Use new _EXFNPTR macro for function pointers. * libc/include/sys/reent.h: Ditto. * libc/include/sys/unistd.h: Ditto. * libc/search/bsearch.c: Ditto. * libc/stdio/fseek.c: Ditto. * libc/stdio64/fseeko64.c: Ditto. * libc/stdlib/atexit.c: Ditto. * libc/stdlib/on_exit.c: Ditto.
* 2009-12-17 Ralf Corsépius <ralf.corsepius@rtems.org>Jeff Johnston2009-12-172-13/+5
| | | | | | * libc/include/machine/ieeefp.h: Rework __IEEE_*_ENDIAN handling. * libc/machine/arm/machine/endian.h: Remove (Conflicts with libc/include/machine/endian.h)
* 2009-12-17 Ralf Corsépius <ralf.corsepius@rtems.org>Jeff Johnston2009-12-171-1/+1
| | | | * libc/include/machine/setjmp.h: Set up _JBLEN #ifdef __m68k__.
* 2009-12-17 Ralf Corsepius <ralf.corsepius@rtems.org>Jeff Johnston2009-12-172-15/+20
| | | | | | | * libc/include/pthread.h: Add pthread_atfork, pthread_rwlock_unlock * libc/include/sys/stat.h: Use struct timespec st_*tim, blksize_t st_blksize, blkcnt_t st_blocks. Add st_*time compatibility macros.
* 2009-12-16 Ralf Corsépius <ralf.corsepius@rtems.org>Jeff Johnston2009-12-171-0/+34
| | | | | | | | | | | | | | | | * libc/sys/rtems/machine/_types.h: New (Derived from machine/_default_types.h). * libc/sys/rtems/crt0.c: Rework. Introduce macro RTEMS_STUB. * libc/sys/rtems/sys/param.h: Update copyright notice from FreeBSD. Remove HZ. Add #include <sys/priority.h> Remove priority handling (moved to sys/priority.h). Remove CLBYTES (Unused, abandoned in BSD). * libc/sys/rtems/sys/queue.h: Update copyright (from FreeBSD). Remove CIRCLEQ_*. 2
* 2009-12-16 Joel Sherrill <joel.sherrill@oarcorp.com>Jeff Johnston2009-12-161-0/+4
| | | | | * libc/sys/rtems/machine/param.h: Only use sizeof(double) -1 for ALIGNBYTES on SPARC.
* 2009-12-16 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-12-161-5/+1
| | | | | | * libc/include/sys/errno.h: Move EHOSTDOWN, EPFNOSUPPORT, and ETOOMANYREFS into general list as they are referenced by OpenGroup and needed by RTEMS.
* 2009-12-16 Ralf Corsépius <ralf.corsepius@rtems.org>Jeff Johnston2009-12-161-1/+0
| | | | * libc/search/hcreate.c: Don't include <sys/queue.h> (Unused).
* 2009-12-16 Ralf Corsépius <ralf.corsepius@rtems.org>Jeff Johnston2009-12-163-165/+95
| | | | | | | | | | | | | | * libc/sys/rtems/machine/_types.h: New (Derived from machine/_default_types.h). * libc/sys/rtems/crt0.c: Rework. Introduce macro RTEMS_STUB. * libc/sys/rtems/sys/param.h: Update copyright notice from FreeBSD. Remove HZ. Add #include <sys/priority.h> Remove priority handling (moved to sys/priority.h). Remove CLBYTES (Unused, abandoned in BSD). * libc/sys/rtems/sys/queue.h: Update copyright (from FreeBSD). Remove CIRCLEQ_*.
* 2009-12-15 Conny Marco Menebrocker <c-m-m@gmx.de>Jeff Johnston2009-12-152-7/+7
| | | | | | * libc/machine/xc16x/Makefile.am: Fix typo and refer to puts.c instead of putc.c. * libc/machine/xc16x/Makefile.in: Regenerated.
* 2009-12-14 Maxim Kuvyrkov <maxim@codesourcery.com>Jeff Johnston2009-12-141-0/+16
| | | | | * libc/machine/m68k/memcpy.S: Patch to support boards which do not support unaligned read/write.
* 2009-12-10 Conny Marco Menebrocker <c-m-m@gmx.de>Jeff Johnston2009-12-1014-3880/+11715
| | | | | | | | | | | | | | | | | | * configure.host: Add xc16x support. * libc/include/machine/ieeefp.h: Ditto. * libc/include/sys/config.h: Ditto. * libc/machine/configure.in: Ditto. * libc/machine/Makefile.in: Regenerated. * libc/machine/aclocal.m4: Ditto. * libc/machine/configure: Ditto. * libc/machine/xc16x/Makefile.am: New file. * libc/machine/xc16x/Makefile.in: Ditto. * libc/machine/xc16x/aclocal.m4: Ditto. * libc/machine/xc16x/configure: Ditto. * libc/machine/xc16x/configure.in: Ditto. * libc/machine/xc16x/putchar.c: Ditto. * libc/machine/xc16x/puts.c: Ditto. * libc/machine/xc16x/setjmp.S: Ditto.
* Fix some *at declarations.Eric Blake2009-12-083-2/+4
| | | | | | | * libc/include/stdio.h (symlinkat): Move this... * libc/include/sys/_default_fcntl.h (unlinkat): ...and this... * libc/include/sys/unistd.h (symlinkat, unlinkat): ...here, to match POSIX.
* 2009-12-03 Craig Howland <howland@LGSInnovations.com>Jeff Johnston2009-12-033-3/+3
| | | | | | * libc/stdlib/strtod.c: Correct "NO_REENT" to "_REENT_ONLY". * libc/stdlib/wcstod.c: Ditto. * libc/stdlib/dtoastub.c: Ditto.
* Use NetBSD fix for CVE-2009-0689 security vulnerability.Corinna Vinschen2009-11-233-2/+11
| | | | | | | | * libc/include/sys/reent.h (_Kmax): Define here based on the sizeof size_t, as in latest NetBSD. * libc/reent/reent.c (_reclaim_reent): Use _Kmax rather than constant value 15. * libc/stdlib/mprec.c (_Kmax): Don't define here. Explain why.
* * libc/machine/rx/strncat.S (_strncat): Replace use of r6Nick Clifton2009-11-201-4/+4
| | | | (call-saved) with r14 (call-used).
* * libc/stdio/vfprintf.c: Include ../stdlib/local.h. Replace call toCorinna Vinschen2009-11-1814-19/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | _mbtowc_r with direct call to __mbtowc. * libc/stdio/vfscanf.c: Ditto. * libc/stdlib/btowc.c: Include local.h. Replace call to _mbtowc_r with direct call to __mbtowc. * libc/stdlib/mblen.c: Ditto. * libc/stdlib/mblen_r.c: Ditto. * libc/stdlib/mbrtowc.c: Ditto. * libc/stdlib/mbstowcs_r.c: Ditto. * libc/stdlib/mbtowc.c: Ditto. * libc/stdlib/wcrtomb.c: Include local.h. Replace call to _wctomb_r with direct call to __wctomb. * libc/stdlib/wcsnrtombs.c: Ditto. (_wcsnrtombs_r): Ditto. * libc/stdlib/wcstombs_r.c: Ditto. * libc/stdlib/wctob.c: Ditto. * libc/stdlib/wctomb.c: Ditto. * libc/stdlib/mbrtowc.c (mbrtowc): Implement independently from _mbrtowc_r, unless PREFER_SIZE_OVER_SPEED or __OPTIMIZE_SIZE__ are defined. * libc/stdlib/wcrtomb.c (wcrtomb): Implement independently from _wcrtomb_r, unless PREFER_SIZE_OVER_SPEED or __OPTIMIZE_SIZE__ are defined. * libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Drop unnecessary test for ch >= 0.
* 2009-11-17 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>Jeff Johnston2009-11-171-0/+2
| | | | | * libm/common/fdlibm.h (logb, logbf): Move decls from here... * libc/include/math.h (logb, logbf): ...to here.
* * libc/include/ctype.h (__ctype_lookup): Fix precedence.Eric Blake2009-11-061-1/+1
|
* * libc/stdio/fflush.c (_fflush_r): Store old errno to check forCorinna Vinschen2009-10-301-10/+21
| | | | | | | low-level seek error condition. Restore old errno in case of success. Don't use new position after seek as error condition, rather check for return value of -1 and errno. Handle EINVAL just like ESPIPE. Only set fp->_offset if errno is 0.