Commit Graph

2025 Commits

Author SHA1 Message Date
Joel Sherrill 40c63f3ec0 Formatting. 2013-10-15 17:33:47 +00:00
Jeff Johnston d8914394e3 2013-10-09 Marcus Shawcroft <marcus.shawcroft@arm.com>
* testsuite/newlib.wctype/twctype.c (main): Update
        iswprint(0xce2) test case.
2013-10-09 18:56:52 +00:00
Steve Ellcey e828abfaea 2013-10-03 Steve Ellcey <sellcey@mips.com>
* 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-03 21:51:52 +00:00
Jeff Johnston c7c1a1ca1b 2013-10-01 Petr Hosek <phosek@chromium.org>
* 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-10-01 18:08:46 +00:00
Jeff Johnston 00fd23d50f 2013-09-13 Joey Ye <joey.ye@arm.com>
* libc/stdlib/nano-mallocr.c (nano_allopt): Typo fixed to ...
	(nano_mallopt): ... this.
2013-09-13 16:51:48 +00:00
Jeff Johnston 44d6d53977 2013-09-12 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/include/sys/cdefs.h: Synchronize with latest FreeBSD
        version.
        * libc/include/stdatomic.h: Likewise.
2013-09-12 22:05:43 +00:00
Yaakov Selkowitz 45070312d4 * libc/include/search.h (__compar_fn_t): Add typedef.
(tdelete, tfind, tsearch): Use it.
* libc/include/stdlib.h (__compar_fn_t): Add typedef.
(bsearch, qsort): Use it.
2013-09-08 07:11:33 +00:00
Corinna Vinschen cbd871ad41 * libc/stdlib/__atexit.c (__register_exitproc): NULL-ify
_on_exit_args_ptr when creating a new _atexit structure while
	_REENT_SMALL is defined.
2013-08-19 09:03:42 +00:00
Corinna Vinschen 56d5fc7cda * libc/configure.in (--enable-newlib-wchar-orient): Remove.
* libc/configure: Regenerated.
	* libc/stdio/Makefile.am (NEWLIB_WIDE_ORIENT): Remove.
	* libc/stdio/Makefile.in: Regenerated.
2013-08-12 11:31:53 +00:00
Corinna Vinschen 454b880298 * libc/sys/arm/crt0.S: Remove 'start'. 2013-08-12 11:28:28 +00:00
Joel Sherrill c8c245c2d4 2013-08-08 Freddie Chopin <freddie_chopin@op.pl>
* libc/string/strncat.c: Fix typo in documentation.
2013-08-08 15:17:09 +00:00
Corinna Vinschen f34670b338 * libc/include/stdio_ext.h (__fbufsize): Define as inline function for
gcc, as macro otherwise.
	(__freading): Ditto.
	(__fwriting): Ditto.
	(__freadable): Ditto.
	(__fwriteable): Ditto.
	(__flbf): Ditto.
	(__fpending): Ditto.
2013-08-02 07:52:09 +00:00
Corinna Vinschen b143d094ee * libc/sys/linux/include/netdb.h, libc/sys/linux/net/getaddrinfo.c,
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.
2013-07-23 07:05:31 +00:00
Corinna Vinschen 320a1e7412 * libc/sys/arm/syscalls.c (do_AngelSWI): Delete.
* libc/sys/arm/libcfuncs.c (do_AngelSWI): Delete.
	* libc/sys/arm/swi.h: Copy over from libgloss.
2013-07-19 09:57:51 +00:00
Jeff Johnston d1b5846f29 2013-07-17 Janis Johnson <janisjo@codesourcery.com>
* 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.
2013-07-17 16:38:04 +00:00
Corinna Vinschen 6041792ec6 * configure.host: Change to microblaze*.
* 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-16 07:48:53 +00:00
Jeff Johnston f9a17f68c4 2013-07-09 Sabrina Ni <sabrina@andestech.com>
* 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 19:19:35 +00:00
Jeff Johnston dc0cb474bb 2013-07-09 Sabrina Ni <sabrina@andestech.com>
* 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.
2013-07-09 19:06:47 +00:00
Corinna Vinschen 9b51cd8c6b * libc/include/sys/config.h (__DYNAMIC_REENT__): Define for RTEMS. 2013-07-09 13:14:31 +00:00
Corinna Vinschen 5dad9defd0 * libc/stdio/fwalk.c (_fwalk): Remove redundant test. 2013-07-09 13:07:16 +00:00
Yaakov Selkowitz ddbe02c418 * libc/include/sys/types.h (u_char): Add redefinition guard.
(u_short, u_int, u_long, caddr_t, daddr_t): Ditto.
2013-07-05 21:46:10 +00:00
Jeff Johnston e2ac49d3d7 2013-07-02 Joey Ye <joey.ye@arm.com>
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 21:30:57 +00:00
Jeff Johnston a838011d07 2013-07-02 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/reent.h: Fix typo in comment.
2013-07-02 19:26:20 +00:00
Will Newton 5073668c61 memcpy-armv7a.S: Improve performance with misaligned buffers.
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-07-01 09:58:34 +00:00
Jeff Johnston 27ad840ea5 2013-06-26 Jeff Johnston <jjohnstn@redhat.com>
* 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.
2013-06-26 21:34:16 +00:00
Yaakov Selkowitz e3928ce48c * libc/include/string.h (rawmemchr): Declare.
* 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.
2013-06-24 15:11:24 +00:00
Corinna Vinschen 837a83bf1c * libc/reent/reent.c (_reclaim_reent): Free also _misc and
_signal_buf.
2013-06-24 11:34:03 +00:00
Corinna Vinschen 99943e12c8 * libc/include/sys/reent.h (_ATEXIT_INIT_PTR): Remove.
(_REENT_INIT_ATEXIT_PTR): Remove.
	(_REENT_INIT_PTR): Reduce code size if _REENT_SMALL.
2013-06-24 09:28:32 +00:00
Will Newton c8af057907 strlen-armv7.S: Import latest strlen cortex-strings code.
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.
2013-06-21 09:10:37 +00:00
Will Newton a1a7a74e6b newlib/MAINTAINERS: Add myself to Write After Approval.
2013-06-21  Will Newton  <will.newton@linaro.org>

	* MAINTAINERS: Add Will Newton to Write After Approval.
2013-06-21 08:17:38 +00:00
Corinna Vinschen 25855a0139 Fix ChangeLog entry 2013-06-19 16:43:12 +00:00
Corinna Vinschen 82c19d335a * acconfig.h (_UNBUF_STREAM_OPT): Undefine.
* 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.
2013-06-19 15:58:50 +00:00
Corinna Vinschen 04f8f69cb7 * libc/posix/readdir_r.c: Fix potential read past dirp->dd_buf. 2013-06-19 15:54:20 +00:00
Corinna Vinschen 38f5296847 * README: Add description for NEWLIB's feature customizing
configuration options.
2013-06-13 11:43:44 +00:00
Corinna Vinschen e9c0122ec0 * libc/stdlib/gdtoa-gethex.c (__hexdig): Constify.
(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.
2013-06-10 15:27:43 +00:00
Corinna Vinschen 7eed26ae5b Fix typos 2013-06-07 14:21:53 +00:00
Corinna Vinschen af9f65e0c4 * libc/include/cdefs.h (__has_extension): New define.
(__has_feature): Likewise.
	(__has_include): Likewise.
	(__has_builtin): Likewise.
	* libc/include/stdatomic.h: New.
2013-06-07 09:14:39 +00:00
Corinna Vinschen 925e1c8157 * libc/machine/arm/strcmp.S: Use local labels. 2013-06-05 09:41:21 +00:00
Richard Earnshaw ca1dd3a9b5 2013-06-03 Joey Ye <joey.ye@arm.com>
* 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-06-03 14:02:10 +00:00
Jeff Johnston d15bce48e7 2013-05-30 Jeff Johnston <jjohnstn@redhat.com>
* libc/machine/powerpc/times.c: Moved to libgloss/rs6000.
        * libc/machine/powerpc/Makefile.am: Remove times.c.
        * libc/machine/powerpc/Makefile.in: Regenerated.
2013-05-30 22:44:41 +00:00
Corinna Vinschen a83263b981 * configure.in (--enable-newlib-nano-malloc): New option.
* 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.
2013-05-29 12:37:59 +00:00
Richard Earnshaw ef05ad03f2 * libc/macine/arm/strcpy.S: Explicitly set build attributes when
building for thumb1 targets.
2013-05-28 12:43:48 +00:00
Corinna Vinschen cc88e009ed * libc/ctype/isalnum.c: Correct domain of definition to SUSv4 wording.
* 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.
2013-05-23 14:46:51 +00:00
Corinna Vinschen 742fb38c56 * libc/include/sys/cdefs.h (_Static_assert): Accommodate gcc >= 4.6. 2013-05-22 17:53:07 +00:00
Corinna Vinschen 99e87649c7 * libc/reent/reent.c (_wrapup_reent): Remove. 2013-05-16 12:29:28 +00:00
DJ Delorie accd7a7cf7 Missed MAINTAINERS entry from previous commit. 2013-05-13 21:40:50 +00:00
DJ Delorie 2f2a304234 [newlib]
* 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-13 21:39:51 +00:00
Jeff Johnston c0d8520eeb 2013-05-10 Freddie Chopin <freddie_chopin@op.pl>
* configure.in: Fix help text for disable-newlib-atexit-dynamic-alloc option.
        * configure: Regenerated.
2013-05-10 20:14:33 +00:00
Jeff Johnston 1b7ad41e50 2013-05-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
* 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-08 23:13:51 +00:00
Jeff Johnston 6bd6954bdc 2013-05-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
* 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 21:40:10 +00:00
Jeff Johnston c0e447afd0 2013-05-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/stdlib/__atexit.c (__atexit_lock): Declare.
        * libc/stdlib/__call_atexit.c (__atexit_lock): Define.
2013-05-07 18:24:14 +00:00
Jeff Johnston c16862d85b 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
* 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-05-06 18:23:09 +00:00
Jeff Johnston b334e6660a 2013-04-29 Sebastian Huber <sebastian.huber@embedded-brains.de>
* 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 21:06:23 +00:00
Jeff Johnston 2a55aa79a9 2013-04-29 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/include/sys/reent.h (_REENT_INIT_PTR): Reduce code size.
2013-04-29 20:56:05 +00:00
Jeff Johnston 4b7586ff43 2013-04-29 Freddie Chopin <freddie_chopin@op.pl>
* libc/libc.texinfo: Fix @ references and change ifinfo to be
        ifnottexinfo.
        * libm/libm.texinfo: Ditto.
2013-04-29 20:02:34 +00:00
Joel Sherrill 7881a70fad 2013-04-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/stdio/local.h (_STDIO_CLOSE_PER_REENT_STD_STREAMS): New define.
	* libc/stdio/findfp.c (_STDIO_CLOSE_PER_REENT_STD_STREAMS): Use define.
2013-04-25 15:29:19 +00:00
Corinna Vinschen 6fb85adeac * libc/stdlib/strtod.c: Manual update to latest algorithm from NetBSD. 2013-04-24 10:21:16 +00:00
Corinna Vinschen 1875ee55d3 Port newlib to x86_64-pc-cygwin.
* 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.
2013-04-23 09:42:25 +00:00
Corinna Vinschen 9770af188f * libc/include/sys/cdefs.h: Align with latest FreeBSD file header.
* libc/include/sys/features.h (__GNUC_PREREQ__): Define.
2013-04-22 10:28:05 +00:00
Corinna Vinschen ffd672bec7 * newlib/libc/search/hash.c: Revert patch from 2012-08-08. 2013-04-19 09:13:27 +00:00
Corinna Vinschen 7eb805f68d * libc/sys/rtems/sys/queue.h: Delete file.
* 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-16 10:25:16 +00:00
Jeff Johnston 62f41c2b1c 2013-04-12 Will Newton <will.newton@linaro.org>
* 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.
2013-04-12 22:12:29 +00:00
Corinna Vinschen f7a4b388b0 * acconfig.h (_WCHAR_ORIENT): Undef
* 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.
2013-04-12 12:05:31 +00:00
Corinna Vinschen 9b7759ae75 * libc/include/stdlib.h (strtof, strtoll, strtoull, strtold): Also
prototype if C++11 or later.
2013-04-11 10:23:05 +00:00
Jeff Johnston 602cec7f1e 2013-04-10 Bin Cheng <bin.cheng@arm.com>
* 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.
2013-04-10 18:47:46 +00:00
Matthew Gretton-Dann d57416f03d * libc/stdio/vfieeefp.h (ldieee): Fix typo. 2013-04-08 09:34:35 +00:00
Corinna Vinschen 2e463c77de * libc/posix/scandir.c (DIRSIZ): Use offsetof instead of magic
number.
2013-04-02 11:38:12 +00:00
Corinna Vinschen 409c27f834 * acconfig.h (_FVWRITE_IN_STREAMIO): Undefine.
* 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-27 09:38:39 +00:00
Joel Sherrill 1ebc8da242 2013-03-26 Sebastian Huber <sebastian.huber@embedded-brains.de>
* 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.
2013-03-26 16:07:55 +00:00
Corinna Vinschen 01aff1ea37 * newlib/libc/stdio/findfp.c (glue_with_file): New.
(__sfmoreglue): Use glue_with_file to avoid alignment problems.
2013-03-15 13:19:29 +00:00
Corinna Vinschen 2d8f1ea62a * libc/include/machine/setjmp.h (sigjmp_buf): Fix definition of
sigjmp_buf size if _JBTYPE is defined.
2013-02-28 16:42:21 +00:00
Corinna Vinschen c2e3ff288d * libc/include/malloc.h (struct mallinfo): Convert type of all members
to size_t to match all targets.
2013-02-26 14:25:13 +00:00
Corinna Vinschen 7080b36417 * libc/include/sys/_types.h (_ssize_t): Define as signed equivalent of
size_t with GCC.
2013-02-21 12:27:11 +00:00
Corinna Vinschen aa102a6a57 * libc/machine/mips/memcpy.S: Fix USE_PREFETCH check. 2013-02-19 07:31:04 +00:00
Nick Clifton 92825fd954 * crt0.S: Add recognition of the e3v5 architecture variant. 2013-02-01 08:29:04 +00:00
Joel Sherrill 6c3f590cd9 2013-01-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/pthread.h: Add PTHREAD_RWLOCK_INITIALIZER.
	Fix typo on PTHREAD_COJND_INITIALIZER.
2013-01-22 21:20:08 +00:00
Marcus Shawcroft 450fe1bfa3 2013-01-17 Marcus Shawcroft <marcus.shawcroft@linaro.org>
* 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 14:53:32 +00:00
Marcus Shawcroft 78f66de6ce 2013-01-17 Marcus Shawcroft <marcus.shawcroft@linaro.org>
* libc/machine/aarch64/strnlen.S: Correct arithmetic for
	argument N values close to the maximum representable
	value in an unsigned 64 bit value.
2013-01-17 14:52:37 +00:00
Nick Clifton 7d88a8d373 * libc/sys/sysnecv850/crt0.S (_start): Enable FPU for the
V850e2v3.
	* v850/crt0.S (_start): Enable FPU for the V850e2v3.
2013-01-15 15:41:31 +00:00
Corinna Vinschen 38305196bf * libc/include/string.h: Fix preprocessor expressions using
_XOPEN_SOURCE.
2013-01-12 10:55:09 +00:00
Corinna Vinschen 3920a99a22 * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Add code to correctly handle
's' format specifier on not _MB_CAPABLE targets.  Fix a formatting
	glitch in _MB_CAPABLE enabled code.  Add a missing 'L' specifier.
2013-01-11 20:05:41 +00:00
Marcus Shawcroft 211f1ec717 2013-01-10 Marcus Shawcroft <marcus.shawcroft@linaro.org>
* libc/machine/aarch64/Makefile.am (lib_a_SOURCES): Add
        memcmp-stub.c and memcmp.S
        * libc/machine/aarch64/Makefile.in: Regenerated.
        * libc/machine/aarch64/memcmp-stub.c: New file.
        * libc/machine/aarch64/memcmp.S: New file.
2013-01-10 13:02:19 +00:00
Marcus Shawcroft ba8f05bcf5 2013-01-10 Marcus Shawcroft <marcus.shawcroft@linaro.org>
* libc/machine/aarch64/Makefile.am (lib_a_SOURCES): Add
        strnlen-stub.c and strnlen.S
        * libc/machine/aarch64/Makefile.in: Regenerated.
        * libc/machine/aarch64/strnlen-stub.c: New file.
        * libc/machine/aarch64/strnlen.S: New file.
2013-01-10 13:00:40 +00:00
Marcus Shawcroft 82c3d37d07 2013-01-10 Marcus Shawcroft <marcus.shawcroft@linaro.org>
* libc/machine/aarch64/Makefile.am (lib_a_SOURCES):
        Add strlen.S and strlen-stub.c.
        * libc/machine/aarch64/Makefile.in: Regenerated.
        * libc/machine/aarch64/strlen-stub.c: New file.
        * libc/machine/aarch64/strlen.S: New file.
2013-01-10 12:57:11 +00:00
Marcus Shawcroft a8907bda23 2013-01-10 Marcus Shawcroft <marcus.shawcroft@linaro.org>
* libc/machine/aarch64/Makefile.am (lib_a_SOURCES):
	Add memmove.S and memmove-stub.c.
	* libc/machine/aarch64/Makefile.in: Regenerated.
	* libc/machine/aarch64/memmove-stub.c: New file.
	* libc/machine/aarch64/memmove.S: New file.
2013-01-10 12:54:39 +00:00
Marcus Shawcroft 2edd103558 2013-01-10 Marcus Shawcroft <marcus.shawcroft@linaro.org>
* libc/machine/aarch64/Makefile.am (lib_a_SOURCES): Re-ordered.
	Add strncmp.S and strncmp-stub.c.
	* libc/machine/aarch64/Makefile.in: Regenerated.
	* libc/machine/aarch64/strncmp-stub.c: New file.
	* libc/machine/aarch64/strncmp.S: New file.
2013-01-10 12:51:13 +00:00
Jeff Johnston 2fadaa7a20 2013-01-08 Jeff Johnston <jjohnstn@redhat.com>
* MAINTAINERS: Add Richard Earnshaw as Arm co-maintainer
        and add Richard and Marcus Shawcroft as aarch64 maintainers.
2013-01-08 16:42:23 +00:00
Jeff Johnston a3f10f1384 2013-01-07 Steve Ellcey <sellcey@mips.com>
* libc/machine/mips/memcpy.S (memcpy): Check if _MIPS_SIM is set.
2013-01-07 21:29:39 +00:00
Jeff Johnston f2d223bd0f 2012-12-20 Jeff Johnston <jjohnstn@redhat.com>
* NEWS: Update with 2.0.0 info.
        * README: Ditto.
        * acinclude.m4: Change version number to 2.0.0.
        * aclocal.m4: Regenerated.
        * configure: Ditto.
        * Makefile.in: Regenerated.
        * doc/aclocal.m4: Ditto.
        * doc/configure: Ditto.
        * libc/*/aclocal.m4: Ditto.
        * libc/*/configure: Ditto.
        * libc/libc.texinfo: Ditto.
        * libm/*/aclocal.m4: Ditto.
        * libm/*/configure: Ditto.
        * libm/libm.texinfo: Ditto.
        * libc/sys/linux/shared.ld: Add VERS_2.0
2012-12-20 21:10:27 +00:00
Corinna Vinschen fb2b6cb868 * libc/stdlib/strtod.c (_strtod_r): Revert change from 2011-05-16. 2012-12-19 10:16:00 +00:00
Jeff Johnston 17ecab12a8 2012-12-18 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h: Remove the log2f macro.
2012-12-18 22:41:53 +00:00
Jeff Johnston b060af2264 2012-12-18 Craig Howland <howland@LGSInnovations.com>
* libc/include/math.h: Add recognition of values 1 and 2 for
        FLT_EVAL_METHOD.
2012-12-18 21:20:51 +00:00
Corinna Vinschen e3132dba59 * libc/stdio/puts.c (_puts_r): Fix typo in previous patch. Add local
variable fp for better readability.
2012-12-18 08:54:10 +00:00
Jeff Johnston 0a95d80385 2012-12-17 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/puts.c: Add fp locking and use _stdout_r macro
        to refer to the stream rather than stdout.
2012-12-17 22:44:09 +00:00
Jeff Johnston d7281d547f 2012-12-14 Yufeng Zhang <yufeng.zhang@arm.com>
* libc/machine/aarch64/machine/_types.h: New file; define _ssize_t
        as long.
2012-12-14 20:45:51 +00:00
Jeff Johnston a5149a541a 2012-12-11 Steve Ellcey <sellcey@mips.com>
* libc/machine/mips/memcpy.c: Remove.
	* libc/machine/mips/memcpy.S: New.
	* libc/machine/mips/Makefile.am (lib_a_CCASFLAGS): Add
	-D_COMPILING_NEWLIB.
	(lib_a_CFLAGS): Ditto.
2012-12-11 21:37:59 +00:00
Jeff Johnston 25e21cbc32 2012-12-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* configure.host: Define libm_machine_dir value for arm.
        * libm/machine/configure.in: Add arm to libm machines list.
        * libm/machine/configure: Regenerate.
        * libm/machine/arm/Makefile.am: New file.
        * libm/machine/arm/Makefile.in: Generated.
        * libm/machine/arm/aclocal.m4: Generated.
        * libm/machine/arm/configure: Generated.
        * libm/machine/arm/configure.in: New file.
        * libm/machine/arm/s_ceil.c: Likewise.
        * libm/machine/arm/s_floor.c: Likewise.
        * libm/machine/arm/s_nearbyint.c: Likewise.
        * libm/machine/arm/s_rint.c: Likewise.
        * libm/machine/arm/s_round.c: Likewise.
        * libm/machine/arm/s_trunc.c: Likewise.
        * libm/machine/arm/sf_ceil.c: Likewise.
        * libm/machine/arm/sf_floor.c: Likewise.
        * libm/machine/arm/sf_nearbyint.c: Likewise.
        * libm/machine/arm/sf_rint.c: Likewise.
        * libm/machine/arm/sf_round.c: Likewise.
        * libm/machine/arm/sf_trunc.c: Likewise.
2012-12-04 21:43:21 +00:00
Corinna Vinschen b8637f43b0 * libc/machine/arm/strcmp.S (compute_return_value): Fix return value.
* testsuite/newlib.string/strcmp-1.c (main): Add new test cases.
2012-11-30 09:31:38 +00:00
Corinna Vinschen 0772f3f1c1 * libc/include/sys/reent.h (__sFILE): Change type of _offset
from int to _off_t.
	* libc/stdio/ftell.c: Use _ftello_r().
	* libc/stdio/ftello.c: Copy implementation from previous
	_ftell_r().
	* libc/stdio/fseek.c: Use _fseeko_r().
	* libc/stdio/fseeko.c: Copy implementation from previous
	_fseek_r().
2012-11-29 16:28:30 +00:00
Corinna Vinschen 7b2d80eb87 * libc/include/inttypes.h: Add and use __INTTYPES_EXP(). 2012-11-26 16:26:06 +00:00
Corinna Vinschen 1cfd36169c * libm/machine/aarch64/configure.in: Change comment to say libm
instead of libc.
2012-11-23 10:48:13 +00:00
Steve Ellcey d3740f4856 2012-11-12 Steve Ellcey <sellcey@mips.com>
* libc/machine/mips/machine/asm.h: New.
	* libc/machine/mips/machine/regdef.h: Update register definitions
	for different ABI's.
2012-11-12 23:49:55 +00:00
Christopher Faylor 86fd769f37 * libc/include/sys/time.h: Avoid guarding other than timeval declaration with
_TIMEVAL_DEFINED.  Move timeval related macros under _TIMEVAL_DEFINED control.
2012-11-12 15:57:35 +00:00
Corinna Vinschen de1e3bb2c9 * libc/include/locale.h (NULL): Fetch definition via stddef.h.
* libc/include/stdio.h (NULL): Ditto.
	* libc/include/stdlib.h (NULL): Ditto.
	* libc/include/string.h (NULL): Ditto.
	* libc/include/wchar.h (NULL): Ditto.
	* libc/include/rpc/types.h (NULL): Ditto.
	* libc/include/time.h (NULL): Ditto.  Include stddef.h earlier.
2012-11-01 11:51:12 +00:00
Anthony Green ffa2dd6787 Minor optimization and bug fix for moxie. 2012-10-27 15:57:12 +00:00
Corinna Vinschen f9b3628010 * libc/include/sys/signal.h (sigset_t): Don't define when building
for Cygwin.
2012-10-26 09:23:46 +00:00
Jeff Johnston 6555743a4b 2012-10-24 Jeff Johnston <jjohnstn@redhat.com>
* configure.in: Comment out the --enable-newlib-fp-hw option
        as the mathfp library is inaccurate and should not be used.
        * Makefile.am: Add comment regarding the mathfp directory.
        * configure: Regenerated.
        * Makefile.in: Ditto.
        * libm/mathfp/README: New file that details why the mathfp
        directory is not used.
2012-10-24 21:01:39 +00:00
Corinna Vinschen 6f7ae529ad * libc/include/string.h (strdup, strndup): Declare if not
__STRICT_ANSI__ or _XOPEN_SOURCE is defined appropriately.
2012-10-22 15:16:48 +00:00
Corinna Vinschen e054398980 * libc/include/stdlib.h (strtof, strtoll, strtoull, strtold):Prototype
if not __STRICT_ANSI__ or stdc version C99 or greater.
2012-10-22 15:15:21 +00:00
Hans-Peter Nilsson 1ad660ece1 * libc/sys/mmixware/sbrk.c (_sbrk): Drop unused extern declaration
of "end".  Mark allocated memory by applying PRELD.
2012-10-21 03:41:42 +00:00
Corinna Vinschen 3595a9c789 * libc/stdlib/getopt.c (getopt_internal): Align handling of colon to
SUSv4 requirements.
	(__getopt_long_r): Fix formatting.
2012-10-16 19:11:48 +00:00
Corinna Vinschen 1772168778 * libc/stdio/vfprintf.c (__sbprintf): Fix comment. 2012-10-16 19:03:01 +00:00
Corinna Vinschen 25742157d7 * libc/include/assert.h (static_assert): Define. 2012-10-16 19:00:30 +00:00
Corinna Vinschen 5eceb3958e * libc/include/sys/features.h (__GNUC_PREREQ): Define. Use
throughout in place of explicit GNUC version checks.
	* libc/include/_ansi.h (_NOINLINE): Define.
	(_NOINLINE_STATIC): Define.
	* libc/stdio/vfprintf.c (__sbprintf): Define _NOINLINE_STATIC.
2012-10-16 18:45:24 +00:00
Corinna Vinschen 509212aa98 * libc/posix/wordfree.c (wordfree): The wrong words are freed
when WRDE_DOOFFS is in use. Restructure the code so that the memory
	needed to be freed is instead kept in an internal linked list...
	* libc/posix/wordexp2.h: ...as defined here...
	* libc/posix/wordexp.c (wordexp): ...and build this internal
	linked list here, avoiding wasteful strdup calls in the process.
2012-10-09 12:05:51 +00:00
Corinna Vinschen 277e7f0e2e * libc/posix/wordexp.c (wordexp): Return WRDE_NOSPACE on resource
allocation failure. Cleanup leftover resources when failing.
2012-10-09 09:26:15 +00:00
Corinna Vinschen 4a6ec9ec52 * libc/posix/wordexp.c (wordexp): Handle expanded words longer
than 500 bytes.
2012-10-09 09:20:46 +00:00
Corinna Vinschen ca8170a6c3 * libc/posix/wordexp.c (wordexp): Don't leak file streams. 2012-10-09 09:09:20 +00:00
DJ Delorie 2b74bec6c9 * libc/machine/rl78/setjmp.S: Convert from CPP macros to GAS
macros, to avoid dependence on the line separation character.

* rl78/crt0.S (_interrupt_vector_table): Convert from CPP macros
to GAS macros, to avoid dependence on the line separation
character.
2012-10-03 20:24:50 +00:00
DJ Delorie 13ab44c05b * libc/sys/sysnecv850/sbrk.c (_sbrk): Change heap_start to be an
array of undefined size, to avoid problems when compiled with
-msda=4.

* v850/sbrk.c (_sbrk): Change heap_start to be an array of
undefined size, to avoid problems when compiled with -msda=4.
2012-10-02 22:55:10 +00:00
Jeff Johnston 964f7c34d1 2012-10-01 Jeff Johnston <jjohnstn@redhat.com>
* README: replace sources.redhat.com with sourceware.org.
        * HOWTO: Ditto.
2012-10-01 21:57:54 +00:00
Jeff Johnston c3fe5bf771 2012-09-26 Ian Bolton <ian.bolton@arm.com>
Jim MacArthur  <jim.macarthur@arm.com>
        Marcus Shawcroft  <marcus.shawcroft@arm.com>
        Nigel Stephens  <nigel.stephens@arm.com>
        Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
        Richard Earnshaw  <rearnsha@arm.com>
        Sofiane Naci  <sofiane.naci@arm.com>
        Tejas Belagod  <tejas.belagod@arm.com>
        Yufeng Zhang  <yufeng.zhang@arm.com>

        * configure.host: Add AArch64.
        * libc/include/machine/ieeefp.h: Add AArch64.
        * libc/include/machine/setjmp.h: Add AArch64.
        * libc/include/machine/time.h: Add AArch64.
        * libc/include/sys/config.h: Add AArch64.
        * libc/machine/aarch64/Makefile.am: New file.
        * libc/machine/aarch64/Makefile.in: Generated.
        * libc/machine/aarch64/aclocal.m4: Generated.
        * libc/machine/aarch64/configure: Generated.
        * libc/machine/aarch64/configure.in: New file.
        * libc/machine/aarch64/setjmp.S: New file.
        * libc/machine/configure.in: Add AArch64.
        * libc/machine/configure: Re-generated.
        * libm/machine/aarch64/Makefile.am: New file.
        * libm/machine/aarch64/Makefile.in: Generated.
        * libm/machine/aarch64/aclocal.m4: Generated.
        * libm/machine/aarch64/configure: Generated.
        * libm/machine/aarch64/configure.in: New file.
        * libm/machine/aarch64/s_ceil.c: New file.
        * libm/machine/aarch64/s_floor.c: New file.
        * libm/machine/aarch64/s_fma.c: New file.
        * libm/machine/aarch64/s_fmax.c: New file.
        * libm/machine/aarch64/s_fmin.c: New file.
        * libm/machine/aarch64/s_llrint.c: New file.
        * libm/machine/aarch64/s_llround.c: New file.
        * libm/machine/aarch64/s_lrint.c: New file.
        * libm/machine/aarch64/s_lround.c: New file.
        * libm/machine/aarch64/s_nearbyint.c: New file.
        * libm/machine/aarch64/s_rint.c: New file.
        * libm/machine/aarch64/s_round.c: New file.
        * libm/machine/aarch64/s_trunc.c: New file.
        * libm/machine/aarch64/sf_ceil.c: New file.
        * libm/machine/aarch64/sf_floor.c: New file.
        * libm/machine/aarch64/sf_fma.c: New file.
        * libm/machine/aarch64/sf_fmax.c: New file.
        * libm/machine/aarch64/sf_fmin.c: New file.
        * libm/machine/aarch64/sf_llrint.c: New file.
        * libm/machine/aarch64/sf_llround.c: New file.
        * libm/machine/aarch64/sf_lrint.c: New file.
        * libm/machine/aarch64/sf_lround.c: New file.
        * libm/machine/aarch64/sf_nearbyint.c: New file.
        * libm/machine/aarch64/sf_rint.c: New file.
        * libm/machine/aarch64/sf_round.c: New file.
        * libm/machine/aarch64/sf_trunc.c: New file.
        * libm/machine/configure.in: Add AArch64.
        * libm/machine/configure: Re-generated.
2012-09-26 20:06:50 +00:00
Jeff Johnston e041a95837 2012-09-26 Michael Hope <michael.hope@linaro.org>
* doc/makedoc.c (dup_): Rename to avoid colliding with dup(2).
2012-09-26 19:11:41 +00:00
Anthony Green af32eb5e28 bi-endian support for moxie. 2012-09-13 23:57:33 +00:00
Christopher Faylor 918ed39f09 * libc/stdio/flags.c (__sflags): Guard against using O_BINARY on systems which
do not provide it.
2012-08-23 04:19:59 +00:00
Christopher Faylor 03f6bb2863 * libc/stdio/flags.c (__sflags): Rewrite recognition of extended mode flags to
just loop over more allowed flags.  Support glibc 'e' flag on systems defining
_GLIBC_EXTENSION.  Support C11 'x' flag.
2012-08-21 14:51:50 +00:00
Corinna Vinschen b2bde18ba5 * libc/stdlib/btowc.c (btowc): Cast to avoid compiler warning.
* libc/search/hash_buf.c (__get_buf): Initialize local vars to avoid
	compiler warning.
	* libc/stdio/fgets.c (_fgets_r): Ditto.
	* libc/time/strftime.c (strftime): Ditto.
2012-08-10 15:21:57 +00:00
Corinna Vinschen 6471beb3d4 Fix date 2012-08-10 11:49:19 +00:00
Corinna Vinschen c9ace3130c * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Fix guard around state to
allow usage in !FLOATING_POINT && _WANT_IO_C99_FORMATS case.
2012-08-10 09:37:32 +00:00
Corinna Vinschen 49264ad7dd * libc/posix/engine.c(dissect): Guard diagnostic pragma for right
versions of GCC only.
	* libc/string/strcasestr.c: Ditto.

	Fix typo in previous ChangeLog entry.
2012-08-08 14:05:54 +00:00
Corinna Vinschen 1f232abc89 Throughout, run newlib with -Wall -Werror option and fix bugs and
compiler warnings found this way.

	* libc/stdio/freopen.c (_freopen_r): Fix bug setting _flags.

	* libc/include/stdio.h (_rename): Define when building newlib.
	* libc/include/sys/signal.h (_kill): Ditto.
	* libc/include/sys/stat.h (_mkdir): Ditto.
	* libc/include/sys/time.h (_gettimeofday): Ditto.
	* libc/include/sys/times.h (_times): Ditto.
	* libc/include/sys/wait.h (_wait): Ditto.
	* libc/locale/lmessages.c (empty): Don't define for Cygwin.
	* libc/locale/lmonetary.c (cnv): Ditto.
	* libc/locale/nl_langinfo.c (nl_langinfo): Ditto for variable s.
	* libc/posix/collate.c: Throughout cast to avoid compiler warning.
	* libc/posix/engine.c (matcher): Initialize dp to avoid compiler
	warning.
	* libc/posix/glob.c: Disable on Cygwin.  Explain why.
	* libc/posix/regcomp.c: Fix "uninitialized" compiler warnings.
	(dissect): Deliberately silence gcc compiler warning.  Add comment to
	explain why.
	* libc/posix/wordexp.c (wordexp): Remove num_bytes variable since result
	is never used.
	* libc/posix/popen.c (popen): Ditto for variable last.
	* libc/reent/mkdirr.c: Include sys/stat.h.
	* libc/reent/renamer.c: Include stdio.h.
	* libc/search/hash.c:  Throughout use underscored variants of the stat
	function family.
	(init_hash): Add missing definition for the __USE_INTERNAL_STAT64 case.
	* libc/search/hash_bigkey.c (__big_insert): Add parenthesis to avoid
	compiler warning.
	* libc/search/hash_page.c (overflow_page): Initalize freep to NULL to
	avoid compiler warning.
	* libc/stdio/asiprintf.c (_asiprintf_r): Cast unsigned char * to char *
	to avoid compiler warning.
	(asiprintf): Ditto.
	* libc/stdio/asprintf.c (_asprintf_r): Ditto.
	(asprintf): Ditto.
	* libc/stdio/vasiprintf.c (_vasiprintf_r): Ditto.
	* libc/stdio/vasprintf.c (_vasprintf_r): Ditto.
	* libc/stdio/mktemp.c (_gettemp): Cast to unsigned char in call to
	isdigit to avoid compiler warning.
	* libc/stdio/vfprintf.c (_VFPRINTF_R): Initialize variables used for
	grouping to avoid compiler warning.  Only define and set nseps and
	nrepeats if they are really used.
	* libc/stdio/vfwprintf.c (_VFWPRINTF_R): Ditto.  Only define state if
	it is really used.
	* libc/stdio/vfscanf.c (u_char): Revert to be defined as unsigned char.
	(__SVFSCANF_R): Cast fmt in call to __mbtowc.
	* libc/stdlib/mbtowc_r.c (JIS_state_table): Disable when building
	Cygwin.
	(JIS_action_table): Ditto.
	* libc/stdlib/wctomb_r.c (__utf8_wctomb): Add parenthesis to avoid
	compiler warning.
	* libc/string/strcasestr.c: Deliberately silence gcc compiler warning.
	Add comment to explain why.
	* libc/time/strptime.c (strptime): Cast to unsigned char in calls to
	isspace to avoid compiler warning.
	* libm/math/e_atan2.c (__ieee754_atan2): Add parenthesis to avoid
	compiler warning.
	* libm/math/e_exp.c (__ieee754_exp): Initialize k to 0 to avoid
	compiler warning.  Drop setting it to 0 later.
	* libm/math/ef_exp.c (__ieee754_expf): Ditto.
	* libm/math/e_pow.c (__ieee754_pow): Add braces to avoid compiler
	warning.
	* libm/math/ef_pow.c (__ieee754_powf): Ditto.
	* libm/math/er_lgamma.c (__ieee754_lgamma_r): Initialize nadj to 0 to
	avoid compiler warning.
	* libm/math/erf_lgamma.c (__ieee754_lgammaf_r): Ditto.
	* libm/math/e_rem_pio2.c (__ieee754_rem_pio2): Ditto for variable z.
	* libm/common/sf_round.c (roundf): Remove signbit variable since result
	is never used.
2012-08-08 11:04:18 +00:00
Corinna Vinschen ba35b8303c * libc/stdlib/mprec.h (Storeinc): Add parenthesis to avoid compiler
warning.
2012-08-07 17:52:51 +00:00
Kevin Buettner 217618d3d6 * libc/sys/sysnecv850/crt0.S (_start): Use v850e-specific
start up code for v850e2 and v850e2v3 too.
2012-07-30 23:03:47 +00:00
Eric Blake 0cf8865cf0 readdir: drop bogus code
* libc/posix/readdir.c (readdir): Drop bogus attempt to catch
bogus pointers.
2012-07-20 16:55:19 +00:00
Ralf Corsepius f9a0f9ad5f 2012-07-18 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/sys/rtems/machine/_types.h (_ssize_t): Use signed int for
	__v850__, __851__.
2012-07-18 15:22:45 +00:00
Ralf Corsepius 392c090c7e 2012-07-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/search/hcreate_r.c (hdestroy_r): #ifdef 0 unused vars ie, idx.
2012-07-17 16:56:45 +00:00
Ralf Corsepius 1acc80f5d2 2012-07-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/posix/telldir.c: Conditionally build dd_hash_lock.
2012-07-16 17:03:50 +00:00
Ralf Corsepius d2f675622f 2012-07-13 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/sys/rtems/machine/_types.h (_ssize_t): Add __ARM_EABI__,
	__v850__, __851__.
2012-07-13 09:21:45 +00:00
Corinna Vinschen 52970c1fa5 Fix copy-paste error 2012-07-13 07:57:14 +00:00
Corinna Vinschen 821c8b9aac * libc/stdio/fileno.c (fileno): Check if f is a valid stream. If not,
return -1 and set errno to EBADF per POSIX.
2012-07-09 12:13:16 +00:00
Corinna Vinschen 0246baaea2 Allow building of Cygwin using Mingw64 SDK headers:
* libc/include/sys/time.h: Drop _WINSOCK_H guard.  Just use
	_TIMEVAL_DEFINED instead.
	* libc/include/sys/types.h: Check for _WINSOCKAPI_ along with
	_WINSOCK_H.
	* libc/include/sys/unistd.h: Ditto.
2012-07-06 10:41:21 +00:00
Corinna Vinschen 9b82034b29 * doc/Makefile.am (makedoc): Use LDFLAGS_FOR_BUILD not LDFLAGS.
* doc/Makefile.in: Regenerate.
2012-06-28 08:26:00 +00:00
Christopher Faylor f804f416f3 * libc/include/sys/types.h: Don't use the same preprocessor guard for time_t,
timespec, and itimerspec.  Add a separate guard specifically for timespec and
always unconditionally define itimerspec.
2012-06-26 16:03:12 +00:00
Corinna Vinschen 8336af85e9 * libc/stdio/findfp.c (__sinit): Avoid infinite recursion on
_REENT_SMALL targets.  Add comment to explain.
2012-06-05 16:17:16 +00:00
Corinna Vinschen d5eb5ee3a0 Fix typo. 2012-05-31 09:18:58 +00:00
Corinna Vinschen 94c837599c * libc/stdio/local.h (_newlib_sfp_lock_exit): Fix typo in non-pthread
version.
2012-05-31 07:33:59 +00:00
Corinna Vinschen 53bbfeed98 * libc/stdio/fgetws.c (_fgetws_r): Call _mbsnrtowcs_r rather than
_mbsrtowcs_r and restrict number of wide chars to n - 1.
2012-05-30 14:42:52 +00:00
Corinna Vinschen 4aa28d8ae2 * libc/stdio/local.h (_newlib_flockfile_start): New macro to
secure stream related critical section against thread cancellation.
	(_newlib_flockfile_exit): Ditto.
	(_newlib_sfp_lock_end): Ditto.
	(_newlib_sfp_lock_start): Ditto for the list of streams.
	(_newlib_sfp_lock_exit): Ditto.
	(_newlib_sfp_lock_end): Ditto.
	Use aforementioned macros in place of _flockfile/_funlockfile
	and __sfp_lock_acquire/__sfp_lock_release throughout the code.
	* libc/stdio/fclose.c: Explicitely disable and re-enable thread
	cancellation.  Explain why.
	* libc/stdio/freopen.c: Ditto.
	* libc/stdio64/freopen64.c: Ditto.
2012-05-30 08:58:42 +00:00
Corinna Vinschen bb39d14401 * libc/machine/cr16/asm.h: Added some missing instructions
and removed few unsupported instructions of cr16 target.
2012-05-21 11:55:15 +00:00
Corinna Vinschen 507b172d8d * libc/include/string.h (memrchr): Declare.
* libc/string/Makefile.am (ELIX_4_SOURCES): Add memrchr.c.
	(CHEWOUT_FILES): Add memrchr.def.
	* libc/string/Makefile.in: Regenerate.
	* libc/string/memrchr.c: New file.
2012-05-10 08:34:08 +00:00
Corinna Vinschen cc580eddd3 * libc/sys/rtems/machine/_types.h: Add Microblaze. 2012-05-10 06:59:58 +00:00
Corinna Vinschen a9f0367e1a * libc/sys/rtems/crt0.c: Add stubs for access(), ftruncate(),
_getpid_r(), geteuid(), getgid, _getgid_r, getpid(), getppid(),
	and _getpid_r().
2012-05-09 09:03:06 +00:00
Corinna Vinschen e32a14ca19 * testsuite/newlib.string/strcmp-1.c (LONG_TEST): New macro.
(MAX_BLOCK_SIZE): Use small value when LONG_TEST is not set.
	(MAX_DIFF, MAX_LEN, MAX_ZEROS) Likewise.
2012-05-03 08:13:17 +00:00
Corinna Vinschen 9ae37ea0c6 * libc/locale/locale.c (__mb_cur_max): On Cygwin, align default value
with default UTF-8 charset.
2012-03-29 20:27:15 +00:00
Corinna Vinschen 33c789303f * libc/stdio/findfp.c (__sinit): Set __sdidinit last. 2012-03-26 10:43:06 +00:00
Jeff Johnston eab1d3e125 2012-03-09 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/machine/setjmp-dj.h: Modify license to include
        modification in clause as permitted by DJ Delorie.
        * libc/machine/arm/access.c: Ditto.
        * libc/machine/i386/setjmp.S: Ditto.
        * libc/sys/h8300hms/sys/file.h: Ditto.
        * libc/sys/linux/machine/i386/setjmp.S: Ditto.
        * libc/sys/sysmec/access.c: Ditto.
        * libc/sys/sysnecv850/access.c: Ditto.
2012-03-09 20:26:39 +00:00
Jeff Johnston 52cbb05cfb 2012-03-02 Jeff Johnston <jjohnstn@redhat.com>
* libc/posix/readdir_r.c: Fix return code when end of
        directory is reached.
2012-03-02 16:02:04 +00:00
Corinna Vinschen b680a27c6d * configure.host: Accept "arm*" host spec instead of just "arm". 2012-02-23 09:30:19 +00:00
Jeff Johnston 9edde1d2c4 2012-02-21 Jeremy Bennett <jeremy.bennett@embecosm.com>
Alan Lehotsky  <apl@alum.mit.edu>
            Joern Rennecke  <joern.rennecke@embecosm.com>

        * configure.host: Add Epiphany support.
        * libc/include/machine/ieeefp.h: Likewise.
        * libc/include/machine/setjmp.h: Likewise.
        * libc/machine/configure.in, libc/sys/configure.in: Likewise.
        * libc/machine/configure, libc/sys/configure: Regenerate.
        * libc/machine/epiphany, libc/sys/epiphany: New directories.
        * NEWS: Mention addition of Epiphany.
2012-02-21 22:34:31 +00:00
Christopher Faylor 2d192e1ebb * configure.host: Fix typo: xdir_dir -> xdr_dir. 2012-02-15 18:32:05 +00:00
Eric Blake 833630b859 * libc/include/_ansi.h (_ELIDABLE_INLINE): Fix C99 mode. 2012-02-09 19:58:33 +00:00
Corinna Vinschen e59d6a1469 * libc/sys/rtems/sys/utime.h: Include <sys/types.h> to provide a
definition of time_h.
2012-02-09 13:05:15 +00:00
Corinna Vinschen 3543a40d5c * libc/machine/arm/strcmp.S: New File.
* libc/machine/arm/strcmp.c: Deleted.
	* libc/machine/arm/Makefile.am: Replaces strcmp.c with strcmp.S
	* libc/machine/arm/Makefile.in: Regenerated.
	* testsuite/newlib.string/strcmp-1.c: New file.
2012-02-09 10:42:14 +00:00
Corinna Vinschen dd9ee39045 * libc/include/inttypes.h: Redefine pointer type macros. 2012-02-07 16:42:20 +00:00
Yaakov Selkowitz 29d84e5a46 * libc/stdio/sprintf.c: Document 'm' conversion specifier.
* libc/stdio/swprintf.c: Ditto.
	* libc/stdio/vfprintf.c (_VFPRINTF_R) [_GLIBC_EXTENSION]: Handle 'm'
	conversion specifier.
	* libc/stdio/vfwprintf.c (_VFWPRINTF_R) [_GLIBC_EXTENSION]: Ditto.
2012-01-13 09:13:57 +00:00
Yaakov Selkowitz 2af8babd93 * libc/include/tgmath.h: New header. 2012-01-12 11:19:31 +00:00
Yaakov Selkowitz 5ecc040cff * libc/include/sys/unistd.h [__CYGWIN__] (get_current_dir_name):
Declare.
2012-01-09 22:49:20 +00:00
Yaakov Selkowitz 3182cdfaf0 * libc/include/complex.h: Fix "/*" within comment warning. 2012-01-09 22:46:34 +00:00
Corinna Vinschen 4b4391b74d * libc/include/process.h: Remove Cygwin-only header. 2012-01-09 17:06:20 +00:00
Jeff Johnston 286625cf91 2012-01-03 Viachaslau Kulakouski <Viachaslau.Kulakouski@oracle.com>
* libc/stdlib/__atexit.c: Refer to __atexit_lock instead of lock.
2012-01-03 19:13:57 +00:00
Corinna Vinschen 87865f4c9a * fvwrite.c (__sfvwrite_r): Set __SMBF flag to avoid double free in
fclose.  Enhance comment.
2011-12-20 09:06:58 +00:00
Jeff Johnston e7c65aae83 2011-12-19 Jeff Johnston <jjohnstn@redhat.com>
* NEWS: Update with 1.20.0 info.
        * README: Ditto.
        * acinclude.m4: Change version number to 1.20.0.
        * aclocal.m4: Regenerated.
        * configure: Ditto.
        * Makefile.in: Regenerated.
        * doc/aclocal.m4: Ditto.
        * doc/configure: Ditto.
        * libc/*/aclocal.m4: Ditto.
        * libc/*/configure: Ditto.
        * libc/libc.texinfo: Ditto.
        * libm/*/aclocal.m4: Ditto.
        * libm/*/configure: Ditto.
        * libm/libm.texinfo: Ditto.
        * libc/sys/linux/shared.ld: Add VERS_1.20
2011-12-19 22:03:51 +00:00
Jeff Johnston e480bc80c3 2011-12-13 Richard Earnshaw <rearnsha@arm.com>
Thomas Klein  <th.r.klein@web.de>

        * libc/sys/arm/crt0.S: Manually set the target architecture
        when compiling for Thumb1 on EABI targets.
        Don't use SWI on M-profile cores.
        Avoid v6-only Thumb-1 MOV instruction.
2011-12-13 22:40:45 +00:00
Corinna Vinschen 74e0bcfc0f * libc/time/strftime.c (get_era_info): Fix off-by-one error in month
calculation.
2011-12-12 10:48:29 +00:00
Corinna Vinschen a88d73b52b * libc/iconv/Makefile.am (stmp-def): Use $(MAKE) rather than make.
* libc/iconv/Makefile.in: Regenerate.
2011-12-06 10:45:05 +00:00
DJ Delorie d1fc77322f [libgloss]
* configure.in: Add rl78.
* configure: Regenerate.
* rl78: New directory

[newlib]
* configure.host: Add rl78.
* libc/include/machine/ieeefp.h: Add rl78 support.
* libc/include/machine/setjmp.h: Add rl78 support.
* libc/machine/configure.in: Add rl78.
* libc/machine/rl78: New directory.
2011-11-29 06:33:49 +00:00
Corinna Vinschen d84f3e29fb * libc/iconv/ccs/Makefile.am: Add missing backslash.
* libc/iconv/ccs/Makefile.in: Regenerate.
2011-11-08 15:46:42 +00:00
Nick Clifton d6f6573a5f * libc/machine/arm/Makefile.am (lib_a_SOURCES): Add memchr-stub.c,
memchr.S.
	* libc/machine/arm/arm_asm.h: Add ifdef to allow it to be included
	in .S files.
	* libc/machine/arm/memchr-stub.c: New file - just selects what to
	compile.
	* libc/machine/arm/memchr.S: New file - ARMv6t2/v7 version.

	* libc/machine/arm/Makefile.am (lib_a_SOURCES): Add strlen-armv7.S.
	* libc/machine/arm/strlen-armv7.S: New file.
	* libc/machine/arm/strlen.c: Add ifdef optimised code so it isn't
	for v7 or 6t2.

	* libc/machine/arm/Makefile.in: Regenerate.
2011-10-18 11:35:17 +00:00
Corinna Vinschen f13f2da4ee * libc/time/mktm_r.c: (__tzcalc_limits) Fix Julian day calculation.
* libc/time/mktime.c: (mktime) Fix tm_yday, tm_mday updating when
	timezone causes roll over.
2011-10-11 11:28:05 +00:00
Nick Clifton f9a3814899 * libc/sys/arm/crt0.S: Synchronise with libgloss version.
* libc/sys/arm/arm.h: Imported from libgloss.
2011-10-10 13:00:25 +00:00
Jeff Johnston 5be9bb15b2 2011-10-04 Greta Yorsh <Greta.Yorsh@arm.com>
* testsuite/newlib.string/memcpy-1.c: New test.
2011-10-04 18:43:14 +00:00
Nick Clifton de0ae33544 * libc/machine/arm/memcpy.S: Fix unaligned access copying. 2011-10-04 16:02:25 +00:00
Nick Clifton 341bf73d6d * libc/machine/arm/memcpy.S: New file. Contains a hand coded
memcpy function optimized for the cortex-a15.
	* libc/machine/arm/memcpy-stub.c: New file.
	* libc/machine/arm/Makefile.am (lib_a_SOURCES): Add memcpy-stub.c,
	memcpy.S.
	* libc/machine/arm/Makefile.in: Regenerate.
2011-09-29 13:28:50 +00:00
Jeff Johnston c9925bf497 2011-09-08 Jeff Johnston <jjohnstn@redhat.com>
* testsuite/lib/flags.exp: Add logic to add the
        srcdir include directory to compile flags.
2011-09-08 16:18:23 +00:00
Corinna Vinschen 477215fe7d * libc/time/mktm_r.c (_mktm_r): Fix previous fix. 2011-08-26 07:23:42 +00:00
Corinna Vinschen c9e60624d3 * libc/time/mktm_r.c (_mktm_r): Fix computing tm_year. 2011-08-24 13:38:32 +00:00
Ralf Corsepius 1c5c40f638 2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/stdlib/putenv_r.c: Use "strchr" instead of obsolete "index".
	* libc/stdlib/setenv_r.c: Use "memcpy" instead of obsolete "bcopy".
2011-08-23 12:03:55 +00:00
Ralf Corsepius da344d0ea9 2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/misc/ffs.c, libc/string/bcmp.c, libc/string/bcopy.c,
	libc/string/bzero.c, libc/string/index.c, libc/string/rindex.c,
	libc/string/strcasecmp.c, libc/string/strncasecmp.c:
	Let synopsis reference "#include <strings.h>".
2011-08-23 12:01:51 +00:00
Ralf Corsepius 0792b19670 2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/posix/regexec.c: Define "nope" only #ifndef NDEBUG.
	* libc/stdio/vfscanf.c: Define "state" only #ifdef _MB_CAPABLE.
	* libc/string/wcwidth.c: Include <wctypes.h> for "iswprint" and
	"iswcntrl".
2011-08-23 11:59:56 +00:00
Ralf Corsepius 74c92a62fe 2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/sys/rtems/include/limits.h: Compute SSIZE_MAX based on
	__SIZE_MAX__, __SIZEOF_SIZE_T__ and __CHAR_BIT__.
2011-08-23 05:51:04 +00:00
Ralf Corsepius f3e873f250 2011-08-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/string/index.c: Include <strings.h> for "index".
	* libc/string/rindex.c: Include <strings.h> for "rindex".
	* libc/string/strcasecmp.c: Include <strings.h> for "strcasecmp".
	Don't include <string.h>.
	* libc/string/strncasecmp.c: Include <strings.h> for "strncasecmp".
	Don't include <string.h>.
	* libc/string/bzero.c: Include <strings.h> for "bzero".
	Don't include <string.h>
	* libc/misc/ffs.c: Include <strings.h> for "ffs".
	Don't include <_ansi.h>.
2011-08-22 16:49:37 +00:00
Ralf Corsepius fe9bdaedff 2011-08-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/sys/rtems/crt0.c: Rework RTEMS_STUB macro.
	Include <unistd.h>.
	Remove C++-style comments.
	Remove hppa, a29k.
	Add clock_gettime, gettimeofday, sched_yield.
2011-08-20 05:34:22 +00:00
Ralf Corsepius 34dc27f95d 2011-08-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/stdio/vasiprintf.c: Include "local.h" for "_svfiprintf_r".
	* libc/stdio/vasprintf.c Include "local.h" for "_svfprintf_r".
	* libc/stdio/vsiprintf.c: Include "local.h" for "_svfiprintf_r".
	* libc/stdio/vsniprintf.c: Include "local.h" for "_svfiprintf_r".
	* libc/stdio/vsnprintf.c: Include "local.h" for "_svfprintf_r"
	* libc/stdio/vsprintf.c: Include "local.h" for "_svfprintf_r"
2011-08-19 17:00:32 +00:00
Ralf Corsepius af8a9163c3 2011-08-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/string/bcmp.c: Include <strings.h> for "bcmp".
	* libc/string/bcopy.c: Include <strings.h> for "bcopy".
	* libc/string/strcasestr.c: Include <strings.h> for "strncasecmp".
	* libc/time/strptime.c: Include <strings.h> for "strncasecmp".
2011-08-19 16:58:20 +00:00
Corinna Vinschen e8fdf15a75 * libc/include/process.h: Remove exec family function declarations.
Add comment.
	* libc/include/sys/unistd.h (execlpe): Declare for Cygwin.
2011-08-19 14:29:34 +00:00
Corinna Vinschen 6648762916 * libc/time/mktime.c (validate_structure): Account for tm_mon possibly
being given as negative.
	(mktime): Set tm_isdst=0 when !daylight.
2011-08-19 14:14:18 +00:00
Joel Sherrill 529aa781b6 2011-08-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/include/sys/types.h: XML and RTEMS define
	_UNIX98_THREAD_MUTEX_ATTRIBUTES and can use the standard
	definitions. This avoids redefinition warnings.
2011-08-01 17:22:18 +00:00
Ralf Corsepius bce7e6e2a7 * ChangeLog: Fix my name's spelling. 2011-07-26 04:42:06 +00:00
Ralf Corsepius ce108cc83c 2011-07-26 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/sys/rtems/sys/dirent.h (scandir):
	Add const to "select" parameter.
2011-07-26 04:04:45 +00:00
Ralf Corsepius 7d4b10de81 2011-07-25 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/iconv/iconv.tex: Rename node "Introduction" into
	"Introduction to iconv".
2011-07-25 12:41:38 +00:00
Yaakov Selkowitz 792c8bcff2 * libc/include/time.h [_POSIX_CLOCK_SELECTION] (clock_nanosleep):
Declare.
* libc/include/sys/features.h [__CYGWIN__] (_POSIX_CLOCK_SELECTION):
Define.
2011-07-20 19:41:15 +00:00
Yaakov Selkowitz 00900ab098 * libc/include/sys/unistd.h (_CS_XBS5_WIDTH_RESTRICTED_ENVS): Define.
(_CS_V6_ENV): Fix definition.
2011-07-20 01:14:50 +00:00
Corinna Vinschen dfbfc68a5b * libc/locale/lmessages.c (_C_messages_locale):
Move __HAVE_LOCALE_INFO_EXTENDED__ before codeset.
2011-07-19 19:24:45 +00:00
Corinna Vinschen c9c2b42229 * libc/reent/sbrkr.c: Define _sbrk_r independently of the definition
of MALLOC_PROVIDED.
2011-07-19 07:23:09 +00:00
Jeff Johnston 7890be6e7d 2011-07-15 Yufeng Zhang <yufeng.zhang@arm.com>
* libc/stdio/vfwprintf.c (wcvt): Add a new parameter len of type
        int.  *length is set to the value of (rev - digits) regardless
        of whether _MB_CAPABLE is defined or not.  Replace BUF with len
        in calling _mbsnrtowcs_r and also in the loop where _MB_CAPABLE
        is not defined.
        (_VFWPRINTF_R): Call wcvt with an extra argument.  Call wcvt
        again with allocated new buffer if buf is not large enough for
        the conversion.
        * testsuite/newlib.stdio/stdio.exp: New.
        * testsuite/newlib.stdio/swprintf.c: Likewise.
2011-07-15 17:20:16 +00:00
Corinna Vinschen c842ff73e7 * libc/stdio/fscanf.c (fscanf): Call _vfscanf_r instead of __svfscanf_r
to make sure CHECK_INIT is called.
	(_fscanf_r): Ditto.
	* /libc/stdio/scanf.c (scanf): Ditto.
	(_scanf_r): Ditto.
	* libc/stdio/fwscanf.c (fwscanf): Call _vfwscanf_r instead of
	__svfwscanf_r to make sure CHECK_INIT is called.
	(_fwscanf_r): Ditto.
	* libc/stdio/wscanf.c (wscanf): Ditto.
	(_wscanf_r): Ditto.
2011-07-15 08:04:17 +00:00
Corinna Vinschen 1d15e018c7 * libm/complex/cacos.c: Use temporaries and correct sequencing
error in previous reordering change.
2011-07-13 07:18:54 +00:00
Corinna Vinschen 7e055fdf39 * libc/time/mktime.c (mktime): Lock global timezone info while
accessing it.
2011-06-27 10:13:11 +00:00
Corinna Vinschen aee3f8fb6f * libc/time/asctime_r.c (asctime_r): Replace call to sprintf with call
to siprintf.
	* libc/time/strftime.c: Define snprintf to sniprintf in multibyte case.
	* libc/time/tzset_r.c: Define sscanf to siscanf.
2011-06-14 14:31:59 +00:00
Joseph Myers 25fa7e5ad6 libgloss:
* configure.in: Don't handle strongarm, ep9312 and xscale target
	names.
	* configure: Regenerate.
	* libnosys/configure.in: Don't handle strongarm and thumb target
	names.
	* libnosys/configure: Regenerate.

newlib:
	* configure.host: Don't handle ep9312, strongarm, xscale and thumb
	target names.
	* libc/machine/configure.in: Don't handle xscale target names.
	* libc/machine/configure: Regenerate.
2011-06-14 13:40:48 +00:00
Corinna Vinschen 9bc99decb7 * libc/time/tzset_r.c (tzset_r): Correct behavior for changing from
non-GMT to GMT, when un-setting TZ.  Set _timezone and _daylight even
	if no DST is given in TZ.
2011-06-14 07:50:40 +00:00
Eric Blake 4226571d7a printf: set errno for read-only stream
* libc/stdio/wsetup.c (__swsetup_r): Set errno on failure.
* libc/stdio/fvwrite.c (__sfvwrite_r): Simplify.
* libc/stdio/wbuf.c (__swbuf_r): Likewise.
* libc/stdio/local.h (cantwrite): Adjust comment.
2011-06-14 03:56:05 +00:00
Jeff Johnston 38e356f0e4 2011-06-09 Yaakov Selkowitz <yselkowitz@...>
* libc/include/string.h (strdupa): New macro function.
        (strndupa): New macro function.
2011-06-10 18:30:38 +00:00
Nick Clifton 747a0a5205 * v8500/sbrk.c (_sbrk): Tidy code.
Base start of heap on the "heap_start" symbol.

	* libc/sys/sysnecv850/sbrk.c (_sbrk): Tidy code.
	Base start of heap on the "heap_start" symbol.
2011-05-27 10:46:48 +00:00
Eric Blake d644e79f34 fix changelog typo 2011-05-25 21:32:26 +00:00
Eric Blake c65167c86e * libc/string/strerror.c (_strerror_r): Report "Success" for 0. 2011-05-25 21:05:11 +00:00
Eric Blake 4805b60ccf strerror: allow user hook to comply with POSIX rules
* libc/string/strerror.c (strerror): Split body into...
(_strerror_r): ...new reentrant function.
* libc/string/u_strerr.c (_user_strerror): Update signature.
* libc/include/stdio.h (_strerror_r): New prototype.
* libc/posix/collate.c (__collate_err): Adjust callers.
* libc/stdio/perror.c (_perror_r): Likewise.
* libc/string/strerror_r.c (strerror_r): Likewise.
* libc/string/xpg_strerror_r.c (__xpg_strerror_r): Likewise.
2011-05-25 18:41:10 +00:00
Yaakov Selkowitz 831826db94 * libc/include/stdio_ext.h: New header.
* libc/stdio/fpurge.c [!__rtems__] (__fpurge): New function.
2011-05-19 07:21:42 +00:00
Corinna Vinschen 503ff5adc1 * Makefile.am (install-data-local): Fix condition and rm call.
* Makefile.in: Regenerate.
2011-05-19 06:04:59 +00:00
Yaakov Selkowitz 64a5e8a9a3 * libc/include/time.h (CLOCK_PROCESS_CPUTIME_ID): Rename from
CLOCK_PROCESS_CPUTIME.
(CLOCK_THREAD_CPUTIME_ID): Rename from CLOCK_THREAD_CPUTIME.
* libc/include/sys/features.h [__CYGWIN__] (_POSIX_CPUTIME): Define.
(_POSIX_THREAD_CPUTIME): Define.
2011-05-16 22:35:10 +00:00
Corinna Vinschen f783f223cb * libc/stdlib/strtod.c (_strtod_r): Fix nf/nd counts to not exceed
DBL_DIG.
2011-05-16 13:34:06 +00:00
Corinna Vinschen aaded2f90e * libc/include/sys/features.h (_POSIX_THREAD_ATTR_STACKADDR): Define
to 200112L for Cygwin.
2011-05-15 18:50:52 +00:00
Corinna Vinschen 4d1bf2fbb8 * libc/time/strptime.c (strptime): Fill in tm_yday when all of tm_year,
tm_mon and tm_mday are updated. Fill in tm_mon, tm_mday and tm_wday
	when both of tm_year and tm_yday are updated.
2011-05-12 13:41:22 +00:00
Corinna Vinschen 7bb76e751b * libc/time/strptime.c (first_day): Actually return the wday
of the first day of the year.
2011-05-12 12:43:43 +00:00
Corinna Vinschen 94335e0842 * libc/locale/lmessages.c (_C_messages_locale): Add missing comma. 2011-05-10 16:37:14 +00:00
Yaakov Selkowitz 307b0a5d4b * libc/include/signal.h (psignal): Declare.
* libc/sys/linux/psignal.c: Move from here...
* libc/signal/psignal.c: ... to here. Document.
* libc/sys/linux/Makefile.am (GENERAL_SOURCES): Move psignal.c from here...
* libc/signal/Makefile.am (LIB_SOURCES): ... to here.
(CHEWOUT_FILES): Add psignal.def.
* libc/sys/linux/Makefile.in: Regenerate.
* libc/signal/Makefile.in: Ditto.
* libc/signal/signal.tex: Add references to psignal.
2011-05-04 11:26:22 +00:00
Corinna Vinschen f737a4edba * libc/locale/lmessages.h (__messages_load_locale): Declare. Remove
accidental declaration of __numeric_load_locale.
	* libc/locale/locale.c: Include timelocal.h to get declaration of
	__time_load_locale.
	(__set_locale_from_locale_alias): Fix return type.
	(__locale_msgcharset): Avoid compiler warnings.
	(_localeconv_r): Ditto.
2011-05-04 08:54:34 +00:00
Corinna Vinschen 6e16da9dec Cygwin-specific patch from Andy Koppe:
* libc/locale/locale.c (current_categories): On Cygwin, set LC_CTYPE
	to C.UTF-8 to match initial __wctomb and __mbtowc settings.
	(lc_ctype_charset): On Cygwin, initialize to "UTF-8".
	(loadlocale): Remove unused Cygwin-specifc code.
2011-05-04 08:45:17 +00:00
Yaakov Selkowitz 5f555b0bd3 * libc/include/sys/features.h [__CYGWIN__] (_POSIX_SPIN_LOCKS): Define.
* libc/include/sys/types.h: Cygwin provides its own pthread_spinlock_t
typedef.
2011-05-02 16:05:06 +00:00
Corinna Vinschen 060e5c9785 * libc/include/sys/signal.h (_sig_func_ptr): Define with int parameter
per POSIX.  Explain in comment.
2011-04-19 08:02:59 +00:00
Eric Blake 0fbf39cc9f strchrnul: avoid segv
* libc/string/strchrnul.c (strchrnul): Fix strchrnul.
2011-04-15 20:26:05 +00:00
Corinna Vinschen 43ff4129ce * libc/include/string.h (strchrnul): Declare.
* libc/string/strchrnul.c: New file.
	* libc/string/Makefile.am (ELIX_2_SOURCES): Add strchrnul.c.
	* libc/string/Makefile.in: Regenerate.
2011-03-28 14:51:28 +00:00
Nick Clifton bf77fa00b7 * libc/machine/frv/setjmp.S: Fix typo in .size directive. 2011-03-23 11:01:05 +00:00
Kevin Buettner 3b60b701b1 * libc/sys/sysnecv850/trap.S (___trap0): Fix errno handling.
* libc/sys/sysnecv850/rename.c: New file.
	* libc/sys/sysnecv850/Makefile.am (lib_a_SOURCES): Add rename.c
	* libc/sys/sysnecv850/Makefile.in: Regenerate.
	* libc/sys/sysnecv850/fstat.c (_fstat): Invoke trap for SYS_fstat.
	* libc/sys/sysnecv850/unlink.c (_unlink): Invoke trap for SYS_unlink.
2011-03-21 22:11:14 +00:00
Corinna Vinschen 4b43b20be8 * libc/include/string.h: Include sys/cdefs.h. 2011-03-03 11:11:41 +00:00
Corinna Vinschen 977cd4175e * libc/include/sys/cdefs.h (__CONCAT1): Define.
(__CONCAT): Define.
	(__STRING): Define.
	(__XSTRING): Define.
	(__ASMNAME): Define.
	* libc/include/string.h (strerror_r): Use __ASMNAME to take target
	specific label prefixes into account.
2011-03-03 10:37:09 +00:00
Jeff Johnston 127c3221cd 2011-03-01 Aaron Landwehr <snaphat@gmail.com>
* libm/complex/cproj.c: Fix typo.
        * libm/complex/cprojf.c: Ditto.
2011-03-01 21:43:15 +00:00
Corinna Vinschen d9db1bc555 * libc/stdio/fmemopen.c (fmemopen): Fix EINVAL condition. Avoid SEGV
if incoming buffer is NULL.
2011-02-22 15:38:14 +00:00
Eric Blake 7c10a76dec strerror_r: provide POSIX implementation
* libc/include/string.h (strerror_r): Update declaration.
* libc/string/strerror.c (strerror): Update documentation.
* libc/string/strerror_r.c (strerror_r): Always return
NUL-terminated string; don't overwrite too-short buf.
* libc/string/xpg_strerror_r.c (__xpg_strerror_r): Implement POSIX
variant.
* libc/string/Makefile.am (GENERAL_SOURCES): Build new file.
* libc/string/Makefile.in: Regenerate.
2011-02-10 16:48:18 +00:00
Corinna Vinschen c3099d3d42 Fix path in ChangeLog entry 2011-02-07 11:36:04 +00:00
Jeff Johnston 42583e8a0b Fix spelling of Ralf Corsepius' name in ChangeLog. 2011-02-03 22:25:04 +00:00
Corinna Vinschen 656df313e0 * libc/stdio/fclose.c: Only use sfp lock to guard non-atomic
changes of flags and fp lock.
	* libc/stdio/freopen.c: Ditto.
	* libc/stdio/freopen64.c: Ditto.
	* libc/stdio/fgetc.c: Revert change from 2009-04-24, remove sfp locks
	which guard entire function to avoid potential deadlocks when using
	stdio functions in multiple thraeds.
	* 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.
	* libc/stdio/vfscanf.c: Ditto.
	* libc/stdio/vfwscanf.c: Ditto.

	* libc/stdio/fflush.c (_fflush_r): Split out core functionality into
	new function __sflush_r.  Just lock file and call __sflush_r from here.
	* libc/stdio/fwalk.c (_fwalk): Remove static helper function and move
	functionality back into main function. Don't walk a file with flags
	value of 1.  Add comment.
	(_fwalk_reent): Ditto.
	* libc/stdio/local.h (__sflush_r): Declare.
	* libc/stdio/refill.c (__srefill): Before calling fwalk, set flags
	value to 1 so this file pointer isn't walked.  Revert flags afterwards
	and call __sflush_r for this fp if necessary.  Add comments.
2011-01-28 10:49:11 +00:00
Corinna Vinschen 7cc6d7cfc6 * libc/include/sys/features.h: Define __STDC_ISO_10646__ for Cygwin.
* libc/include/wchar.h: Include features.h.
2011-01-27 11:55:01 +00:00
Corinna Vinschen d6d9c269e4 * libc/include/sys/types.h (ulong): Add typedef. 2011-01-15 09:26:16 +00:00
Corinna Vinschen 5bc054170e Fix ChangeLog entry 2011-01-13 11:28:14 +00:00
Jeff Johnston 47235a60ab 2011-01-12 Ralf Corsépius <ralf.corsepius@rtems.org>
* libm/math/w_tgamma.c: Only build ifndef _DOUBLE_IS_32BITS.
        * libm/math/wf_tgamma.c: Map tgamma to tgammaf, ifdef _DOUBLE_IS_32BITS.
2011-01-12 22:25:15 +00:00
Jeff Johnston 0597fe0adc 2011-01-12 Jeff Johnston <jjohnstn@redhat.com>
* configure.host: Add noinclude variable to allow specification
        of header files to remove from installation.
        * acinclude.m4: Provide NO_INCLUDE_LIST variable based on
        noinclude variable in configure.host.
        * configure: Regenerated.
        * Makefile.am: Remove all header files in NO_INCLUDE_LIST.
        * Makefile.in: Regenerated.
2011-01-12 22:24:06 +00:00
Corinna Vinschen 7971c2a29c * libc/include/linux/sys/signal.h (sig_t): Move from here...
* libc/include/signal.h (sig_t): ...to here.
2011-01-12 11:49:28 +00:00
Corinna Vinschen 1991358fe5 * libc/machine/mips/strlen.c (strlen): Add delay slot for R3000. 2011-01-10 12:11:55 +00:00
Corinna Vinschen 33cdc2a420 Fix date 2011-01-10 12:10:18 +00:00