summaryrefslogtreecommitdiffstats
path: root/newlib/libc
Commit message (Collapse)AuthorAgeFilesLines
* * libc/include/string.h (rawmemchr): Declare.Yaakov Selkowitz2013-06-244-2/+134
| | | | | | | * libc/string/Makefile.am (ELIX_4_SOURCES): Add rawmemchr.c. (CHEWOUT_FILES): Add rawmemchr.def. * libc/string/Makefile.in: Regenerate. * libc/string/rawmemchr.c: New file.
* * libc/reent/reent.c (_reclaim_reent): Free also _misc andCorinna Vinschen2013-06-241-0/+9
| | | | _signal_buf.
* * libc/include/sys/reent.h (_ATEXIT_INIT_PTR): Remove.Corinna Vinschen2013-06-241-36/+2
| | | | | (_REENT_INIT_ATEXIT_PTR): Remove. (_REENT_INIT_PTR): Reduce code size if _REENT_SMALL.
* strlen-armv7.S: Import latest strlen cortex-strings code.Will Newton2013-06-211-83/+113
| | | | | | | | | | | | | Import the latest version of strlen from the Linaro cortex-strings package. This version is faster across a variety of block size and alignments on ARMv7. newlib/ChangeLog: 2013-06-21 Will Newton <will.newton@linaro.org> * libc/machine/arm/strlen-armv7.S: Import latest strlen code from Linaro cortex-strings.
* * acconfig.h (_UNBUF_STREAM_OPT): Undefine.Corinna Vinschen2013-06-192-0/+8
| | | | | | | | | | | | | | | | | * newlib.hin (_UNBUF_STREAM_OPT): Undefine. * configure.in (--enable-newlib-unbuf-stream-opt): New option. * configure: Regenerate. * libc/stdio/vfprintf.c (_VFPRINTF_R): Don't do optimization on unbuffered stream files. * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Likewise. * README: Add description about the option. * newlib.hin (_UNBUF_STREAM_OPT): Undefine. * configure.in (--enable-newlib-unbuf-stream-opt): New option. * configure: Regenerate. * libc/stdio/vfprintf.c (_VFPRINTF_R): Don't do optimization on unbuffered stream files. * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Likewise. * README: Add description about the option.
* * libc/posix/readdir_r.c: Fix potential read past dirp->dd_buf.Corinna Vinschen2013-06-191-3/+5
|
* * libc/stdlib/gdtoa-gethex.c (__hexdig): Constify.Corinna Vinschen2013-06-105-83/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | (hexdig_init): Remove. (__hexdig_fun): New function. hexdig_init, added __hexdig_fun (gethex): Call __get_hexdig macro rather than hexdig. * libc/stdlib/gdtoa-hexnan.c (hexnan): Constify fpi argument. Call __get_hexdig macro rather than hexdig. * libc/stdlib/ldtoa.c: Throughout constify functions arguments where required by constifying the following arrays. (ezero): Constify. (eone): Constify. (ermsg): Constify. (etens): Constify. (emtens): Constify. (nan113): Constify. (nan64): Constify. (nan53): Constify. (nan24): Constify. * libc/stdlib/mprec.h (__get_hexdig): Define. (gethex): Constify args in declaration where appropriate. (hexnan): Ditto. (hexdig_init): Remove declaration. (__hexdig_fun): Declare. * libc/stdlib/strtod.c (fpi): Constify. (fpinan): Constify.
* * libc/include/cdefs.h (__has_extension): New define.Corinna Vinschen2013-06-072-0/+345
| | | | | | | (__has_feature): Likewise. (__has_include): Likewise. (__has_builtin): Likewise. * libc/include/stdatomic.h: New.
* * libc/machine/arm/strcmp.S: Use local labels.Corinna Vinschen2013-06-051-48/+48
|
* 2013-06-03 Joey Ye <joey.ye@arm.com>Richard Earnshaw2013-06-036-622/+989
| | | | | | | | | | | | * libc/machine/arm/Makefile.am (MEMCPY_DEP): New define. ($(lpfx)memcpy.o, $(lpfx)memcpy.obj): Depend on MEMCPY_DEP. * libc/machine/arm/Makefile.in: Regenerated. * newlib/libc/machine/arm/memcpy-stub.c: Exclude armv7-m/armv7e-m. * newlib/libc/machine/arm/memcpy-armv7m.S: New. * newlib/libc/machine/arm/memcpy.S: Replace with wrapper code. Old code moved to ... * newlib/libc/machine/arm/memcpy-armv7a.S: ... here. Remove redundant architecture check.
* 2013-05-30 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2013-05-303-52/+4
| | | | | | * libc/machine/powerpc/times.c: Moved to libgloss/rs6000. * libc/machine/powerpc/Makefile.am: Remove times.c. * libc/machine/powerpc/Makefile.in: Regenerated.
* * configure.in (--enable-newlib-nano-malloc): New option.Corinna Vinschen2013-05-295-70/+745
| | | | | | | | | | * configure: Regenerated. * libc/configure.in (--enable-newlib-nano-malloc): New option. * libc/configure: Regenerated. * libc/stdlib/Makefile.am (NEWLIB_NANO_MALLOC): Use. * libc/stdlib/Makefile.in: Regenerated. * libc/stdlib/nano-mallocr.c: New file, implementing nano version malloc family functions.
* * libc/macine/arm/strcpy.S: Explicitly set build attributes whenRichard Earnshaw2013-05-281-0/+7
| | | | building for thumb1 targets.
* * libc/ctype/isalnum.c: Correct domain of definition to SUSv4 wording.Corinna Vinschen2013-05-239-14/+17
| | | | | | | | | | | * libc/ctype/isalpha.c: Ditto. * libc/ctype/isblank.c: Ditto. * libc/ctype/iscntrl.c: Ditto. * libc/ctype/isdigit.c: Ditto. * libc/ctype/islower.c: Ditto. * libc/ctype/isprint.c: Ditto. * libc/ctype/ispunct.c: Ditto. * libc/ctype/isxdigit.c: Ditto.
* * libc/include/sys/cdefs.h (_Static_assert): Accommodate gcc >= 4.6.Corinna Vinschen2013-05-221-1/+3
|
* * libc/reent/reent.c (_wrapup_reent): Remove.Corinna Vinschen2013-05-161-33/+0
|
* [newlib]DJ Delorie2013-05-1311-0/+6292
| | | | | | | | | | | | | | | * configure.host (msp430): Add. * libc/include/machine/ieeefp.h: Add MSP430 support. * libc/include/machine/setjmp.h: Likewise. * libc/include/sys/config.h: Likewise. * libc/machine/configure.in (msp430): Add. * libc/machine/configure: Regenerate. * libc/machine/msp430: New directory. [libgloss] * configure.in (msp430*-*-elf): Add. * configure: Regenerate. * msp430: New directory.
* 2013-05-07 Sebastian Huber <sebastian.huber@embedded-brains.de>Jeff Johnston2013-05-085-8/+41
| | | | | | | | | | | | | | | * libc/include/sys/config.h (_REENT_GLOBAL_ATEXIT): Define for RTEMS. * libc/include/sys/reent.h (_reent): Use _REENT_GLOBAL_ATEXIT. (_global_atexit): Declare if _REENT_GLOBAL_ATEXIT is defined. * libc/reent/reent.c (_reclaim_reent): Remove atexit cleanup if _REENT_GLOBAL_ATEXIT is defined. (_wrapup_reent): Remove atexit handling if _REENT_GLOBAL_ATEXIT is defined. * libc/stdlib/__atexit.c (_global_atexit0): Define if _REENT_GLOBAL_ATEXIT is defined. * libc/stdlib/__call_atexit.c (_global_atexit): Define if _REENT_GLOBAL_ATEXIT is defined.
* 2013-05-07 Sebastian Huber <sebastian.huber@embedded-brains.de>Jeff Johnston2013-05-073-15/+31
| | | | | | | | | | | | * libc/include/sys/reent.h (_ATEXIT_INIT): Define. (_ATEXIT_INIT_PTR): Likewise. (_REENT_INIT_ATEXIT): Likewise. (_REENT_INIT_ATEXIT_PTR): Likewise. (_GLOBAL_ATEXIT): Likewise. * libc/stdlib/__atexit.c (_GLOBAL_ATEXIT0): Define. (__register_exitproc): Use _GLOBAL_ATEXIT and _GLOBAL_ATEXIT0. * libc/stdlib/__call_atexit.c (__call_exitprocs): Likewise. -
* 2013-05-07 Sebastian Huber <sebastian.huber@embedded-brains.de>Jeff Johnston2013-05-072-4/+5
| | | | | * libc/stdlib/__atexit.c (__atexit_lock): Declare. * libc/stdlib/__call_atexit.c (__atexit_lock): Define.
* 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>Jeff Johnston2013-05-0610-2/+6343
| | | | | | | | | | | | | | | | * configure.host (machine_dir, sys_dir, syscall_dir, newlib_cflags): Add settings for nios2*. * libc/include/machine/ieeefp.h (IEEE_BIG_ENDIAN, IEEE_LITTLE_ENDIAN): Likewise. * libc/include/machine/setjmp.h (JBLEN, JBTYPE): Likewise. * libc/machine/configure.in: Add nios2 subdir. * libc/machine/configure: Regenerated. * libc/machine/nios2/Makefile.am: New. * libc/machine/nios2/Makefile.in: New (autogenerated). * libc/machine/nios2/aclocal.m4: New (copied from mips version). * libc/machine/nios2/configure.in: New. * libc/machine/nios2/configure: New (autogenerated). * libc/machine/nios2/setjmp.s: New.
* 2013-04-29 Sebastian Huber <sebastian.huber@embedded-brains.de>Jeff Johnston2013-04-2936-117/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libc/stdio/local.h (CHECK_INIT): Evaluate argument only once. (CHECK_STD_INIT): Likewise. * libc/stdio/fgetc.c (fgetc): Use local variable for _REENT. * libc/stdio/fgetwc.c (fwgetc): Likewise. * libc/stdio/fgetws.c (fgetws): Likewise. * libc/stdio/fputc.c (fputc): Likewise. * libc/stdio/fputwc.c (fputwc): Likewise. * libc/stdio/fputws.c (fputws): Likewise. * libc/stdio/getc.c (getc): Likewise. * libc/stdio/getchar.c (_getchar_r): Likewise. * libc/stdio/putc.c (putc): Likewise. * libc/stdio/putchar.c (putchar): Likewise. * libc/stdio/scanf.c (scanf): Likewise. * libc/stdio/setvbuf.c (setvbuf): Likewise. * libc/stdio/ungetwc.c (ungetwc): Likewise. * libc/stdio/vfscanf.c (VFSCANF): Likewise. * libc/stdio/vfwscanf.c (VFWSCANF): Likewise. * libc/stdio/viprintf.c (viprintf): Likewise. * libc/stdio/viscanf.c (viscanf): Likewise. * libc/stdio/vprintf.c (vprintf): Likewise. * libc/stdio/vscanf.c (vscanf): Likewise. * libc/stdio/vwprintf.c (vwprintf): Likewise. * libc/stdio/vwscanf.c (vwscanf): Likewise. * libc/stdio/wscanf.c (wscanf): Likewise. * libc/stdlib/ecvtbuf.c (fcvtbuf): Likewise. (fcvtbuf): Likewise. (ecvtbuf): Likewise. (ecvtbuf): Likewise. * libc/stdlib/mblen.c (mblen): Likewise. * libc/stdlib/mbrlen.c (mbrlen): Likewise. * libc/stdlib/mbrtowc.c (mbrtowc): Likewise. * libc/stdlib/mbtowc.c (mbtowc): Likewise. * libc/stdlib/rand.c (srand): Likewise. (rand): Likewise. * libc/stdlib/wcrtomb.c (wcrtomb): Likewise. * libc/stdlib/wctob.c (wctob): Likewise. * libc/stdlib/wctomb.c (wctomb): Likewise. * libc/string/strtok.c (strtok): Likewise. * libc/time/asctime.c (asctime): Likewise. * libc/time/gmtime.c (gmtime): Likewise. * libc/time/lcltime.c (lcltime): Likewise.
* 2013-04-29 Sebastian Huber <sebastian.huber@embedded-brains.de>Jeff Johnston2013-04-291-47/+1
| | | | * libc/include/sys/reent.h (_REENT_INIT_PTR): Reduce code size.
* 2013-04-29 Freddie Chopin <freddie_chopin@op.pl>Jeff Johnston2013-04-291-2/+2
| | | | | | * libc/libc.texinfo: Fix @ references and change ifinfo to be ifnottexinfo. * libm/libm.texinfo: Ditto.
* 2013-04-25 Sebastian Huber <sebastian.huber@embedded-brains.de>Joel Sherrill2013-04-252-0/+14
| | | | | * libc/stdio/local.h (_STDIO_CLOSE_PER_REENT_STD_STREAMS): New define. * libc/stdio/findfp.c (_STDIO_CLOSE_PER_REENT_STD_STREAMS): Use define.
* * libc/stdlib/strtod.c: Manual update to latest algorithm from NetBSD.Corinna Vinschen2013-04-241-38/+117
|
* Port newlib to x86_64-pc-cygwin.Corinna Vinschen2013-04-235-19/+43
| | | | | | | | | | | * libc/include/sys/features.h: Redefine compilation environment definitions for Cygwin to cover 64 bit Cygwin. * libc/ctype/ctype_.c (_ctype_): Fix definition for 64 bit Cygwin. * libc/include/machine/setjmp.h: Change definition of _JBLEN to allow different values for 32 bit and 64 bit Cygwin. * libc/include/reent.h (stat64): Define as stat under Cygwin, instead of as __stat64. Undef stat64 if not building Newlib. * libc/include/sys/stat.h (stat64): Define as stat under Cygwin.
* * libc/include/sys/cdefs.h: Align with latest FreeBSD file header.Corinna Vinschen2013-04-222-48/+533
| | | | * libc/include/sys/features.h (__GNUC_PREREQ__): Define.
* * newlib/libc/search/hash.c: Revert patch from 2012-08-08.Corinna Vinschen2013-04-191-3/+3
|
* * libc/sys/rtems/sys/queue.h: Delete file.Corinna Vinschen2013-04-163-571/+285
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libc/include/sys/cdefs.h (__containerof): New define. (__DEQUALIFY): Likewise. * libc/include/sys/queue.h (TRACEBUF_INITIALIZER): Likewise. (TRACEBUF): Likewise. (LIST_FOREACH_SAFE): Likewise. (LIST_PREV): Likewise. (LIST_SWAP): Likewise. (QMD_LIST_CHECK_HEAD): Likewise. (QMD_LIST_CHECK_NEXT): Likewise. (QMD_LIST_CHECK_PREV): Likewise. (QMD_SAVELINK): Likewise. (QMD_TAILQ_CHECK_HEAD): Likewise. (QMD_TAILQ_CHECK_NEXT): Likewise. (QMD_TAILQ_CHECK_PREV): Likewise. (QMD_TAILQ_CHECK_TAIL): Likewise. (QMD_TRACE_ELEM): Likewise. (QMD_TRACE_HEAD): Likewise. (SLIST_FOREACH_PREVPTR): Likewise. (SLIST_FOREACH_SAFE): Likewise. (SLIST_REMOVE_AFTER): Likewise. (SLIST_SWAP): Likewise. (STAILQ_FOREACH_SAFE): Likewise. (STAILQ_REMOVE_AFTER): Likewise. (STAILQ_SWAP): Likewise. (TAILQ_FOREACH_REVERSE_SAFE): Likewise. (TAILQ_FOREACH_SAFE): Likewise. (TAILQ_SWAP): Likewise. (TRASHIT): Likewise. (SLIST_REMOVE): Use SLIST_REMOVE_AFTER(). (STAILQ_LAST): Use __containerof(). (STAILQ_REMOVE): Use STAILQ_REMOVE_AFTER().
* 2013-04-12 Will Newton <will.newton@linaro.org>Jeff Johnston2013-04-122-402/+604
| | | | | | | * libc/machine/arm/memcpy-stub.c: Use generic memcpy if unaligned access is not enabled. * libc/machine/arm/memcpy.S: Faster memcpy implementation for Cortex A15 cores using NEON and VFP if available.
* * acconfig.h (_WCHAR_ORIENT): UndefCorinna Vinschen2013-04-126-133/+227
| | | | | | | | | | | | | | * newlib.hin (_WCHAR_ORIENT): Undef * configure.in (--enable-newlib-wchar-orient): New option. * configure: Regenerated. * libc/configure.in (--enable-newlib-wchar-orient): New option. * libc/configure: Regenerated. * libc/stdio/Makefile.am (NEWLIB_WIDE_ORIENT): Use. * libc/stdio/Makefile.in: Regenerated. * libc/stdio/local.h (ORIENT): Use _WCHAR_ORIENT to control the definition. Add alternative definition. * libc/stdio/vfprintf.c (__sfputs_r, __sprint_r): Use _WCHAR_ORIENT to control the wide char output.
* Revert to original patchCorinna Vinschen2013-04-111-4/+4
|
* * libc/include/stdlib.h (strtof, strtoll, strtoull, strtold): AlsoCorinna Vinschen2013-04-111-4/+4
| | | | prototype if C++11 or later.
* 2013-04-10 Bin Cheng <bin.cheng@arm.com>Jeff Johnston2013-04-104-0/+14
| | | | | | | | | | | | * acconfig.h (_FSEEK_OPTIMIZATION): Undef * newlib.hin (_FSEEK_OPTIMIZATION): Undef * configure.in (--disable-newlib-fseek-optimization): New option. * configure: Regenerated. * libc/stdio/fflush.c (__sflush_r): Use _FSEEK_OPTIMIZATION to control fseek optimization. * libc/stdio/fseeko.c (_fseeko_r): Ditto. * libc/stdio/makebuf.c (__smakebuf_r): Ditto. * libc/stdio64/fseeko64.c (_fseeko64_r): Ditto.
* * libc/stdio/vfieeefp.h (ldieee): Fix typo.Matthew Gretton-Dann2013-04-081-1/+1
|
* * libc/posix/scandir.c (DIRSIZ): Use offsetof instead of magicCorinna Vinschen2013-04-021-2/+3
| | | | number.
* * acconfig.h (_FVWRITE_IN_STREAMIO): Undefine.Corinna Vinschen2013-03-276-10/+293
| | | | | | | | | | | | | | | | * newlib.hin (_FVWRITE_IN_STREAMIO): Undefine. * configure.in (--disable-newlib-fvwrite-in-streamio): New option. * configure: Regenerated. * libc/stdio/fputs.c (_fputs_r): Use _FVWRITE_IN_STREAMIO to control __sfvwrite_r. Add alternative implementation. * libc/stdio/fputws.c (_fputws_r): Ditto. * libc/stdio/fwrite.c (_fwrite_r): Ditto. * libc/stdio/puts.c (_puts_r): Ditto. * libc/stdio/vfprintf.c (__ssputs_r, __sfputs_r): New function. (_VFPRINTF_R): Use _FVWRITE_IN_STREAMIO to control vector buffer. (__SPRINT): Use _FVWRITE_IN_STREAMIO to control macro definition. * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Use _FVWRITE_IN_STREAMIO to control vector buffer.
* 2013-03-26 Sebastian Huber <sebastian.huber@embedded-brains.de>Joel Sherrill2013-03-264-12/+17
| | | | | | | | | * libc/stdio/local.h (_STDIO_WITH_THREAD_CANCELLATION_SUPPORT): New define. * libc/stdio/fclose.c: Use _STDIO_WITH_THREAD_CANCELLATION_SUPPORT. * libc/stdio/freopen.c: Likewise. * libc/stdio64/freopen64.c: Likewise.
* * newlib/libc/stdio/findfp.c (glue_with_file): New.Corinna Vinschen2013-03-151-9/+13
| | | | (__sfmoreglue): Use glue_with_file to avoid alignment problems.
* * libc/include/machine/setjmp.h (sigjmp_buf): Fix definition ofCorinna Vinschen2013-02-281-1/+2
| | | | sigjmp_buf size if _JBTYPE is defined.
* * libc/include/malloc.h (struct mallinfo): Convert type of all membersCorinna Vinschen2013-02-261-10/+10
| | | | to size_t to match all targets.
* * libc/include/sys/_types.h (_ssize_t): Define as signed equivalent ofCorinna Vinschen2013-02-211-0/+9
| | | | size_t with GCC.
* * libc/machine/mips/memcpy.S: Fix USE_PREFETCH check.Corinna Vinschen2013-02-191-2/+5
|
* * crt0.S: Add recognition of the e3v5 architecture variant.Nick Clifton2013-02-011-2/+2
|
* 2013-01-22 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2013-01-221-1/+8
| | | | | * libc/include/pthread.h: Add PTHREAD_RWLOCK_INITIALIZER. Fix typo on PTHREAD_COJND_INITIALIZER.
* 2013-01-17 Marcus Shawcroft <marcus.shawcroft@linaro.org>Marcus Shawcroft2013-01-171-12/+19
| | | | | | * libc/machine/aarch64/strncmp.S: Correct arithmetic for argument N values close to the maximum representable value in an unsigned 64 bit value.
* 2013-01-17 Marcus Shawcroft <marcus.shawcroft@linaro.org>Marcus Shawcroft2013-01-171-11/+28
| | | | | | * libc/machine/aarch64/strnlen.S: Correct arithmetic for argument N values close to the maximum representable value in an unsigned 64 bit value.
* * libc/sys/sysnecv850/crt0.S (_start): Enable FPU for theNick Clifton2013-01-151-0/+12
| | | | | V850e2v3. * v850/crt0.S (_start): Enable FPU for the V850e2v3.
* * libc/include/string.h: Fix preprocessor expressions usingCorinna Vinschen2013-01-121-2/+2
| | | | _XOPEN_SOURCE.