summaryrefslogtreecommitdiffstats
path: root/newlib/libc
Commit message (Collapse)AuthorAgeFilesLines
* 2009-09-28 Michael Eager <eager@eagercon.com>Jeff Johnston2009-09-2818-2/+7295
| | | | | | | | | | | | | | | | | | | | | * configure.host: Add microblaze. * libc/include/machine/ieeefp.h [MICROBLAZE]: Define __IEEE_BIG_ENDIAN. * libc/include/machine/setjmp.h [MICROBLAZE]: Define _JBLEN, _JBTYPE. * libc/include/sys/config.h [MICROBLAZE]: Define _REENT_SMALL, _UNIX98_THREAD_MUTEX_ATTRIBUTES. * libc/include/sys/types.h: Treat XMK like rtems, define PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_ERRORCHECK, PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_DEFAULT, PTHREAD_STACK_MIN, define stuct pthread_attr_s. * libc/machine/configure.in: Add microblaze. * libc/machine/configure: Add microblaze (not regenerated). * libc/machine/microblaze/configure.in: NEW. * libc/machine/microblaze/configure: Generate. * libc/machine/microblaze/Makefile.am: NEW. * libc/machine/microblaze/Makefile.in: Generate. * libc/machine/microblaze/{abort.c, strcmp.c, strcpy.c, strlen.c, mallocr.c, longjmp.S, setjmp.S}: NEW. * libc/stdlib/mallocr.c [MICROBLAZE]: Don't declare sbrk prototype, mALLOc(): return malloc value.
* * libc/locale/locale.c (lc_ctype_charset): Set to "UTF-8" on Cygwin.Corinna Vinschen2009-09-273-0/+17
| | | | | | | | | (lc_message_charset): Ditto. (loadlocale): Set charset of the "C" locale to "UTF-8" on Cygwin. * libc/stdlib/mbtowc_r.c (__mbtowc): Default to __utf8_mbtowc on Cygwin. * libc/stdlib/wctomb_r.c (__wctomb): Default to __utf8_wctomb on Cygwin.
* * libc/include/sys/unistd.h (execvpe, fexecve) [__CYGWIN__]:Eric Blake2009-09-261-0/+2
| | | | Add declarations.
* * libc/include/sys/unistd.h (eaccess, euidaccess) [__CYGWIN__]:Eric Blake2009-09-251-0/+2
| | | | Add declarations.
* * libc/locale/locale.c: Drop Cygwin-specific windows.h include.Corinna Vinschen2009-09-231-4/+1
| | | | (loadlocale): Call __set_charset_from_codepage with 0 codepage.
* 2009-09-22 Ralf Corsépius <ralf.corsepius@rtems.org>Jeff Johnston2009-09-221-0/+4
| | | | * libc/include/stdlib.h: Add posix_memalign.
* * libc/include/sys/unistd.h: Declare getpagesize as returning POSIX-mandatedChristopher Faylor2009-09-192-2/+2
| | | | | int. * libc/sys/linux/sys/unistd.h: Ditto.
* 2009-08-25 Andy Koppe <andy.koppe@gmail.com>Jeff Johnston2009-08-253-2/+3
| | | | | | | | * libc/stdlib/sb_charsets.c (__micro_atoi): Allow five-digit codepage numbers. * libc/locale/locale.c (loadlocale): Set MB_CUR_MAX to 1 for KOI8 charsets. * libc/stdlib/local.h (__cp_conv): Remove incorrect number of codepages.
* 2009-08-24 Corinna Vinschen <corinna@vinschen.de>Jeff Johnston2009-08-243-14/+132
| | | | | | | | | | | * libc/locale/locale.c: Update documentation. (loadlocale): Map "KOI8-R" and "KOI8-U" to CP20866 and CP21866. 2009-08-24 Andy Koppe <andy.koppe@gmail.com> * libc/stdlib/sb_charsets.c (__cp_conv): Add KOI8-R (Russian, CP20866) and KOI8-U (Ukrainian, CP21866) to Windows codepage conversion tables. * libc/ctype/ctype_cp.h (__ctype_cp): Likewise for ctype tables.
* 2009-08-24 Andy Koppe <andy.koppe@gmail.com>Jeff Johnston2009-08-242-2/+4
| | | | | | * libc/ctype/iswspace.c (iswspace): Include "non-breaking space" (U+00A0). * libc/ctype/iswblank.c (iswblank): Likewise.
* * libc/locale/locale.c (loadlocale): Throughout check charset stringCorinna Vinschen2009-08-211-11/+29
| | | | | case insensitive and store internal charset string uppercased. Allow "UTF8" additionally to "UTF-8". Add this change to documentation.
* iconv: match SUSv3 prototypeEric Blake2009-08-212-7/+8
| | | | | * libc/include/iconv.h (iconv): Match POSIX prototype. * libc/iconv/lib/iconv.c (iconv): Likewise.
* 2009-08-21 Craig Howland <howland@LGSInnovations.com>Jeff Johnston2009-08-211-16/+1
| | | | | * libm/common/s_remquo.c (remquo): Fix sign of quotient when |x|==|y|. * libc/stdio/mktemp.c: Add #include <stdlib.h> for function prototypes.
* all-local should depend upon crt0, not all.Ralf Wildenhues2009-08-1950-125/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * iconvdata/Makefile.am (all): Remove. * libc/sys/a29khif/Makefile.am (all-am): Rename from ... (all): ... this. * libc/sys/arc/Makefile.am: Likewise. * libc/sys/arm/Makefile.am: Likewise. * libc/sys/d10v/Makefile.am: Likewise. * libc/sys/decstation/Makefile.am: Likewise. * libc/sys/h8300hms/Makefile.am: Likewise. * libc/sys/h8500hms/Makefile.am: Likewise. * libc/sys/linux/Makefile.am: Likewise. * libc/sys/linux/machine/i386/Makefile.am: Likewise. * libc/sys/m88kbug/Makefile.am: Likewise. * libc/sys/mmixware/Makefile.am: Likewise. * libc/sys/netware/Makefile.am: Likewise. * libc/sys/rdos/Makefile.am: Likewise. * libc/sys/rtems/Makefile.am: Likewise. * libc/sys/sh/Makefile.am: Likewise. * libc/sys/sparc64/Makefile.am: Likewise. * libc/sys/sun4/Makefile.am: Likewise. * libc/sys/sysmec/Makefile.am: Likewise. * libc/sys/sysnec810/Makefile.am: Likewise. * libc/sys/sysnecv850/Makefile.am: Likewise. * libc/sys/sysvi386/Makefile.am: Likewise. * libc/sys/sysvnecv70/Makefile.am: Likewise. * libc/sys/tic80/Makefile.am: Likewise. * libc/sys/w65/Makefile.am: Likewise. * libc/sys/z8ksim/Makefile.am: Likewise. * iconvdata/Makefile.in: Regenerate. * libc/sys/a29khif/Makefile.in: Likewise. * libc/sys/arc/Makefile.in: Likewise. * libc/sys/arm/Makefile.in: Likewise. * libc/sys/d10v/Makefile.in: Likewise. * libc/sys/decstation/Makefile.in: Likewise. * libc/sys/h8300hms/Makefile.in: Likewise. * libc/sys/h8500hms/Makefile.in: Likewise. * libc/sys/linux/Makefile.in: Likewise. * libc/sys/linux/machine/i386/Makefile.in: Likewise. * libc/sys/m88kbug/Makefile.in: Likewise. * libc/sys/mmixware/Makefile.in: Likewise. * libc/sys/netware/Makefile.in: Likewise. * libc/sys/rdos/Makefile.in: Likewise. * libc/sys/rtems/Makefile.in: Likewise. * libc/sys/sh/Makefile.in: Likewise. * libc/sys/sparc64/Makefile.in: Likewise. * libc/sys/sun4/Makefile.in: Likewise. * libc/sys/sysmec/Makefile.in: Likewise. * libc/sys/sysnec810/Makefile.in: Likewise. * libc/sys/sysnecv850/Makefile.in: Likewise. * libc/sys/sysvi386/Makefile.in: Likewise. * libc/sys/sysvnecv70/Makefile.in: Likewise. * libc/sys/tic80/Makefile.in: Likewise. * libc/sys/w65/Makefile.in: Likewise. * libc/sys/z8ksim/Makefile.in: Likewise.
* Fix 'make info' to work again.Eric Blake2009-08-192-2/+4
| | | | | * libc/Makefile.am (SUBDEFS): Correctly build popen docs. * libc/libc.texinfo (Top): Add posix node to menu.
* 2009-08-18 Eric Blake <ebb9@byu.net>Jeff Johnston2009-08-181-3/+7
| | | | | | | | | | | | | * libc/posix/popen.c (popen): Fix documented prototype. Improve popen compatibility with glibc. * libc/posix/popen.c (popen): The 2006-08-22 change to use FD_CLOEXEC disagrees with other implementations; instead, use pidlist to work even when fcntl is not available. Meanwhile, support the 'e' modifier to set CLOEXEC, as in glibc. Drop cygwin-specific code, now that cygwin has its own version. * libc/posix/Makefile.am (CHEWOUT_FILES): Document popen. * libc/posix/posix.tex: New file.
* * libc/posix/popen.c (popen): Fix documented prototype.Eric Blake2009-08-181-1/+1
|
* Improve popen compatibility with glibc.Eric Blake2009-08-183-17/+78
| | | | | | | | | | * libc/posix/popen.c (popen): The 2006-08-22 change to use FD_CLOEXEC disagrees with other implementations; instead, use pidlist to work even when fcntl is not available. Meanwhile, support the 'e' modifier to set CLOEXEC, as in glibc. Drop cygwin-specific code, now that cygwin has its own version. * libc/posix/Makefile.am (CHEWOUT_FILES): Document popen. * libc/posix/posix.tex: New file.
* 2009-08-17 Craig Howland <howland@LGSInnovations.com>Jeff Johnston2009-08-181-42/+10
| | | | | * libc/string/wcsncpy.c (wcsncpy): Re-write function based on small version of strncpy() (fixing two bugs).
* * libc/stdio/mktemp.c (mkdtemp): Fix type in function name.Corinna Vinschen2009-08-131-1/+1
|
* 2009=08-12 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-08-125-7/+89
| | | | | | | | | | | | | * libc/stdio/mktemp.c (_gettemp): Do not call _mkdir_r unless HAVE_MKDIR is defined. 2009-08-12 Hans-Peter Nilsson <hp@axis.com> * libc/include/reent.h: Add prototype and definition of _mkdir_r. * libc/reent/Makefile.am (GENERAL_SOURCES): Add mkdirr.c. (CHEWOUT_FILES): Add mkdirr.def. * libc/reent/Makefile.in: Regenerate. * libc/reent/mkdirr.c: New file.
* 2009-08-10 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-08-101-2/+2
| | | | | * libc/stdlib/wcstombs.c: Change documentation to specify size_t return type instead of int.
* 2009-07-29 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-07-291-1/+1
| | | | | * libc/stdlib/a64l.c: Fix to use 'a' instead of 'A' in calculation when a lower-case character is detected.
* * libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Rework UTF-16 surrogateCorinna Vinschen2009-07-291-31/+31
| | | | | | | pair handling to be more bullet-proof even with incomplete UTF-8 sequences. Add check for 4 byte sequences resulting in values outside the valid Unicode range. Add a comment to clarify checking for invalid CESU-8 sequences.
* * libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Fix incrementing n in caseCorinna Vinschen2009-07-281-8/+13
| | | | of handling incomplete sequences.
* Avoid a fault from locking a closed standard file.Eric Blake2009-07-221-0/+3
| | | | | * libc/stdio/fflush.c (_fflush_r): Give up early if stream has been previously closed.
* 2009-07-09 Craig Howland <howland@LGSInnovations.com>Jeff Johnston2009-07-092-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libm/math/ef_scalb.c: Replace isnanf() (pre-C99 function call) with isnan() (C99 macro). * libm/math/wf_log.c: Ditto. * libm/math/wf_j0.c: Ditto. * libm/math/wf_sqrt.c: Ditto. * libm/math/wf_pow.c: Ditto. * libm/math/wf_fmod.c: Ditto. * libm/math/wf_remainder.c: Ditto. * libm/math/wf_scalb.c: Ditto. * libm/math/wf_atanh.c: Ditto. * libm/math/wf_cosh.c: Ditto. * libm/math/wf_acos.c: Ditto. * libm/math/wf_acosh.c: Ditto. * libm/math/wf_jn.c: Ditto. * libm/math/wf_log10.c: Ditto. * libm/math/wf_asin.c: Ditto. * libm/math/wf_j1.c: Ditto. * libm/common/sf_isnan.c: Add #include <ieeefp.h>, fix comment. * libm/common/sf_isinf.c: Add #include <ieeefp.h>, adjust comment to match that from s_isinf.c. * libc/include/machine/ieeefp.h: Simplify isinf and isnan macros to remove un-necessary extension use (in a similar manner to as was recently done in math.h). * libc/include/math.h: Remove isnanf and isinff prototypes (are in ieeefp.h). * libm/machine/spu/sf_isinf.c: Fix comment (remove <math.h>).
* 2009-07-06 Joel Sherrill <joel.sherrill@oarcorp.com>Jeff Johnston2009-07-061-0/+3
| | | | | * libc/include/sys/features.h: Enable UNIX98 mutex attributes for RTEMS.
* Add mkdtemp, mkstemps.Eric Blake2009-07-032-29/+117
| | | | | | | | | | * libc/stdio/mktemp.c: Fix documentation. (_gettemp): Add domkdir and length parameters. Check for insufficient 'X' suffix. Drop cygwin-specific code. (_mkstemp_r, _mktemp_r, mkstemp, mktemp): Adjust clients. (_mkdtemp_r, _mkstemps_r, mkdtemp, mkstemps): New functions. * libc/include/stdlib.h (_mkdtemp_r, _mkstemps_r, mkdtemp) (mkstemps): Declare them.
* Add fpurge.Eric Blake2009-07-035-9/+127
| | | | | | | | | * libc/stdio/fpurge.c (fpurge, _fpurge_r): New file. * libc/stdio/Makefile.am (ELIX_4_SOURCES, CHEWOUT_FILES, fpurge): Build it. * libc/stdio/Makefile.in: Regenerated. * libc/include/stdio.h (fpurge, _fpurge_r): New declarations. * libc/stdio/stdio.tex: Build documentation.
* 2009-06-19 Joel Sherrill <joel.sherrill@oarcorp.com>Jeff Johnston2009-06-191-1/+1
| | | | | * libc/sys/rtems/machine/param.h: Change ALIGNBYTES so it can point to an aligned structure or double.
* * libc/locale/locale.c (loadlocale): Add handling of "@cjknarrow"Corinna Vinschen2009-06-181-27/+67
| | | | | modifier on _MB_CAPABLE targets. Add comment to explain. Improve documentation.
* 2009-06-17 Michael Eager <eager@eagercon.com>Jeff Johnston2009-06-173-1/+71
| | | | | | | * libc/include/pthread.h: Support XMK (Xilinx) BSP, add RTEMS to PTHREAD_MUTEX_NORMAL. * libc/include/sys/features.h: Same. * libc/include/sys/types.h: Same.
* * libc/include/locale.h (struct lconv): Add missing members requiredCorinna Vinschen2009-06-162-0/+8
| | | | | | by POSIX.1-2008. * libc/locale/locale.c (lconv): Initialize new members to default values in "C" locale.
* * libc/stdio/vfprintf.c (_VFPRINTF_R): Use actual length ofCorinna Vinschen2009-06-164-28/+46
| | | | | | | | | | | radix char instead of assuming length 1. * libc/stdlib/gdtoa-gethex.c: Remove use of USE_LOCALE. (gethex): Allow multibyte decimal point. Fix compiler warnings due to different signedness of pointer types. * libc/stdlib/strtod.c: Remove use of USE_LOCALE. (_strtod_r): Allow multibyte decimal point. * libc/stdlib/wcstod.c (_wcstod_r): Evaluate correct wide char endptr position if the decimal point is a multibyte char.
* 2009-06-16 Craig Howland <howland@LGSInnovations.com>Jeff Johnston2009-06-162-2/+2
| | | | | | * libc/ctype/local.h (__locale_charset): Add arguments to prototype * libc/stdlib/local.h (__locale_charset): Ditto.
* 2009-06-16 Craig Howland <howland@LGSInnovations.com>Jeff Johnston2009-06-161-15/+11
| | | | | | | * libc/include/math.h: Simplify fpclassify, isinf, isnan, and signbit macros to remove un-necessary extension use. isinf and isnan also changed to use fpclassify. isfinite macro modified to run faster by only calling fpclassify once instead of possibly twice.
* * libc/ctype/tolower.c (tolower): Cast conversion result fromCorinna Vinschen2009-06-092-2/+2
| | | | | mbtowc/wctomb to unsigned char to avoid negative return values. * libc/ctype/toupper.c (toupper): Ditto.
* * libc/string/wcwidth.c: Optimize for speed.Corinna Vinschen2009-06-033-4/+97
| | | | | | | | | | | * libc/locale/locale.c (lc_ctype_cjk_lang): New static int. (loadlocale): In case of setting LC_CTYPE, set lc_ctype_cjk_lang to 1 if the language is "jp", "ko", or "zh", to 0 otherwise. (__locale_cjk_lang): New function. * libc/string/local.h (__locale_cjk_lang): Declare. * libc/string/wcwidth.c: Fix comments. (__wcwidth): Handle CJK Ambiguous Width characters according to setting returned by __locale_cjk_lang.
* 2009-06-02 Richard Earnshaw <rearnsha@arm.com>Jeff Johnston2009-06-021-5/+0
| | | | | * libc/include/sys/config.h: Remove specification of _REENT_SMALL for thumb2.
* * libc/ctype/jp2uc.c: Skip all definition if defined __CYGWIN__.Corinna Vinschen2009-06-023-9/+12
| | | | | | (__jp2uc): Change the scope to static function. * libc/ctype/local.h (_jp2uc): Define as macro if defined __CYGWIN__. * libc/string/local.h (_jp2uc): Include ../ctype/local.h.
* 2009-05-27 Neal H. Walfield <neal@gnu.org>Jeff Johnston2009-05-271-1/+5
| | | | | * libc/include/machine/setjmp.h (sigjmp_buf): Size according to _JBTYPE and the size of sigset_t.
* 2009-05-15 Craig Howland <howland@LGSInnovations.com>Jeff Johnston2009-05-151-14/+40
| | | | | | | | | | | | | | | | | | * configure.in: Add configuration test for long double type existing and set flag _HAVE_LONG_DOUBLE if true. Fix INIT_ARRAY (.init_array) and _LDBL_EQ_DBL tests to not link so that will work with cross-compilers. * configure: Regenerated. * Makefile.in: Ditto. * newlib.hin: Add _HAVE_LONG_DOUBLE flag. * libc/include/math.h: Change non-builtin defines for HUGE_VAL, HUGE_VALF, and HUGE_VALL to be constant expressions. Add definitions for the non-builtin case for INFINITY and NAN. Gate HUGE_VALL and union __ldmath definitions with (new) _HAVE_LONG_DOUBLE. *libm/common/s_infconst.c: Change definitions to use values from float.h instead of non-so-portable integer forms. Mark as being deprecated (because now removed from math.h, are not used anywhere in Newlib, itself).
* * libc/string/local.h: New file.Corinna Vinschen2009-05-153-11/+251
| | | | | | | | | | | | | | | * libc/string/wcswidth.c (wcswidth): Convert japanese wide characters to Unicode here. Handle surrogate pairs for UTF-16 systems. Call __wcwidth rather than wcwidth. * libc/string/wcwidth.c: New implementation using Markus Kuhn's wcwidth implementation for Unicode. (bisearch): New static function. (__wcwidth): New function. Take wint_t rather than wchar_t as parameter to allow full Unicode handling on UTF-16 systems. Move old wcwidth implementation here for non-multibyte aware systems. (wcwidth): Convert japanese wide characters to Unicode here. Call __wcwidth rather than using iswprint/iswcntrl.
* * libc/ctype/local.h (JP_JIS, JP_SJIS, JP_EUCJP): Move definitionCorinna Vinschen2009-05-1410-61/+29
| | | | | | | | | | | | | | | | | to jp2uc.c. (__jp2uc): Remove declaration. (_jp2uc): Declare. * libc/ctype/jp2uc.c (JP_JIS, JP_SJIS, JP_EUCJP): Define. (__jp2uc): Remove Cygwin special case. (_jp2uc): New function. On Cygwin, just return c. * libc/ctype/iswalpha.c (iswalpha): Just call _jp2uc. * libc/ctype/iswblank.c (iswblank): Ditto. * libc/ctype/iswcntrl.c (iswcntrl): Ditto. * libc/ctype/iswprint.c (iswprint): Ditto. * libc/ctype/iswpunct.c (iswpunt): Ditto. * libc/ctype/iswspace.c (iswspace): Ditto. * libc/ctype/towlower.c (towlower): Ditto. * libc/ctype/towupper.c (towupper): Ditto.
* 2009-05-13 Paul Brook <paul@codesourcery.com>Jeff Johnston2009-05-131-2/+2
| | | | | * libc/machine/arm/setjmp.S: Don't bother saving IP. Copy SP to IP before saving. Likewise when restoring.
* 2009-05-13 Paul Brook <paul@codesourcery.com>Jeff Johnston2009-05-131-1/+50
| | | | * libc/machine/arm/setjmp.S: Add ARMv6-M implementation.
* * libc/locale/locale.c (setlocale): Don't build on Cygwin.Corinna Vinschen2009-05-131-1/+2
|
* Allow gcc warning for toupper even with extended charsets.Eric Blake2009-04-301-6/+17
| | | | | | | * libc/include/ctype.h (toupper, tolower) [_MB_EXTENDED_CHARSETS_ISO]: Allow gcc warning when called with 'char' even when we must call the function for correct behavior. [!_MB_EXTENDED_CHARSETS_ISO]: Fix regression in result type.
* 2009-04-24 Jeff johnston <jjohnstn@redhat.com>Jeff Johnston2009-04-249-0/+39
| | | | | | | | | | | | | | * libc/stdio/fgetc.c: Make sure sfp lock is acquired before the file lock and released before the file lock to avoid a deadlock scenario. * libc/stdio/fgets.c: Ditto. * libc/stdio/fgetwc.c: Ditto. * libc/stdio/fgetws.c: Ditto. * libc/stdio/fread.c: Ditto. * libc/stdio/fseek.c: Ditto. * libc/stdio/getc.c: Ditto. * libc/stdio/getdelim.c: Ditto. * libc/stdio/gets.c: Ditto.