summaryrefslogtreecommitdiffstats
path: root/newlib
Commit message (Collapse)AuthorAgeFilesLines
...
* * libc/locale/locale.c (loadlocale): Rename charset "GBK" toCorinna Vinschen2009-03-252-3/+8
| | | | "GB2312". Fix documentation accordingly.
* * libc/locale/locale.c (loadlocale): Rename charset "CP949" toCorinna Vinschen2009-03-242-24/+35
| | | | "eucKR". Fix documentation accordingly.
* * libc/locale/locale.c (loadlocale): Allow charset starting with 'e'Corinna Vinschen2009-03-242-0/+6
| | | | for "eucJP" charset support.
* 2009-03-24 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-03-242-1/+6
| | | | | * libc/include/sys/errno.h: Move EFTYPE to general usage because it is used in libc/search.
* * libc/ctype/iswalpha.c: Handle all wchar_t as unicode onCorinna Vinschen2009-03-2422-2196/+3361
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _MB_CAPABLE systems. * libc/ctype/iswblank.c: Ditto. * libc/ctype/iswcntrl.c: Ditto. * libc/ctype/iswprint.c: Ditto. * libc/ctype/iswpunct.c: Ditto. * libc/ctype/iswspace.c: Ditto. * libc/ctype/jp2uc.c (__jp2uc): On Cygwin, just return c. Explain why. * libc/ctype/towlower.c: Ditto. * libc/ctype/towupper.c: Ditto. * libc/include/sys/config.h: Define _MB_EXTENDED_CHARSETS_ISO and _MB_EXTENDED_CHARSETS_WINDOWS if _MB_EXTENDED_CHARSETS_ALL is defined. Define _MB_EXTENDED_CHARSETS_ALL on Cygwin only for now. * libc/include/sys/reent.h (struct _reent): Mark _current_category and _current_locale as unused. * libc/locale/locale.c: Add new charset support to documentation. Include ../stdio/local.h from here. (lc_ctype_charset): Set to "ASCII" by default. (lc_message_charset): Ditto. (_setlocale_r): Don't set _current_category and _current_locale. (loadlocale): Add Cygwin codepage support. On _MB_CAPABLE systems, set __mbtowc and __wctomb function pointers to function corresponding with current charset. Don't allow non-existant ISO-8859-12 charset. Add support for Windows singlebyte codepages. On Cygwin, add support for GBK, CP949, and BIG5. On Cygwin, call __set_ctype() in case the catorgy is LC_CTYPE. Don't set _current_category and _current_locale. * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add sb_charsets.c. * libc/stdlib/Makefile.in: Regenerate. * libc/stdlib/local.h: Add prototype for __locale_charset. Add prototypes for __mbtowc and __wctomb pointers. Add prototypes for charset-specific _wctomb_r and _mbtowc_r functions. Declare tables and functions from sb_charsets.c. * libc/stdlib/mbtowc_r.c (__mbtowc): Define. Set to __ascii_mbtowc by default. (_mbtowc_r): Just call __mbtowc from here. (__ascii_mbtowc): New function. (__iso_mbtowc): New function. (__cp_mbtowc): New function. (__utf8_mbtowc): New function. (__sjis_mbtowc): New function. Disable on Cygwin. (__eucjp_mbtowc): New function. Disable on Cygwin. (__jis_mbtowc): New function. Disable on Cygwin. * libc/stdlib/sb_charsets.c: New file, adding singlebyte to UTF conversion tables for all ISO and CP charsets. (__iso_8859_index): New function. (__cp_index): New function. * libc/stdlib/wctomb_r.c (__wctomb): Define. Set to __ascii_wctomb by default. (_wctomb_r): Just call __wctomb from here. (__ascii_wctomb): New function. (__utf8_wctomb): New function. (__sjis_wctomb): New function. Disable on Cygwin. (__eucjp_wctomb): New function. Disable on Cygwin. (__jis_wctomb): New function. Disable on Cygwin. (__iso_wctomb): New function. (__cp_wctomb): New function.
* 2009-03-23 Richard Earnshaw <rearnsha@arm.com>Jeff Johnston2009-03-232-1/+24
| | | | * libc/machine/arm/strcmp.c (strcmp): Treat char as unsigned.
* * libc/locale/locale.c (loadlocale): Fix typo in language andCorinna Vinschen2009-03-232-4/+9
| | | | territory evaluation.
* 2009-03-20 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-03-203-3/+40
| | | | | | | * libc/include/sys/errno.h: Protect various non-standard errnos with either __LINUX_ERRNO_EXTENSIONS__ or __CYGWIN__. * libc/include/sys/config.h[__CYGWIN__]: Define __LINUX_ERRNO_EXTENSIONS__.
* * libc/stdlib/mbtowc_r.c (_mbtowc_r): Return EILSEQ in case of anCorinna Vinschen2009-03-193-16/+70
| | | | | | | | invalid character sequence. * libc/stdlib/mbtowc_r.c (_mbtowc_r): Fix compiler warning due to missing declaration of __locale_charset. * libc/stdlib/wctomb_r.c (_wctomb_r): Ditto.
* 2009-03-18 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>Jeff Johnston2009-03-186-25/+176
| | | | | | | | * libm/common/s_log2.c: New file. * libm/common/sf_log2.c: Ditto. * libm/common/Makefile.am: Add s_log2.c and sf_log2.c. * libm/common/Makefile.in: Regenerated. * libc/include/math.h: Add log2 and log2f function prototypes.
* * libc/stdlib/mbstowcs_r.c (_mbstowcs_r): Handle NULL destinationCorinna Vinschen2009-03-172-8/+17
| | | | string correctly.
* 2009-03-16 Mark Mitchell <mark@codesourcery.com>Jeff Johnston2009-03-164-17/+31
| | | | | | | | | | | * libc/machine/arm/strlen.c (strlen): Fix defect in Thumb-2 mode. 2009-03-16 Richard Earnshaw <rearnsha@arm.com> * libc/machine/arm/strlen.c (strlen): Correctly detect end-of-string. * libc/machine/arm/strcpy.c (strcpy): Likewise. * libc/machine/arm/strcmp.c (strcmp, strcmp_unaligned): Likewise.
* * libc/include/sys/errno.h (ESTRPIPE): Define.Corinna Vinschen2009-03-153-0/+14
| | | | * libc/string/strerror.c (strerror): Decode it.
* * libc/include/wchar.h (wcsdup, _wcsdup_r): Declare.Corinna Vinschen2009-03-156-6/+91
| | | | | | | * libc/string/Makefile.am: Add wcsdup.c. * libc/string/Makefile.in: Regenerate. * libc/string/strings.tex: Add wcsdup documentation reference. * libc/string/wcsdup.c: New file.
* * libc/include/stdlib.h (_mkstemp_r, _mktemp_r): Move out ofCorinna Vinschen2009-03-142-2/+7
| | | | !_REENT_ONLY section.
* * libc/include/stdio.h (_mkstemp_r, _mktemp_r): Move declarationsCorinna Vinschen2009-03-144-3/+18
| | | | | | | to stdlib.h. * libc/include/stdlib.h (mktemp, _mktemp_r): Warn when using. * libc/stdio/mktemp.c: Explain the security risk when using mktemp.
* * libc/time/time.tex (wcsftime.def): Include.Corinna Vinschen2009-03-123-7/+20
| | | | * libc/time/wcsftime.c: Clean up documentation a little.
* * libc/stdio/swscanf.c: Some documentation corrections.Corinna Vinschen2009-03-122-3/+10
|
* * libc/stdio/swprintf.c (_swprintf_r, swprintf):Corinna Vinschen2009-03-126-140/+210
| | | | | | | | | | | | | | | correct how terminating L'\0' is added; change return to match standard for when output does not fit; some corrections and enhancements to the docs. * libc/stdio/vswprintf.c (_vswprintf_r): ditto, except for docs. * libc/stdio/vfwprintf.c: some corrections to the docs and some enhancements to comments. (No code changes.) * libc/time/strftime.c: Correct some problems that made wcsftime() not work correctly: work properly with swprintf returns that are different from snprintf returns, correct test vector lengths for when sizeof(wchar_t) > 1. * libc/stdio/sprintf.c: Some documentation and comment corrections and enhancements to match those done to swprintf.c.
* * libc/include/wchar.h (wcscasecmp, wcsncasecmp): Declare.Corinna Vinschen2009-03-117-22/+177
| | | | | | | | * libc/string/Makefile.am: Add wcscasecmp.c, wcsncasecmp.c * libc/stdio/Makefile.in: Regenerate. * libc/string/strings.tex: Add new documentation references. * libc/string/wcscasecmp.c: New file. * libc/string/wcsncasecmp.c: New file.
* * libc/include/wchar.h (fwscanf, swscanf, vfwscanf, vswscanf, vwscanf,Corinna Vinschen2009-03-1123-101/+2341
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wscanf): Declare. (_fwscanf_r, _swscanf_r, _vfwscanf_r, _vswscanf_r, _vwscanf_r, _wscanf_r): Declare. * libc/stdio/Makefile.am: Add new wscanf files. * libc/stdio/Makefile.in: Regenerate. * libc/stdio/fwscanf.c: New file. * libc/stdio/local.h (__svfwscanf_r, __ssvfwscanf_r, __svfiwscanf_r, __ssvfiwscanf_r): Declare. * libc/stdio/stdio.tex: Add new documentation references. * libc/stdio/swscanf.c: New file. * libc/stdio/vfwscanf.c: New file. * libc/stdio/vswscanf.c: New file. * libc/stdio/vwscanf.c: New file. * libc/stdio/wscanf.c: New file. * libc/stdio/vfscanf.c (_sungetc_r): Make externaly available. Only define if INTEGER_ONLY is defined. Declare otherwise. (__ssrefill_r): Ditto. (_sfread_r): Ditto. Remove static eofread/eofread1 functions and use __seofread function instead, throughout. * libc/stdio/local.h (__seofread): Declare. * libc/stdio/stdio.c (__seofread): Define. * libc/stdio/fgetwc.c (__fgetwc): Fix compiler warning. * libc/stdio/fgetws.c (_fgetws_r): Ditto. * libc/stdio/fread.c (_fread_r): Ditto. * libc/stdio/vfprintf.c: Ditto. * libc/stdio/vswprintf.c: Ditto.
* * libc/machine/arm/arm_asm.h: Fix typo.Corinna Vinschen2009-03-102-1/+5
|
* * libc/time/strftime.c: Adapt for dual-purpose use so not onlyCorinna Vinschen2009-03-097-271/+771
| | | | | | | | | | | | | defines strftime(), but can also define wcsftime(); add optional test package; speed up %Y handling. * libc/time/wcsftime.c: New file, defining wcsftime() (albeit indirectly by including strftime.c) and its documentation. * libc/time/time.tex: Enhance tm_isdst explanation, change strftime description to match modified description in strftime.c * libc/time/Makefile.am: Add wcsftime.c and wcsftime.def. Add a rule so that wcsftime.o gets rebuilt when strftime changes. * libc/time/Makefile.in: Regenerate. * libc/include/wchar.h (wcsftime): Declare.
* * libc/reent/reent.c (_reclaim_reent): Make a block from MP-relatedCorinna Vinschen2009-03-062-4/+16
| | | | | | statements in _REENT_SMALL case. Check if _atexit is not NULL before dereferencing it. (_wrapup_reent): Check if _atexit is not NULL before dereferencing it.
* * libc/include/stdio.h (__VALIST): Guard against multiple definition.Corinna Vinschen2009-03-0614-72/+2887
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libc/include/wchar.h: Include stdarg.h. (__VALIST): Define conditionally. (fwprintf, swprintf, vfwprintf, vswprintf, vwprintf, wprintf: Declare. (_fwprintf_r, _swprintf_r, _vfwprintf_r, _vswprintf_r, _vwprintf_r, _wprintf_r): Declare. * libc/stdio/Makefile.am: Add new files. * libc/stdio/Makefile.in: Regenerate. * libc/stdio/fwprintf.c: New file. * libc/stdio/local.h (_svfwprintf_r, _svfiwprintf_r): Declare. (__CH_CLASS, __STATE, __ACTION): Move definition from vfprintf.c here and move to the __ namespace. (__chclass, __state_table, __action_table): Declare. * libc/stdio/stdio.tex: Add new documentation references. * libc/stdio/swprintf.c: New file. * libc/stdio/vfprintf.c (__SPRINT): New macro to call the right __sprint_r function according to compilation unit. Use throughout. (__ssprint_r): Rename STRING_ONLY variant from __sprint_r. Make externaly available. Only define if INTEGER_ONLY is defined. (__sprint_r): Make externaly available. Only define if INTEGER_ONLY is defined. Handle stream orientation. (__sbprintf): Copy FILE's _flags2 member as well. (__chclass, __state_table, __action_table): Prepend __ to name and make externally available. * libc/stdio/vfwprintf.c: New file. * libc/stdio/vswprintf.c: New file. * libc/stdio/vwprintf.c: New file. * libc/stdio/wprintf.c: New file.
* * libc/locale/locale.c (_setlocale_r): New implementation based onCorinna Vinschen2009-03-0314-243/+455
| | | | | | | | | | | | | | | | | | | | | | | FreeBSD's setlocale. (currentlocale): New helper function. (loadlocale): Ditto. (__locale_charset): New function. (__locale_msgcharset): Rename from __locale_charset. * libc/ctype/local.h (__lc_ctype): Remove declaration. (__locale_charset): Declare. * libc/ctype/iswalpha.c (iswalpha): Call __locale_charset instead of using __lc_ctype directly. Only compare against the charset alone. * libc/ctype/iswblank.c (iswblank): Ditto. * libc/ctype/iswcntrl.c (iswcntrl): Ditto. * libc/ctype/iswprint.c (iswprint): Ditto. * libc/ctype/iswpunct.c (iswpunct): Ditto. * libc/ctype/iswspace.c (iswspace): Ditto. * libc/ctype/towlower.c (towlower): Ditto. * libc/ctype/towupper.c (towupper): Ditto. * libc/stdlib/mbtowc_r.c (_mbtowc_r): Ditto. * libc/stdlib/wctomb_r.c (_wctomb_r): Ditto. * libc/sys/linux/intl/loadmsgcat.c (_nl_init_domain_conv): Call __locale_msgcharset instead of __locale_charset.
* 2009-03-02 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-03-023-1/+14
| | | | | | * libc/stdlib/wctomb_r.c (_wctomb_r): When checking single-byte charset, cast wchar to size_t in case wchar_t is signed. * libc/stdlib/wctomb.c (wctomb): Add similar single-byte check.
* 2009-03-02 Corinna Vinschen <corinna@vinschen.de>Jeff Johnston2009-03-022-6/+38
| | | | | | * libc/stdlib/wctomb_r.c (_wctomb_r): Return EILSEQ in case of an invalid wchar. Return -1 if wchar doesn't fit into singlebyte value in case of using a singlebyte charset.
* 2009-02-26 Brooks Moses <brooks@codesourcery.com>Jeff Johnston2009-02-262-1/+5
| | | | * libc/machine/arm/strcpy.c: Add missing comma.
* Fix character set problem with Ralf's name.Jeff Johnston2009-02-261-1/+1
|
* 2009-02-26 Ralf Corsépius <ralf.corsepius@rtems.org>Jeff Johnston2009-02-263-2/+8
| | | | | | * libc/machine/lm32/configure.in: Let AC_CONFIG_SRCDIR point to setjmp.S instead of setjmp.s * libs/machine/lm32/configure: Regenerate.
* 2009-02-25 Brooks Moses <brooks@codesourcery.com>Jeff Johnston2009-02-255-7/+22
| | | | | | | | | | * libc/stdlib/Makefile.am (CHEWOUT_FILES): Add mbsnrtowcs.def, wcsnrtombs.def. * libc/stdlib/Makefile.in: Regenerate. * libc/stdlib/stdlib.tex (@menu): Use correct section names for mbsrtowcs, wcsrtombs. * libc/stdlib/wcstod.c: Remove stray character in documentation.
* * mbtowc_r.c (_mbtowc_r): Remove conversion of 5 and 6 byte UTF-8Corinna Vinschen2009-02-253-144/+79
| | | | | | | | sequences since they are invalid in the Unicode standard. Handle surrogate pairs in case of wchar_t == UTF-16. * wctomb_r.c (_wctomb_r): Don't convert invalid Unicode wchar_t values beyond 0x10ffff into UTF-8 chars. Handle surrogate pairs in case of wchar_t == UTF-16.
* * libc/stdio/open_memstream.c (stdint.h): Include.Kevin Buettner2009-02-252-0/+5
|
* 2009-02-23 Craig Howland <howland@LGSInnovations.com>Jeff Johnston2009-02-236-60/+125
| | | | | | | | | | | * libc/unix/ttyname.c: Remove ttyname_r() (to a new file to avoid coupling ttyname_r() and ttyname() due to the latter's large buffer). * libc/unix/ttyname_r.c: New file to hold ttyname_r(), previously in ttyname.c. * libc/unix/ttyname.h: New file (common size definition for the 2 ttyname*c files that are now split). * libc/unix/Makefile.am (ELIX_2_SOURCES): Add ttyname_r.c. * libc/unix/Makefile.in: Regenerate.
* * libc/include/wchar.h (mbsnrtowcs): Declare.Corinna Vinschen2009-02-199-123/+427
| | | | | | | | | | | | | | | | | | (_mbsnrtowcs_r): Declare. (wcsnrtombs): Declare. (_wcsnrtombs_r): Declare. * libc/stdlib/Makefile.am (ELIX_2_SOURCES): Add mbsnrtowcs.c and wcsnrtombs.c. * libc/stdlib/Makefile.in: Regenerate. * libc/stdlib/mbsnrtowcs.c: New file, implementing _mbsnrtowcs_r and mbsnrtowcs. Document mbsnrtowcs and mbsrtowcs. * libc/stdlib/mbsrtowcs.c (_mbsrtowcs_r): Just call _mbsnrtowcs_r. (mbsrtowcs): Ditto. * libc/stdlib/wcsnrtombs.c: New file, implementing _wcsnrtombs_r and wcsnrtombs. Document wcsrtombs and wcsnrtombs. * libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Just call _wcsnrtombs_r. (wcsrtombs): Ditto. * libc/stdlib/stdlib.tex: Accommodate new documentation.
* 2009-02-18 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-02-184-17/+36
| | | | | | | | | | | | * libc/stdio/open_memstream.c (internal_open_memstream_r): Fix max buffer size to be in wchar_t units if wide == 1 is passed in. In this case, also initialize the first character of the buffer to be wide char null. (_open_wmemstream_r): Cast buf to be (char **) to avoid warning. * libc/stdlib/mbtowc_r.c (_mbtowc_r): Change all occurences of incrementing the size_t value n to first check that n is not already size_t -1. Fix some compiler warnings. * libc/stdlib/wcstod.c: Add includes for <wctype.h> and <math.h>.
* * libc/stdio/open_memstream.c: Add open_wmemstream to doumentation.Corinna Vinschen2009-02-183-26/+123
| | | | | | | | | | | | | | | | | (struct memstream): Add wide element. Change saved to a union to take char and wchar_t values. (memwriter): Accommodate wide-oriented oeprations. (memseeker): Ditto. (memseeker64): Ditto. (memcloser): Ditto. (internal_open_memstream_r): New static function. Take functionality from former _open_memstream_r and handle additional "wide" parameter. (_open_memstream_r): Just call internal_open_memstream_r with wide==-1 from here. (_open_wmemstream_r): New function. (open_wmemstream): Ditto. * libc/include/wchar.h (open_wmemstream): Declare. (_open_wmemstream_r): Declare.
* * libc/stdio/fputwc.c: Fix typo in man page info.Corinna Vinschen2009-02-162-2/+6
|
* 2009-02-12 Corinna Vinschen <corinna@vinschen.de>Jeff Johnston2009-02-126-7/+245
| | | | | | | | | | | | * libc/include/wchar.h (_wcstod_r): Declare. (_wcstof_r): Declare. (wcstod): Declare. (wcstof): Declare. * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add wcstod.c. (CHEWOUT_FILES): Add wcstod.def. * libc/stdlib/Makefile.in: Regenerate. * libc/stdlib/stdlib.tex: Add wcstod. * libc/stdlib/wcstod.c: New file.
* 2009-02-05 Neal H. Walfield <neal@gnu.org>Jeff Johnston2009-02-052-8/+12
| | | | * libc/machine/x86_64/memcpy.S (memcpy): Don't use the red zone.
* 2009-01-28 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-01-282-2/+12
| | | | | | * libc/stdio/vfscanf.c (__SVFSCANF_R): Add additional check for inf and nan processing to not proceed if we have already collected zeroes.
* * configure.host (m32c-*-*): Add long long I/O support by default.DJ Delorie2009-01-272-0/+9
|
* 2009-01-21 Richard Earnshaw <rearnsha@arm.com>Jeff Johnston2009-01-227-4/+864
| | | | | | | | * libc/machine/arm/arm_asm.h: New file. * libc/machine/arm/strlen.c: New file. * libc/machine/arm/strcpy.c: New file. * libc/machine/arm/strcmp.c: New file. * libc/machine/arm/Makefile.am: Add new string routines.
* 2009-01-19 Neal H. Walfield <neal@gnu.org>Jeff Johnston2009-01-193-20/+28
| | | | | | | | * libc/include/stdint.h (INT64_C, UINT64_C, INTMAX_C, UINTMAX_C) [__have_long64 && __have_longlong64]: Use L and UL, not LL and ULL. * libc/include/inttypes.h (__PRI64, __SCN64, __PRIMAX, __SCNMAX, __PRIPTR, __SCNPTR) [__have_long64 && __have_longlong64]: Use l, not ll.
* 2009-01-12 Nathan Froyd <froydnj@codesourcery.com>Jeff Johnston2009-01-122-2/+4
| | | | * libc/machine/powerpc/vfscanf.c (__sccl): Remove declaration.
* 2009-01-12 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-01-122-4/+5
| | | | | * libc/stdio/fwalk.c (__fwalk, __fwalk_reent): Remove locking of each fp. Let the function being called lock the fp, if necessary.
* * libc/include/sys/stdio.h (_flockfile, _funlockfile): Fix typos.Kazu Hirata2009-01-082-2/+6
|
* 2009-01-05 Craig Howland <howland@LGSInnovations.com>Jeff Johnston2009-01-052-1/+5
| | | | * libc/stdio/fwide.c: Correct typo in TRAD_SYNOPSIS for _fwide_r.
* 2008-12-19 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2008-12-2286-799/+833
| | | | | | | | | | | | | | | | | * NEWS: Update with 1.17.0 info. * README: Ditto. * acinclude.m4: Change version number to 1.17.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.17