summaryrefslogtreecommitdiffstats
path: root/newlib/libc
Commit message (Collapse)AuthorAgeFilesLines
* * libm/libm.texinfo: Rename node Index to Document Index.Corinna Vinschen2013-11-081-3/+3
| | | | * libc/libc.texinfo: Rename node Library Index to Document Index.
* * libc/stdio/fvwrite.c: Allow writing in larger chunks for fullyCorinna Vinschen2013-11-041-15/+12
| | | | buffered and unbuffered files, to improve write performance.
* * libc/stdio/fvwrite.h: change type of uio_resid from int to size_t toCorinna Vinschen2013-10-311-1/+1
| | | | fix fwrite() of > 2GByte buffers.
* Implement malloc_stats for nano.Corinna Vinschen2013-10-301-34/+80
| | | | | | | | | | | | * libc/stdlib/nano-mallocr.c (RONECALL): New parameter macro. (sbrk_start): New variable. (current_mallinfo, free_list): Forward declaration of data. (chunk): Define size as long type. (mallinfo): Synchronize with latest malloc.h. (nano_*): Forward declaration of functions. (get_chunk_from_ptr): Defined to static inline. (nano_mallinfo): Implement this function. (nano_malloc_stats): Implement this function.
* * libc/include/machine/_default_types.h: Revert change from 2013-10-10.Corinna Vinschen2013-10-301-18/+92
|
* * libc/include/stdio.h [!__LARGE64_FILES] (funopen): Fix typoHans-Peter Nilsson2013-10-241-1/+1
| | | | in last change.
* * libc/include/stdio.h (funopen): Change prototype ofCorinna Vinschen2013-10-2312-37/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __readfn and __writefn parameter to match new definition of FILE's _read and _write methods. (_funopen_r): Ditto. (funopen): Ditto. (_funopen_r): Ditto. * libc/include/sys/config.h (_READ_WRITE_BUFSIZE_TYPE) Define as type int if not already defined. Add comment to explain. * libc/include/sys/reent.h: Include stddef.h. (struct __sFILE): Change type of last parameter in declaration of _read and _write methods to _READ_WRITE_BUFSIZE_TYPE. (struct __sFILE64): Ditto. * libc/stdio/local.h (__sread): Declare with last parameter set to _READ_WRITE_BUFSIZE_TYPE. (__seofread): Ditto. (__swrite): Ditto. (__swrite64): Ditto. * libc/stdio/fvwrite.c (__sfvwrite_r): Change type of local variables w and s to _READ_WRITE_RETURN_TYPE. * libc/stdio/fflush.c (__sflush_r): Change type of local variables n and t to _READ_WRITE_BUFSIZE_TYPE and _READ_WRITE_RETURN_TYPE. Add local variables flags to keep _flags value. * libc/stdio/fmemopen.c (fmemreader): Align to above change. (fmemwriter): Ditto. * libc/stdio/fopencookie.c (fcreader): Ditto. (fcwriter): Ditto. * libc/stdio/funopen.c (funread): Ditto. (funwrite): Ditto. (funreader): Ditto. (funwriter): Ditto. * libc/stdio/open_memstream.c (memwriter): Ditto. * libc/stdio/stdio.c (__sread): Ditto. (__seofread): Ditto. (__swrite): Ditto. * libc/stdio64/stdio64.c (__swrite64): Ditto.
* * libc/include/sys/unistd.h (MAXPATHLEN): Delete.Corinna Vinschen2013-10-184-6/+4
| | | | | | * libc/include/sys/param.h (MAXPATHLEN): Define. * libc/sys/rtems/sys/param.h (MAXPATHLEN): Likewise. * libc/unix/getcwd.c: Include <sys/param.h> for MAXPATHLEN.
* 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>Joel Sherrill2013-10-151-23/+33
| | | | | * libc/libc/sys/rtems/sys/param.h: Update some parameters to the latest FreeBSD values.
* 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>Joel Sherrill2013-10-151-0/+3
| | | | * libc/sys/rtems/machine/_types.h (_HAVE_SYSTYPES): Define.
* 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>Joel Sherrill2013-10-153-5/+4
| | | | | | | * libc/sys/rtems/machine/_types.h (__dev_t): Define. (__dev_t_defined) Likewise. * libc/include/sys/_types.h (__dev_t): Delete RTEMS specific definition.
* 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>Joel Sherrill2013-10-151-26/+0
| | | | | * libc/sys/rtems/machine/_types.h (_ssize_t): Delete. (__ssize_t_defined) Likewise.
* 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>Joel Sherrill2013-10-151-92/+18
| | | | | | | | | | | | | | | | | | * libc/include/machine/_default_types.h (__int8_t): Define via <stdint.h> provided type. (__uint8_t): Likewise. (__int8_least_t): Likewise. (__uint8_least_t): Likewise. (__int16_t): Likewise. (__uint16_t): Likewise. (__int16_least_t): Likewise. (__uint16_least_t): Likewise. (__int32_t): Likewise. (__uint32_t): Likewise. (__int32_least_t): Likewise. (__uint32_least_t): Likewise. (__int64_t): Likewise. (__uint64_t): Likewise.
* 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>Joel Sherrill2013-10-151-0/+2
| | | | | * libc/include/paths.h (_PATH_DEVNULL): Define. (_PATH_DEVZERO): Likewise.
* 2013-10-03 Steve Ellcey <sellcey@mips.com>Steve Ellcey2013-10-034-150/+387
| | | | | | | * libc/machine/mips/memset.c: Remove. * libc/machine/mips/memset.S: New. * libc/machine/mips/Makefile.am: Change memset.c to memset.S * libc/machine/mips/Makefile.in: Regenerate.
* 2013-10-01 Petr Hosek <phosek@chromium.org>Jeff Johnston2013-10-014-4/+708
| | | | | | | | | * configure.host: Disable new posix_spawn function for all users of posix dir except Cygwin. * libc/posix/Makefile.am: Add support for new posix_spawn function. * libc/posix/Makefile.in: Regenerate. * libc/posix/posix_spawn.c: New file. * libc/include/spawn.h: Ditto.
* 2013-09-13 Joey Ye <joey.ye@arm.com>Jeff Johnston2013-09-131-2/+2
| | | | | * libc/stdlib/nano-mallocr.c (nano_allopt): Typo fixed to ... (nano_mallopt): ... this.
* 2013-09-12 Sebastian Huber <sebastian.huber@embedded-brains.de>Jeff Johnston2013-09-122-80/+199
| | | | | | * libc/include/sys/cdefs.h: Synchronize with latest FreeBSD version. * libc/include/stdatomic.h: Likewise.
* * libc/include/search.h (__compar_fn_t): Add typedef.Yaakov Selkowitz2013-09-082-5/+15
| | | | | | (tdelete, tfind, tsearch): Use it. * libc/include/stdlib.h (__compar_fn_t): Add typedef. (bsearch, qsort): Use it.
* * libc/stdlib/__atexit.c (__register_exitproc): NULL-ifyCorinna Vinschen2013-08-191-0/+2
| | | | | _on_exit_args_ptr when creating a new _atexit structure while _REENT_SMALL is defined.
* * libc/configure.in (--enable-newlib-wchar-orient): Remove.Corinna Vinschen2013-08-124-221/+133
| | | | | | * libc/configure: Regenerated. * libc/stdio/Makefile.am (NEWLIB_WIDE_ORIENT): Remove. * libc/stdio/Makefile.in: Regenerated.
* * libc/sys/arm/crt0.S: Remove 'start'.Corinna Vinschen2013-08-121-1/+0
|
* 2013-08-08 Freddie Chopin <freddie_chopin@op.pl>Joel Sherrill2013-08-081-1/+1
| | | | * libc/string/strncat.c: Fix typo in documentation.
* * libc/include/stdio_ext.h (__fbufsize): Define as inline function forCorinna Vinschen2013-08-021-0/+41
| | | | | | | | | | gcc, as macro otherwise. (__freading): Ditto. (__fwriting): Ditto. (__freadable): Ditto. (__fwriteable): Ditto. (__flbf): Ditto. (__fpending): Ditto.
* * libc/sys/linux/include/netdb.h, libc/sys/linux/net/getaddrinfo.c,Corinna Vinschen2013-07-2317-57/+67
| | | | | | | | | | | | | libc/sys/linux/net/getnameinfo.c: Add restrict keyword to getnameinfo() and getaddrinfo() to increase standards compliance and match glibc. * libc/include/string.h, libc/string/memccpy.c, libc/string/memcpy.c, libc/string/stpcpy.c, libc/string/stpncpy.c, libc/string/strcat.c, libc/string/strncat.c, libc/string/strncpy.c, libc/string/strtok.c, libc/string/strtok_r.c, libc/string/strxfrm.c libc/machine/microblaze/strcpy.c, libc/machine/xscale/memcpy.c, libc/machine/cris/memcpy.c: Add __restrict to prototype to increase standards compliance.
* * libc/sys/arm/syscalls.c (do_AngelSWI): Delete.Corinna Vinschen2013-07-193-37/+25
| | | | | * libc/sys/arm/libcfuncs.c (do_AngelSWI): Delete. * libc/sys/arm/swi.h: Copy over from libgloss.
* 2013-07-17 Janis Johnson <janisjo@codesourcery.com>Jeff Johnston2013-07-174-27/+159
| | | | | | | | * libc/machine/powerpc/configure.in: Remove extra_sources; fix extra_objs for powerpc*-*altivec. * libc/machine/powerpc/Makefile.am: Define EXTRA_lib_a_SOURCES. * libc/machine/powerpc/configure: Regenerated. * libc/machine/powerpc/Makefile.in: Regenerated.
* * configure.host: Change to microblaze*.Corinna Vinschen2013-07-165-12/+41
| | | | | | | | | | | | * libc/include/machine/ieeefp.h: Add __MICROBLAZEEL__. * libc/machine/microblaze/mb_endian.h: New file. * newlib/libc/machine/microblaze/strcmp.c: Add little endian support. * newlib/libc/machine/microblaze/strcpy.c: Likewise. * newlib/libc/machine/microblaze/strlen.c: Likewise. * configure.in: Change to microblaze*. * configure: Regenerate. * microblaze/xilinx.ld: Remove OUTPUT_FORMAT.
* 2013-07-09 Sabrina Ni <sabrina@andestech.com>Jeff Johnston2013-07-097-4/+413
| | | | | | | * libc/machine/nds32/Makefile.am (lib_a_SOURCES): Add abort.c, memcpy.S, memset.S, strcmp.S, and strcpy.S. * libc/machine/nds32/Makefile.in: Regenerated. * libc/machine/nds32/{abort.c, memcpy.S, memset.S, strcmp.S, strcpy.S}: New.
* 2013-07-09 Sabrina Ni <sabrina@andestech.com>Jeff Johnston2013-07-0910-2/+6338
| | | | | | | | | | | | | | | | * configure.host (machine_dir, syscall_dir, newlib_cflags): Add settings for nds32*. * libc/include/machine/ieeefp.h (IEEE_BIG_ENDIAN, IEEE_LITTLE_ENDIAN): Ditto. * libc/include/machine/setjmp.h (JBLEN): Ditto. * libc/machine/configure.in: Add nds32 subdir. * libc/machine/configure: Regenerated. * libc/machine/nds32/Makefile.am: New. * libc/machine/nds32/Makefile.in: New (autogenerated). * libc/machine/nds32/aclocal.m4: New (autogenerated). * libc/machine/nds32/configure.in: New. * libc/machine/nds32/configure: New (autogenerated). * libc/machine/nds32/setjmp.S: New.
* * libc/include/sys/config.h (__DYNAMIC_REENT__): Define for RTEMS.Corinna Vinschen2013-07-091-0/+1
|
* * libc/stdio/fwalk.c (_fwalk): Remove redundant test.Corinna Vinschen2013-07-091-5/+2
|
* * libc/include/sys/types.h (u_char): Add redefinition guard.Yaakov Selkowitz2013-07-051-0/+18
| | | | (u_short, u_int, u_long, caddr_t, daddr_t): Ditto.
* 2013-07-02 Joey Ye <joey.ye@arm.com>Jeff Johnston2013-07-023-3/+53
| | | | | | | | | | | | | | | | Lite exit support. * README: Add information about lite-exit. * acconfig.h (_LITE_EXIT): New macro. * configure.in (enable-lite-exit): New option. (_LITE_EXIT): Define new macro. * configure: Regenerated. * newlib.hin (_LITE_EXIT): New macro. * libc/stdlib/__atexit.c [_LITE_EXIT]: Add dummy explicit reference to __call_exitprocs. * libc/stdlib/cxa_atexit.c [_LITE_EXIT]: Make __register_exitproc a weak reference. * libc/stdlib/exit.c (exit)[_LITE_EXIT]: Remove TWS and weakly reference __call_exitprocs.
* 2013-07-02 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2013-07-021-1/+1
| | | | * libc/include/sys/reent.h: Fix typo in comment.
* memcpy-armv7a.S: Improve performance with misaligned buffers.Will Newton2013-07-011-2/+2
| | | | | | | | | | Adjust the conditions for entering the aligned copy loop to improve performance on mutually misaligned buffer copies. 2013-07-01 Will Newton <will.newton@linaro.org> * libc/machine/arm/memcpy-armv7a.S: Adjust entry to aligned loop to improve misaligned copy performance.
* 2013-06-26 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2013-06-263-15/+0
| | | | | | | | * libc/include/stdio.h: Specify std streams always in terms of _REENT. * libc/include/wchar.h: Ditto. * libc/include/sys/reent.h: Remove _RENT_ONLY check around setting of _REENT macro.
* * 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.