summaryrefslogtreecommitdiffstats
path: root/newlib/libc
Commit message (Collapse)AuthorAgeFilesLines
* 2009-04-03 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>Jeff Johnston2009-04-031-0/+2
| | | | | * libc/include/stdio.h [__SCLE] (__sgetc_r): Prototype before define to avoid a warning with -Wmissing-prototypes.
* 2009-04-03 Ken Werner <ken.werner@de.ibm.com>Jeff Johnston2009-04-031-2/+7
| | | | * libc/machine/spu/mmap_ea.c (mmap_ea): Check length argument.
* 2009-04-03 Ken Werner <ken.werner@de.ibm.com>Jeff Johnston2009-04-031-3/+10
| | | | | * libc/machine/spu/sys/linux_syscalls.h: include <sys/types.h> (linux_getpid, linux_gettid): Declare.
* 2009-04-03 Ken Werner <ken.werner@de.ibm.com>Jeff Johnston2009-04-031-8/+29
| | | | | * libc/machine/spu/spu-gmon.c: Tweaks to support simultaneous SPU profiling.
* 2009-04-03 Ken Werner <ken.werner@de.ibm.com>Jeff Johnston2009-04-031-3/+3
| | | | | * libc/include/math.h: Remove duplicate copysign prototype. Fix __math_68881 define typo. Guard functions of the rint family.
* * libc/ctype/ctype_c.c: Move inclusion of ctype_iso.h andCorinna Vinschen2009-04-022-11/+35
| | | | | | | | | ctype_cp.h out of ALLOW_NEGATIVE_CTYPE_INDEX case. (__ctype_ptr__): Constify in !_MB_CAPABLE case. Otherwise, de-constify in !ALLOW_NEGATIVE_CTYPE_INDEX case, too. Add comment. (__set_ctype): Set __ctype_ptr__ pointer according to definition of ALLOW_NEGATIVE_CTYPE_INDEX. * libc/include/ctype.h (__ctype_ptr__): Constify in !_MB_CAPABLE case.
* * libc/ctype/Makefile.am: Remove _tolower.c and _toupper.cCorinna Vinschen2009-03-3112-91/+1106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source files. Add a dependency rule for ctype_o to note changes in ctype_iso.h and ctype_cp.h. * libc/ctype/Makefile.in: Regenerate. * libc/ctype/_tolower.c: Remove file. * libc/ctype/_toupper.c: Remove file. * libc/ctype/ctype_.c: Make sure ALLOW_NEGATIVE_CTYPE_INDEX is always defined on Cygwin. (_ctype_b): Don't make `static const' on Cygwin. (ctype_iso.h): Include if _MB_EXTENDED_CHARSETS_ISO is set. (ctype_cp.h): Include if _MB_EXTENDED_CHARSETS_WINDOWS is set. (__ctype_ptr): Drop definition. (__ctype_ptr__): De-constify. Mark as __EXPORT symbol. (_ctype_): Add Cygwin-specifc asm define. (__set_ctype): New function to set __ctype_ptr__ according to current charset. * libc/ctype/ctype_cp.h: New file containing Windows codepage specific character class tables. * libc/ctype/ctype_iso.h: New file containing ISO-8859-x specific character class tables. * libc/ctype/tolower.c (tolower): Reimplement to support any singlebyte charset if one of the extended charsets is enabled. * libc/ctype/toupper.c (toupper): Ditto. * libc/include/ctype.h (_tolower): Define as macro per POSIX. (_toupper): Ditto. (__ctype_ptr__): De-constify. (toupper): Disable macro on systems supporting extended charsets. (tolower): Ditto. * libc/include/sys/config.h (__EXPORT): Define empty if not defined. * libc/locale/locale.c (__mb_cur_max): Mark as __EXPORT symbol. (__set_ctype): Declare unconditionally. (loadlocale): Remove __CYGWIN__ guard around __set_ctype call.
* * libc/locale/locale.c (loadlocale): Revert to charset "GBK" insteadCorinna Vinschen2009-03-261-2/+2
| | | | of "GB2312". Fix documentation accordingly.
* Revert erroneously checked in files.Corinna Vinschen2009-03-263-36/+23
|
* * libc/ctype/ctype_.c (_CTYPE_DATA_0_127): Mark TAB as blank character.Corinna Vinschen2009-03-263-2/+6
| | | | | | * libc/ctype/isblank.c: Replace hardcoded test with test for having _B marker in ctype array. * libc/include/ctype.h (isblank): Add macro.
* 2009-03-25 Craig Howland <howland@LGSInnovations.com>Jeff Johnston2009-03-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libc/include/math.h: (llround, llroundf): Declare. * libm/common/s_llround.c: New file, implementing llround(). * libm/common/sf_llround.c: New file, implementing llroundf(). * libm/common/sf_lround.c: Remove spurious cast in _DOUBLE_IS_32BITS version of function. * libm/common/sf_lrint.c: Ditto. * libm/common/sf_logb.c: Corrected return for subnormal argument by replacing existing function with a version created from sf_ilogb.c. * libm/common/s_logb.c: Ditto, except starting point s_ilogb.c. Also added documentation for logb() and logbf(). * libm/common/s_signbit.c: Add signbit() documentation. * libm/common/s_log2.c: Update return values to match what w_log2.c has, since log2 uses log(); add note about being derived instead of direct. * libm/common/sf_fma.c: Add casts to attempt to get correct results, as well as comments pointing out problems with the implementation. * libm/common/s_fma.c: Add fma() and fmaf() documentation. * libm/common/sf_remquo.c: Incorrect quotient returns for large values corrected by discarding existing function and replacing with Sun verion, with some enhancements. * libm/common/s_remquo.c: Ditto. Add remquo() and remquof() documentation. * libm/common/s_fmax.c: Add fmax() and fmaxf() documentation. * libm/common/s_fmin.c: Add fmin() and fminf() documentation. * libm/common/s_fdim.c: Return NAN for NAN arg, add fdim() and fdimf() documentation. * libm/common/sf_fdim.c: Return NAN for NAN arg, HUGE_VALF for inf arg. * libm/common/s_trunc.c: Add trunc() and truncf() documentation. * libm/common/s_rint.c: Add rint() and rintf() documentation. * libm/common/s_round.c: Add round() and roundf() documentation. * libm/common/s_scalbn.c: Add scalbln() and scalblnf() documentation. * libm/common/s_infinity.c: Add infinity() and infinityf() documentation. * libm/common/s_lround.c: Add lround(), lroundf(), llround(), and llroundf() documentation. * libm/common/s_lrint.c: Add lrint(), lrintf(), llrint(), and llrintf() documentation. * libm/common/isgreater.c: New file for documenting math.h function-like macros isgreater(), isgreaterequal(), isless(), islessequal(), islessgreater(), and isunordered(). * libm/common/s_isnan.c: Add documentation for function-like macros fpclassify(), isfinite(), isinf(), isnan(), and isnormal(). * libm/common/s_nearbyint.c: Add nearbyint() and nearbyintf() documentation. * libm/common/Makefile.am: Add s_llround.c (src); sf_llround.c (fsrc); s_fdim.def, s_fma.def, s_fmax.def, s_fmin.def, s_logb.def, s_lrint.def, s_lround.def, s_nearbyint.def, s_remquo.def, s_rint.def, s_round.def, s_signbit.def, s_trunc.def, and isgreater.def (chobj); re-name all existing chew files (chobj) to match source file base names (put in underscores), delete all special targets for chew files (leaving all to be generated by rule). * libm/common/Makefile.in: regenerate. * libm/math/w_exp2.c: Add "base 2" to documentation description (and delete TRAD_SYNOPSIS). * libm/math/w_gamma.c: Add tgamma() and tgammaf() documentation, along with some history behind the function names. * libm/math/math.tex: Add includes for newly-added documentation (see .def additions to common/Makefile.am and math/Makefile.am in this ChangeLog list), adjusted existing .def file names to match source file base names (added underscores); add mention of HUGE_VALF; rename "Version of library" section to "Error Handling" and add some text about floating-point exception; added section "Standards Compliance And Portability". * libm/math/Makefile.am: Add w_exp2.def (chobj); re-name all existing chew files (chobj) to match source file base names, delete all special targets for chew files (leaving all to be generated by rule). * libm/math/Makefile.in: regenerated * doc/makedoc.c: Change silent ignoring of commands < 5 characters to a failure when reading macro file for commands < 4 characters; add -v (verbose) option for printing some debugging information; get rid of spurious translation of "@*" to "*" (no source files used @*, so no existing doc pages were affected); clean up some compiler warnings. * doc/doc.str: add BUGS and SEEALSO sections (to match texi2pod.pl which has them); Remove ITEM command (redundant with makedoc built-in "o", not used in any present source file so nothing is lost, anyway). * HOWTO: New file to hold information for maintainers regarding how to do things. Initial sections on documentation and ELIX levels.
* 2009-03-25 Richard Earnshaw <rearnsha@arm.com>Jeff Johnston2009-03-251-6/+28
| | | | | * libc/machine/arm/strcmp.c (strcmp_unaligned): Correctly detect the nul-byte in a big-endian string.
* 2009-03-25 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-03-253-15/+19
| | | | | | | * libc/string/wcsdup.c: Fix documentation error. * libc/string/Makefile.am: Fix CHEWOUT files to contain wcsdup.def rather than wcsdup. * libc/string/Makefile.in: Regenerated.
* * libc/locale/locale.c (loadlocale): Only change __wctomb and __mbtowcCorinna Vinschen2009-03-251-24/+31
| | | | pointers if category is LC_CTYPE.
* * libc/locale/locale.c (loadlocale): Rename charset "GBK" toCorinna Vinschen2009-03-251-3/+3
| | | | "GB2312". Fix documentation accordingly.
* * libc/locale/locale.c (loadlocale): Rename charset "CP949" toCorinna Vinschen2009-03-241-24/+30
| | | | "eucKR". Fix documentation accordingly.
* * libc/locale/locale.c (loadlocale): Allow charset starting with 'e'Corinna Vinschen2009-03-241-0/+1
| | | | for "eucJP" charset support.
* 2009-03-24 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-03-241-1/+1
| | | | | * 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-2421-2196/+3299
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _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-231-1/+20
| | | | * libc/machine/arm/strcmp.c (strcmp): Treat char as unsigned.
* * libc/locale/locale.c (loadlocale): Fix typo in language andCorinna Vinschen2009-03-231-4/+4
| | | | territory evaluation.
* 2009-03-20 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-03-202-3/+33
| | | | | | | * 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-192-16/+61
| | | | | | | | 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-181-0/+2
| | | | | | | | * 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-171-8/+12
| | | | string correctly.
* 2009-03-16 Mark Mitchell <mark@codesourcery.com>Jeff Johnston2009-03-163-17/+20
| | | | | | | | | | | * 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-152-0/+9
| | | | * libc/string/strerror.c (strerror): Decode it.
* * libc/include/wchar.h (wcsdup, _wcsdup_r): Declare.Corinna Vinschen2009-03-155-6/+83
| | | | | | | * 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-141-2/+2
| | | | !_REENT_ONLY section.
* * libc/include/stdio.h (_mkstemp_r, _mktemp_r): Move declarationsCorinna Vinschen2009-03-143-3/+10
| | | | | | | 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-122-7/+15
| | | | * libc/time/wcsftime.c: Clean up documentation a little.
* * libc/stdio/swscanf.c: Some documentation corrections.Corinna Vinschen2009-03-121-2/+5
|
* * libc/stdio/swprintf.c (_swprintf_r, swprintf):Corinna Vinschen2009-03-125-140/+194
| | | | | | | | | | | | | | | 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-116-21/+167
| | | | | | | | * 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-1122-100/+2306
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-101-1/+1
|
* * libc/time/strftime.c: Adapt for dual-purpose use so not onlyCorinna Vinschen2009-03-096-271/+757
| | | | | | | | | | | | | 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-061-4/+8
| | | | | | 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-0613-72/+2856
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-0313-241/+430
| | | | | | | | | | | | | | | | | | | | | | | 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-022-1/+8
| | | | | | * 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-021-6/+32
| | | | | | * 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-261-1/+1
| | | | * libc/machine/arm/strcpy.c: Add missing comma.
* 2009-02-26 Ralf Corsépius <ralf.corsepius@rtems.org>Jeff Johnston2009-02-262-2/+2
| | | | | | * 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-254-3/+7
| | | | | | | | | | * 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-252-144/+70
| | | | | | | | 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-251-0/+1
|
* 2009-02-23 Craig Howland <howland@LGSInnovations.com>Jeff Johnston2009-02-235-60/+114
| | | | | | | | | | | * 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-198-123/+408
| | | | | | | | | | | | | | | | | | (_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-183-17/+24
| | | | | | | | | | | | * 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>.