summaryrefslogtreecommitdiffstats
path: root/newlib/libc
Commit message (Collapse)AuthorAgeFilesLines
* * 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.
* newlib:Nick Clifton2009-10-2622-55/+6680
| | | | | | | | | | | | | | | | * configure.host: Add support for RX architecture. * libc/include/machine/ieeefp.h: Likewise. * libc/include/machine/setjmp.h: Likewise. * libc/include/machine/configure.in: Likewise. * libc/include/machine/configure: Regenerate. * libc/machine/rx: New directory. * libc/machine/rx/*: New files to support RX architecture. libgloss: * configure.in: Add support for RX sub-directory. * configure: Regenerate. * rx: New directory. * rx/*: New files to support RX architecture.
* Fix isalpha(0x100000001LL) and friends on 64-bit machines.Eric Blake2009-10-241-13/+21
| | | | | | | * libc/include/ctype.h (__ctype_lookup): New macro. (isalpha, isupper, islower, isdigit, isxdigit, isspace, ispunct) (isalnum, isprint, isgraph, iscntrl, isblank): Use it to fix bug on 64-bit machines.
* 2009-10-20 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-10-20232-156733/+232419
| | | | | | | | | | | | | | | | | | | | | | | | | * configure.host: Don't set -O2 flag in newlib_cflags. Leave that to CFLAGS. * acinclude.m4: Don't reset CFLAGS before calling _AC_PROG_CC_G as it sets the same flags as we are using. * aclocal.m4: Regenerated. * configure: Ditto. * Makefile.in: Ditto. * iconvdata/aclocal.m4: Ditto. * iconvdata/configure: Ditto. * iconvdata/Makefile.in: Ditto. * doc/aclocal.m4: Ditto. * doc/configure: Ditto. * doc/Makefile.in: Ditto. * libc/aclocal.m4: Ditto. * libc/configure: Ditto. * libc/Makefile.in: Ditto. * libc/*Makefile.in: Ditto. * libc/*aclocal.m4: Ditto. * libc/*configure: Ditto. * libm/*Makefile.in: Ditto. * libm/*aclocal.m4: Ditto. * libm/*configure: Ditto.
* 2009-10-16 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-10-202-1/+6
| | | | | | | * libc/include/sys/config.h[__CYGWIN__]: Set __USE_XOPEN2K flag if not __STRICT_ANSI__ or stdc version C99 or greater. * libc/include/stdio.h[__STRICT_ANSI__]: Add __USE_XOPEN2K check for fseeko and ftello prototypes.
* * libc/include/wchar.h (struct tm0: Declare as incomplete type.Corinna Vinschen2009-10-151-0/+4
|
* * libc/locale/nl_langinfo.c (nl_langinfo): Add Cygwin-specific temporaryCorinna Vinschen2009-10-151-0/+6
| | | | exception for KOI8 charsets.
* * libc/include/sys/unistd.h: Add _PC*, _CS*, and _SC* constantsEric Blake2009-10-141-35/+65
| | | | new to POSIX 2008.
* 2009-10-13 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>Jeff Johnston2009-10-131-9/+3
| | | | | | * libc/include/sys/signal.h: Include <sys/types.h> always. [__CYGWIN__, __rtems__]: Define kill first argument as pid_t per standards.
* 2009-10-09 Dave Korn <dave.korn@artimi.com>Jeff Johnston2009-10-091-0/+1
| | | | | * libc/include/sys/time.h (_TIMEVAL_DEFINED): Define when defining struct timeval.
* * libc/locale/locale.c (DEFAULT_LOCALE): New define.Corinna Vinschen2009-10-091-2/+14
| | | | | (__default_locale): New global variable set to the default locale. (__get_locale_env): Return __default_locale rather than fixed "C".
* 2009-10-08 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2009-10-081-0/+2
| | | | | | * configure.host: For RTEMS, define HAVE_ASSERT_FUNC. * libc/stdlib/assert.c (_assert_func): Do not specify __assert_func if HAVE_ASSERT_FUNC flag is set.
* 2009-10-08 Eric Blake <ebb9@byu.net>Jeff Johnston2009-10-081-0/+2
| | | | | | * libc/include/getopt.h (__getopt_r, __getopt_long_r) (__getopt_long_only_r): Protect declarations, to avoid compiler warning.
* * libc/locale/nl_langinfo.c (nl_langinfo): Just return current localeCorinna Vinschen2009-10-071-0/+8
| | | | charset on Cygwin.
* * libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Allow CESU-8 surrogateCorinna Vinschen2009-10-032-38/+35
| | | | | | value encoding. * libc/stdlib/wctomb_r.c (__utf8_mbtowc): Allow CESU-8 surrogate value decoding.
* * libc/locale/locale.c (loadlocale): Allow "C." same as "C-" as localeCorinna Vinschen2009-09-291-2/+13
| | | | prefix. Add some words to documentation.
* * libc/stdlib/sb_charsets.c: Throughout, translate undefinedCorinna Vinschen2009-09-291-78/+78
| | | | characters to their corresponding Windows Unicode value.
* 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.