Commit Graph

2154 Commits

Author SHA1 Message Date
Jeff Johnston 43b3310bc9 2014-09-12 Jeff Johnston <jjohnstn@redhat.com>
* libc/time/month_lengths.c: Actually add file this time.
        * libc/time/tzcalc_limits.c: Ditto.
2014-09-12 16:38:10 +00:00
Jeff Johnston c9dded6775 2014-09-11 Freddie Chopin <freddie_chopin@op.pl>
* libc/time/month_lengths.c: New file with __month_lengths array
        (previously mon_lengths array in mktm_r.c)
        * libc/time/tzcalc_limits.c: New file with __tzcalc_limits() from
        mktm_r.c
        * libc/time/lcltime_r.c (localtime_r): Simplify by changing call to
        _mktm_r() with call to gmtime_r() and code moved from _mktm_r() which
        was used to do time zone adjustments
        * libc/time/gmtime_r.c (gmtime_r): Simplify by moving all relevant
        code from _mktm_r(), breaking all dependencies on time zone related
        functions
        * libc/time/mktm_r.c: Delete file
        * libc/time/local.h: Update accordingly - remove declaration of
        _mktm_r(), add declaration of __month_lengths[]
        * libc/time/Makefile.am: Modify accordingly.
        * libc/time/Makefile.in: Regenerate.
2014-09-11 21:55:01 +00:00
Jeff Johnston 1c5ab1f862 2014-09-08 Freddie Chopin <freddie_chopin@op.pl>
* libc/machine/arm/Makefile.am: Fix typo.
        * libc/machine/arm/Makefile.in: Regenerated.
2014-09-08 18:57:52 +00:00
Jeff Johnston c8a01afd97 2014-09-05 Hale Wang <hale.wang@arm.com>
* libc/machine/arm/memchr.S: Clean up the wrapper.
        * libc/machine/arm/memcpy.S: Likewise.
        * libc/machine/arm/memchr-stub.c: Delete this redundant file.
        * libc/machine/arm/memcpy-stub.c: Likewise.
        * libc/machine/arm/strcmp.S: Add speed-preferred wrapper.
        * libc/machine/arm/strlen.S: Likewise.
        * libc/machine/arm/Makefile.am: Add dependencies.
        * libc/machine/arm/Makefile.in: Regenerated.
        * libc/machine/arm/configure.in: Add dependencies.
        * libc/machine/arm/configure: Regenerated.
2014-09-05 17:26:42 +00:00
Corinna Vinschen e7565f1088 * libc/stdio/findfp.c (_cleanup_r): Call _fflush_r when configuration
option "--enable-lite-exit" is in effect.  Refactor the code.
2014-09-05 09:42:15 +00:00
Corinna Vinschen 1ec7de7271 * libc/stdio/fwalk.c (_fwalk_reent): Remove redundant test. 2014-09-05 09:31:32 +00:00
Corinna Vinschen 9adec6fd79 * libc/time/mktm_r.c (_mktm_r): Optimize speed. 2014-09-04 09:47:14 +00:00
Corinna Vinschen f9bafa4640 * libc/time/clock.c (clock): Fix warnings about signed-unsigned
comparisons.
	* libc/time/strftime.c (strftime): Likewise.
	* libc/time/strptime.c (match_string): Fix warning about discarding
	'restrict' qualifier from pointer target type.
2014-09-04 08:27:03 +00:00
Corinna Vinschen 4a9103c410 * libc/machine/arm/aeabi_memcpy.c: New file.
* libc/machine/arm/aeabi_memcpy-armv7a.S: New file.
	* libc/machine/arm/Makefile.am: Add dependencies.
	* libc/machine/arm/Makefile.in: Regenerated.
2014-09-04 08:23:23 +00:00
DJ Delorie dd48219ba9 * libc/include/math.h (frexpl): Remove parameter name. 2014-08-27 19:27:03 +00:00
Richard Earnshaw 59c3d5a1a4 * libc/machine/aarch64/memchr.S: Add check for zero-sized buffer. 2014-08-19 10:44:44 +00:00
Corinna Vinschen d5fd6aeb6d * libc/include/sys/signal.h: Declare sigaltstack for RTEMS only. 2014-08-18 18:18:10 +00:00
Jeff Johnston 6811cfb0b9 2014-08-18 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/config.h[__m68k__]: Set _READ_WRITE_RETURN_TYPE
        to _ssize_t to match underlying code in libgloss.
2014-08-18 16:43:42 +00:00
Joel Sherrill 81c17949f0 2014-08-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/string.h: Improve language and OS standard guards.
2014-08-18 14:18:10 +00:00
Joel Sherrill 6042d39486 2014-08-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/sys/signal.h: Add sigaltstack() support.
2014-08-18 14:03:35 +00:00
Corinna Vinschen f703e6aa08 * libc/stdio/findfp.c (std): Don't inline when optimizing for code size. 2014-08-14 08:33:00 +00:00
Jon TURNEY a4a96eb436 * libc/include/math.h: Also define M_PI etc. if _XOPEN_SOURCE is
defined appropriately.
2014-08-04 21:32:37 +00:00
Eric Blake ada456dcfe headers: properly decorate attributes
Found by:
find -name '*.h' |xargs grep -i 'attribute.*(([a-z]'

For an example of the type of bugs this causes, try compiling this valid
C11 program (it's valid because 'noreturn' is reserved for use in the
user namespace unless you include <stdnoreturn.h>):

$ cat foo.c
#define noreturn __attribute__((noreturn))
#include <stdlib.h>
$ gcc -c -o foo.o -Wall foo.c
In file included from /usr/include/stdlib.h:11:0,
                 from foo.c:2:
foo.c:1:18: error: expected ')' before '__attribute__'
 #define noreturn __attribute__((noreturn))
                  ^
/usr/include/stdlib.h:66:28: error: expected ',' or ';' before ')' token
 _VOID _EXFUN(abort,(_VOID) _ATTRIBUTE ((noreturn)));
                            ^

* libc/machine/spu/spu_timer_internal.h: Decorate attribute names
with __, for namespace safety.
* libc/machine/xscale/machine/profile.h: Likewise.
* libc/include/stdlib.h: Likewise.
* libc/include/_ansi.h: Likewise.
* libc/include/sys/unistd.h: Likewise.
* libc/sys/linux/linuxthreads/libc-symbols.h: Likewise.
* libc/sys/linux/linuxthreads/internals.h: Likewise.
* libc/sys/linux/machine/i386/weakalias.h: Likewise.
* libc/sys/linux/machine/i386/dl-procinfo.h: Likewise.
* libc/sys/linux/machine/i386/dl-machine.h: Likewise.
* libc/sys/linux/libc-symbols.h: Likewise.
* libc/sys/linux/iconv/gconv_charset.h: Likewise.
* libc/sys/linux/include/resolv.h: Likewise.
* libc/sys/linux/sys/unistd.h: Likewise.
* libc/sys/linux/dl/atomicity.h: Likewise.
* libc/sys/linux/dl/dynamic-link.h: Likewise.
* libc/sys/linux/dl/ldsodefs.h: Likewise.
2014-08-01 15:44:51 +00:00
Corinna Vinschen db0378d50f * libc/string/strerror.c: Fix documentation so makedoc doesn't
stumble over a sole EAGAIN.
2014-07-30 08:02:12 +00:00
Anthony Green 0a0f33e501 Add moxiebox support. 2014-07-27 14:37:10 +00:00
Joel Sherrill e4994e769e 2014-07-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/sys/time.h: Add prototype for adjtime() and
	wrap it and settimeofday() prototype with __BSD_VISIBLE.
2014-07-22 19:30:00 +00:00
Corinna Vinschen cdd7651698 Fix missing generated files 2014-07-17 18:43:55 +00:00
Corinna Vinschen 81fd6210c0 * configure.host: Remove or16 and or32 targets and add or1k.
* libc/include/machine/ieeefp.h: Replace or32 with or1k.
	* libc/machine/configure.in: Add or1k subdirectory.
	* libc/machine/or1k/configure.in: New file.
	* libc/machine/or1k/Makefile.am: New file.
	* libc/machine/or1k/setjmp.S: New file.
2014-07-17 18:43:05 +00:00
Corinna Vinschen e2b585c12c * libc/include/sys/errno.h: Fix comments.
* libc/string/strerror.c: Fix documentation.
	(_strerror_r): Handle ENETRESET, EILSEQ, ENODATA, ECONNRESET,
	EADDRNOTAVAIL, EOVERFLOW.  Fix strings for EMFILE and EDOM.
2014-07-14 13:40:17 +00:00
Richard Earnshaw 87375c75b3 [aarch64] Add memchr.
2014-07-11  K�vin Petit  <kevin.petit@arm.com>

	* libc/machine/aarch64/memchr.S: New file.
	* libc/machine/aarch64/memchr-stub.c: New file.
	* libc/machine/aarch64/Makefile.am: Add the new files.
	* libc/machine/aarch64/Makefile.in: Regenerated.
2014-07-11 09:10:50 +00:00
Richard Earnshaw 7bd00a0bef 2014-07-07 Pavel Pisa <pisa@cmp.felk.cvut.cz>
Richard Earnshaw  <rearnsha@arm.com>

	* libc/machine/arm/memchr.S (.arch): Require revision ARMv6t2.
2014-07-07 13:58:35 +00:00
Corinna Vinschen 2ccbe5129d * configure.in (--enable-newlib-nano-formatted-io): Set to "no"
by default.
	* configure: Regenerated.
2014-07-07 13:15:55 +00:00
Jeff Johnston d34336767e 2014-07-04 Bin Cheng <bin.cheng@arm.com>
* README (--enable-newlib-nano-formatted-io): Describe.
        * acconfig.h (_NANO_FORMATTED_IO): Undef.
        * newlib.hin (_NANO_FORMATTED_IO): Undef.
        * configure.in (--enable-newlib-nano-formatted-io): New option.
        * configure: Regenerated.
        * libc/configure.in (--enable-newlib-nano-formatted-io): New option.
        * libc/configure: Regenerated.
        * libc/stdio/Makefile.am (NEWLIB_NANO_FORMATTED_IO): Support new
        configuration option.
        * libc/stdio/Makefile.in: Regenerated.
        * libc/stdio/asnprintf.c (_asniprintf_r, asniprintf): Use
        _NANO_FORMATTED_IO to declare alias prototypes.
        * libc/stdio/asprintf.c (_asiprintf_r, asiprintf): Ditto.
        * libc/stdio/dprintf.c (_diprintf_r, diprintf): Ditto.
        * libc/stdio/fprintf.c (_fiprintf_r, fiprintf): Ditto.
        * libc/stdio/fscanf.c (fiscanf, _fiscanf_r): Ditto.
        * libc/stdio/printf.c (_iprintf_r, iprintf): Ditto.
        * libc/stdio/scanf.c (iscanf, _iscanf_r): Ditto.
        * libc/stdio/snprintf.c (_sniprintf_r, sniprintf): Ditto.
        * libc/stdio/sprintf.c (_siprintf_r, siprintf): Ditto.
        * libc/stdio/sscanf.c (siscanf, _siscanf_r): Ditto.
        * libc/stdio/vasnprintf.c (_vasniprintf_r, vasniprintf): Ditto.
        * libc/stdio/vasprintf.c (vasiprintf, _vasiprintf_r): Ditto.
        * libc/stdio/vdprintf.c (_vdiprintf_r, vdiprintf): Ditto.
        * libc/stdio/vprintf.c (viprintf, _viprintf_r): Ditto.
        * libc/stdio/vscanf.c (viscanf, _viscanf_r): Ditto.
        * libc/stdio/vsnprintf.c (vsniprintf, _vsniprintf_r): Ditto.
        * libc/stdio/vsprintf.c (vsiprintf, _vsiprintf_r): Ditto.
        * libc/stdio/vsscanf.c (vsiscanf, _vsiscanf_r): Ditto.
        * libc/stdio/nano-vfprintf.c: New file.
        * libc/stdio/nano-vfprintf_float.c: New file.
        * libc/stdio/nano-vfprintf_i.c: New file.
        * libc/stdio/nano-vfprintf_local.h: New file.
        * libc/stdio/nano-vfscanf.c: New file.
        * libc/stdio/nano-vfscanf_float.c: New file.
        * libc/stdio/nano-vfscanf_i.c: New file.
        * libc/stdio/nano-vfscanf_local.h: New file.
2014-07-04 17:21:45 +00:00
Corinna Vinschen 4491d189ae * libc/argz/envz_merge.c (envz_merge): Fix memory leak (Cygwin Coverity
Scan CID 60023).
	* libc/ctype/iswalpha.c (iswalpha): Add bounds check to avoid
	out-of-bounds read from utf8 tables (CID 59949).
	* libc/locale/ldpart.c (__part_load_locale): Add 1 byte to size of lbuf.
	Write NUL into the last byte to accommodate split_lines (CID 60047).
2014-06-23 20:21:54 +00:00
Richard Earnshaw deda48a9fb * libc/machine/aarch64/strchrnul.S: New file.
* libc/machine/aarch64/strchrnul-stub.c: New file.
	* libc/machine/aarch64/Makefile.am: Add them to build list.
	* libc/machine/aarch64/Makefile.in: Regenerated.
2014-06-11 10:42:54 +00:00
Richard Earnshaw 5efd066df2 * libc/machine/aarch64/strchr.S: New file
* libc/machine/aarch64/strchr-stub.c: New file
	* libc/machine/aarch64/Makefile.am: Add them to build list.
	* libc/machine/aarch64/Makefile.in: Regenerated.
2014-06-10 14:04:31 +00:00
DJ Delorie d043b4c527 * configure.host (default_newlib_nano_malloc): New.
(msp430): Set it.
* configure.in (newlib_nano_malloc): Leave unset if not set by
the user.
* configure: Regenerate.
* libc/configure.in (NEWLIB_NANO_MALLOC): Set after running
configure.host.
(newlib_nano_malloc): Leave unset if not set by	the user.
* libc/configure: Regenerate.
2014-06-10 03:09:35 +00:00
Corinna Vinschen e9eef8ec14 * libc/machine/sparc/setjmp.S (longjmp): Use register g1 instead of g6. 2014-05-15 13:14:25 +00:00
Corinna Vinschen a265e7269f * libc/include/machine/ieeefp.h: Define _DOUBLE_IS_32BITS when double
options is not __RL78_64BIT_DOUBLES__.
2014-05-14 11:33:24 +00:00
Corinna Vinschen c57ccec649 * libc/include/stdint.h (WCHAR_MIN): Copy definition from wchar.h.
(WCHAR_MAX): Ditto.
	* libc/include/wchar.h (WCHAR_MIN): Add comment.
	(WCHAR_MAX): Ditto.
2014-05-12 17:02:11 +00:00
Corinna Vinschen 7bc7b551f5 * libc/include/stdio.h (tempnam): Declare as __BSD_VISIBLE or
__XSI_VISIBLE or if __POSIX_VISIBLE >= 200112.
2014-05-09 14:25:32 +00:00
Corinna Vinschen 783e4d51e2 * libc/include/stdio.h (fcloseall): Declare as __GNU_VISIBLE only.
(renameat): Drop explicit __CYGWIN__ dependency.
2014-05-09 08:42:39 +00:00
Corinna Vinschen 7e9b678464 * libc/include/stdio.h: Declare various C99 printf/scanf functions for
C++11, too.
2014-05-05 12:53:47 +00:00
Richard Earnshaw 742e729664 * libc/machine/arm/strcmp-arm-tiny.S: New file.
* libc/machine/arm/strcmp-armv4.S: New file.
	* libc/machine/arm/strcmp-armv4t.S: New file.
	* libc/machine/arm/strcmp-armv6.S: New file.
	* libc/machine/arm/strcmp-armv7.S: New file.
	* libc/machine/arm/strcmp-armv7m.S: New file.
	* libc/machine/arm/strcmp.S: Replace with wrapper for various
	implementations.
	* libc/machine/arm/Makefile.am (strcmp.o, strcmp.obj): Add
	dependencies.
	* libc/machine/arm/Makefile.in: Regenerated.
2014-04-22 12:16:22 +00:00
Corinna Vinschen a6e73f9505 * libc/sys/rtems/sys/cpuset.h (CPU_SET_S): Add const qualifier.
(CPU_SET): Likewise.
2014-04-14 14:08:26 +00:00
DJ Delorie 0f05e4b24f * libc/machine/rl78/setjmp.S: Add RL78/G10 support. 2014-04-09 21:35:43 +00:00
Jeff Johnston d3925b72d5 2014-04-04 Ashish Kapania <akapania@ti.com>
* configure.host (sys_dir, newlib_cflags): Set sys_dir to tirtos and use
        -D__DYNAMIC_REENT__ and -DMALLOC_PROVIDED compiler options for TIRTOS
        target.
        * libc/stdio/local.h (_STDIO_CLOSE_PER_REENT_STD_STREAMS): Change #ifdef
        to not define this macro when __tirtos__ is defined.
        * libc/sys/tirtos : Add support for TIRTOS.
        * libc/sys/tirtos/Makefile.am, libc/sys/tirtos/lock.c: New files.
        * libc/sys/tirtos/configure.in, libc/sys/tirtos/include/sys/lock.h: Ditto.
2014-04-04 21:40:59 +00:00
Richard Earnshaw 31eade549d * libc/machine/arm/acle-compat.h: New file.
* libc/machine/arm/arm_asm.h: Use it.
2014-03-27 13:26:39 +00:00
Jeff Johnston b7f5fb36f1 2014-03-21 Maciej W. Rozycki <macro@codesourcery.com>
* libc/stdlib/gd_qnan.h (f_QNAN, d_QNAN0, d_QNAN1): Add MIPS
        versions.
        (ld_QNAN0, ld_QNAN1, ld_QNAN2, ld_QNAN3): Don't define for MIPS.
        (ldus_QNAN0, ldus_QNAN1, ldus_QNAN2, ldus_QNAN3, ldus_QNAN4):
        Likewise.
        * libc/stdlib/ldtoa.c (nan113, nan64, nan53, nan24): Add MIPS
        versions.
        (enan): Handle legacy MIPS payloads.
        * libm/common/s_nan.c (nan): Use __builtin_nan if supported by
        the compiler.
        * libm/common/sf_nan.c (nanf): Likewise.
2014-03-21 21:27:29 +00:00
Jeff Johnston 7f6278bc08 2014-03-21 Sabrina Ni <sabrinanitw@gmail.com>
* libc/machine/nds32/configure: Regenerated.
        * libc/machine/nds32/configure.in: Add AC_NOEXECUTABLES.
2014-03-21 21:15:15 +00:00
Jeff Johnston ef073b8f82 2014-03-21 Sabrina Ni <sabrinanitw@gmail.com>
* libc/machine/nds32/Makefile.am: Use C code implemented memcpy,
        memset for 'ISA V3M'.
        * libc/machine/nds32/Makefile.in: Generated.
        * libc/machine/nds32/configure: Generated.
        * libc/machine/nds32/configure.in: Detect IS_NDS32_ISA_V3M.
2014-03-21 21:09:46 +00:00
Jeff Johnston c18decccef 2014-03-21 Sabrina Ni <sabrinanitw@gmail.com>
* libc/machine/nds32/setjmp.S: Keep jmp_buff sync with GDB.
2014-03-21 20:28:57 +00:00
Jeff Johnston 5805cb1f8c 2014-03-21 Sabrina Ni <sabrinanitw@gmail.com>
* libc/machine/nds32/setjmp.S: Optimize.
2014-03-21 20:09:10 +00:00
Corinna Vinschen 0b3ad39364 * libc/include/stdlib.h (strtold): Define if _HAVE_LONG_DOUBLE is
defined.
	* libc/stdlib/strtold.c (strtold): Ditto.  Call strtod on systems
	with long double == double, _strtold otherwise.
2014-03-07 20:06:54 +00:00
Corinna Vinschen d5b32c8fad * libc/include/time.h (__TM_GMTOFF): Remove Cygwin-specific definition.
(__TM_ZONE): Ditto.
2014-03-05 12:49:40 +00:00
Corinna Vinschen 07be216aab * libc/include/time.h (__TM_GMTOFF): Define on Cygwin.
(__TM_ZONE): Ditto.
	(struct tm): Add __TM_GMTOFF and __TM_ZONE members if they are defined.
2014-03-05 12:43:12 +00:00
Corinna Vinschen 17ff765184 * libc/include/machine/_default_types.h: Define unsigned type using
signed type macros in case unsigned type macros are not available.
2014-03-04 08:05:39 +00:00
Corinna Vinschen 6480b2ae76 * libm/complex/complex.tex: Fix wrong syntax in documentation.
* libm/math/math.tex: Ditto.
2014-02-20 18:59:10 +00:00
Corinna Vinschen 23c0f21594 * libc/stdio/open_memstream.c (internal_open_memstream_r): Initialize
c->pos to 0.
2014-02-20 13:32:34 +00:00
Jeff Johnston 35dcecc6db 2014-02-11 Joey Ye <joey.ye@arm.com>
* libc/sys/arm/syscalls.c (_sbrk): Define as weak symbols.
        (_read, _write): Ditto.
2014-02-11 19:54:30 +00:00
Corinna Vinschen ab7165e43b * libc/include/pwd.h: Include <sys/cdefs.h>.
* libc/include/grp.h: Ditto.
2014-02-09 20:02:17 +00:00
Jeff Johnston d581a24a36 2014-02-04 Matthias Braun <matze@braunis.de>
* libm/mathfp/sf_numtest.c: Fix NaN/Inf detection logic.
2014-02-04 20:49:53 +00:00
Corinna Vinschen ae691ac535 * libc/include/setjmp.h (longjmp): Fix copy/paste error. 2014-01-20 17:23:41 +00:00
Corinna Vinschen 5e66ab7852 * libc/include/setjmp.h (longjmp): Mark "noreturn" when building with
GCC.
2014-01-19 09:38:34 +00:00
Corinna Vinschen 93012a1d0d * libc/include/pwd.h: Use __foo_VISIBLE macros from sys/cdefs.h.
(setpassent): Declare.
2014-01-17 14:54:31 +00:00
Corinna Vinschen ad1a102dd6 * libc/include/sys/_default_fcntl.h (LOCK_SH): Define.
(LOCK_EX): Likewise.
	(LOCK_NB): Likewise.
	(LOCK_UN): Likewise.
	(flock): Declare.
2014-01-17 10:57:54 +00:00
Corinna Vinschen 7a7e4d4d95 Introduce _STDIO_BSD_SEMANTICS flag to switch fclose/exit file flushing
semantics from POSIX to BSD.
	* libc/stdio/fclose.c (_fclose_r): Conditionalize file flushing on
	_STDIO_BSD_SEMANTICS.  Call __sflush_r rather than _fflush_r.  Add
	comment.
	* libc/stdio/fflush.c (__sflushw_r): New function, only available
	if _STDIO_BSD_SEMANTICS is defined.
	* libc/stdio/findfp.c (_cleanup_r): Call _fwalk_reent rather than
	_fwalk.  Conditionalize cleanup function call on _STDIO_BSD_SEMANTICS.
	Add comments.  Add FIXME.
	* libc/stdio/local.h (__sflushw_r): Declare if _STDIO_BSD_SEMANTICS is
	defined.
2014-01-17 10:55:32 +00:00
Jeff Johnston 439f4e7a87 2014-01-06 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/include/sys/_default_fcntl.h (AT_FDCWD): Define according
        to POSIX.
        (AT_EACCESS): Likewise.
        (AT_SYMLINK_NOFOLLOW): Likewise.
        (AT_SYMLINK_FOLLOW): Likewise.
        (AT_REMOVEDIR): Likewise.
        (openat): Declare according to POSIX.
        * libc/include/stdio.h (renameat): Likewise.
        * libc/include/sys/stat.h (fchmodat): Likewise.
        (fstatat): Likewise.
        (mkdirat): Likewise.
        (mkfifoat): Likewise.
        (mknodat): Likewise.
        (utimensat): Likewise.
        (futimens): Likewise.
        * libc/include/sys/unistd.h (faccessat): Likewise.
        (fchownat): Likewise.
        (linkat): Likewise.
        (readlinkat): Likewise.
        (symlinkat): Likewise.
        (unlinkat): Likewise.
2014-01-06 20:59:38 +00:00
Jeff Johnston 0707f1df6c 2014-01-06 Mike Frysinger <vapier@gentoo.org>
* libc/search/hash.c (hash_delete): Change __uint32_t to u_int.
        (hash_get): Likewise.
        (hash_put): Likewise.
        (hash_seq): Likewise.
        (hash_sync): Likewise.

Also fix former ChangeLog entry to be 2014.
2014-01-06 19:50:33 +00:00
Jeff Johnston 60ea042c37 2013-01-06 Mike Frysinger <vapier@gentoo.org>
* libc/ctype/jp2uc.c: Include string.h.
2014-01-06 19:30:50 +00:00
Jeff Johnston 5ac847c629 2013-12-23 Jeff Johnston <jjohnstn@redhat.com>
* NEWS: Update with 2.1.0 info.
        * README: Ditto.
        * acinclude.m4: Change version number to 2.1.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.1
2013-12-23 20:45:10 +00:00
Jeff Johnston b153931f18 2013-12-22 JF Bastien <jfb@chromium.org>
* libc/include/limits.h: Define LLONG_MIN, LLONG_MAX and ULLONG_MAX
        for C++11 too.
        * libc/include/stdlib.h: Define struct lldiv_t, _Exit, atoll, llabs
        and lldiv for C99 and C++11.  Move wcstold to wchar.h.
        * libc/include/wchar.h: Define WCHAR_MIN and WCHAR_MAX according to
        __WCHAR_UNSIGNED__ if it is provided, and correct the limit when
        unsigned (to 32 all-1 bits, not 31).  Define FILE as in stdio.h.
        Move wcstold from stdlib.h here.
2013-12-23 19:21:07 +00:00
Nick Clifton 57cfbb7bbf * configure.host (newlib_cflags): Use -Os, -ffunction-sections and
-fdata-sections for RL78.
2013-12-20 10:27:49 +00:00
Corinna Vinschen 281924766d * libc/stdio/vfwscanf.c (__SVFWSCANF_R): Fix fetching decimal_point in
!_MB_CAPABLE as well as in !__HAVE_LOCALE_INFO_EXTENDED__ case.
2013-12-19 18:50:00 +00:00
Corinna Vinschen 0fcafd1535 Fix ChangeLog entry 2013-12-19 09:50:19 +00:00
Corinna Vinschen 576b7804d6 * vfscanf.c (BUF): Change definition to take multibyte decimal point
into account.
	(__SVFSCANF_R): Handle radix char language-dependent
	per POSIX.
	(__SVFWSCANF_R): Ditto.
2013-12-18 19:23:33 +00:00
Jeff Johnston 10e4d79a19 2013-12-10 Jeff Johnston <jjohnstn@redhat.com>
* acconfig.h: Add _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL.
        * newlib.hin: Ditto.
        * configure: Regenerate.
        * configure.in: Add setting of _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL.
        * libc/string/local.h: Add check for _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL
        and set __inhibit_loop_to_libcall macro appropriately.
        * libc/string/memmove.c: Use __inhibit_loop_to_libcall macro in
        function declaration.
        * libc/string/memset.c: Ditto.
2013-12-10 18:57:30 +00:00
Corinna Vinschen a6a307d8c2 * libc/sys/rtems/include/limits.h: Update page size to match
libc/sys/rtems/machine/param.h.
2013-12-10 09:20:37 +00:00
Corinna Vinschen f4fc6b0663 * libc/sys/rtems/sys/cpuset.h: Use __inline instead of inline. 2013-12-03 16:07:33 +00:00
Corinna Vinschen 9bd3bcc642 * libc/include/machine/_default_types.h: Move extern "C" after
header includes.  Include <sys/features.h> for
	__GNUC_PREREQ__().
	(__u?int.*_t): Define via GCC provided __U?INT.*_TYPE__ if
	available.
	(__intptr_t): Define.
	(__uintptr_t): Likewise.
	* libc/include/stdint.h: Include <machine/_default_types.h>
	instead of <_ansi.h>.
	(u?int.*_t): Define via __u?int.*_t provided by
	<machine/_default_types.h>.
	(u?int_fast.*_t): Define via GCC provided
	__U?INT_FAST.*_TYPE__ if available.
	(U?INT.*(MIN|MAX)): Define via GCC provided __U?INT.*(MIN|MAX)__
	if available.
	(U?INT.*_C): Define via GCC provided __U?INT.*_C if available.
	* libc/include/sys/cdefs.h: Use <machine/_default_types.h>
	instead of <stdint.h>.
	* libc/sys/rtems/sys/cpuset.h: Likewise.
	* libc/sys/rtems/machine/_types.h: Include <stdint.h> for
	FreeBSD compatibility.
2013-12-03 16:04:41 +00:00
Joel Sherrill a534dfd26e 2013-11-29 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/include/pthread.h (pthread_cleanup_push): Delete prototype
	and add macro of the same name.
	(pthread_cleanup_pop): Likewise.
	(_pthread_cleanup_context): Define.
	(_pthread_cleanup_push): Likewise.
	(_pthread_cleanup_pop): Likewise.
	(pthread_cleanup_push_defer_np): Define if _GNU_SOURCE is defined.
	(pthread_cleanup_pop_restore_np): Likewise.
	(_pthread_cleanup_push_defer): Likewise.
	(_pthread_cleanup_pop_restore): Likewise.
2013-11-29 23:35:34 +00:00
Joel Sherrill 62c28b76ac 2013-11-29 Jennifer Averett <jennifer.averett@oarcorp.com>
* libc/include/pthread.h (pthread_attr_setaffinity_np):
	Add pthread SMP affinity attributes to methods to RTEMS for
	compatibility with GNU/Linux.
	(pthread_attr_getaffinity_np): Likewise.
	(pthread_setaffinity_np): Likewise.
	(pthread_getaffinity_np): Likewise.
	(pthread_getattr_np): Add for GNU/Linux compatibility.
	* libc/include/sys/types.h: Add cpuset to pthread_attr_t for RTEMS.
	* libc/include/sys/cdefs.h (_GNU_SOURCE): Defining _GNU_SOURCE
	turns on all _XXX_VISBLE feature flags.
2013-11-29 23:14:57 +00:00
Joel Sherrill 2d50094276 2013-11-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/sys/rtems/cpusetalloc.c: New file.
	* libc/sys/rtems/cpusetfree.c: Likewise.
	* libc/sys/rtems/Makefile.am (lib_a_SOURCES): Add new files.
	* libc/sys/rtems/Makefile.in: Regenerate.
	* libc/sys/rtems/sys/cpuset.h: Delete #if 0 block.  Include
	<stddef.h> for size_t.
	(_NCPUBITS): Avoid NBBY and assume 8 bits per char.
	(__cpuset_mask): Use int instead of size_t parameter for Linux
	compatibility.
	(__cpuset_index): Likewise.
	(__cpuset_alloc): Declare.
	(__cpuset_free): Likewise.
	(CPU_ALLOC_SIZE): Likewise.
	(CPU_ALLOC): Define.
	(CPU_FREE): Likewise.
	(CPU_ZERO_S): Likewise.
	(CPU_FILL_S): Likewise.
	(CPU_SET_S): Likewise.
	(CPU_CLR_S): Likewise.
	(CPU_ISSET_S): Likewise.
	(CPU_COUNT_S): Likewise.
	(CPU_AND_S): Likewise.
	(CPU_OR_S): Likewise.
	(CPU_XOR_S): Likewise.
	(CPU_NAND_S): Likewise.
	(CPU_EQUAL_S): Likewise.
	(CPU_ZERO): Use CPU_ZERO_S().
	(CPU_FILL): Use CPU_FILL_S().
	(CPU_SET): Use CPU_SET_S().
	(CPU_CLR): Use CPU_CLR_S().
	(CPU_ISSET): Use CPU_ISSET_S().
	(CPU_COUNT): Use CPU_COUNT_S().
	(CPU_AND): Use CPU_AND_S().
	(CPU_OR): Use CPU_OR_S().
	(CPU_XOR): Use CPU_XOR_S().
	(CPU_NAND): Use CPU_NAND_S().
	(CPU_EQUAL): Use CPU_EQUAL_S().
	(CPU_CMP): Delete superfluous const qualifier.
	(CPU_EMPTY): Likewise.
2013-11-27 14:53:59 +00:00
Corinna Vinschen 963addfa27 * libc/machine/mips/setjmp.S: Fix definition of macro FPR_LAYOUT
for ABI == N32.
2013-11-27 12:45:56 +00:00
Jeff Johnston a00d2722b6 2013-11-26 Matheus Almeida <Matheus.Almeida@imgtec.com>
* libc/include/machine/setjmp.h: Add support for __mips_fpr being
        64 and treat it the same as if __mips64 is set.
        * libc/machine/mips/setjmp.S: Ditto, plus add checks for _MIPS_SIM
        being _ABIN32 and _ABI64.
2013-11-26 19:58:19 +00:00
Joel Sherrill db026d86d8 Correct for missing entries for wchar.h changes and white space changes 2013-11-26 17:27:08 +00:00
Joel Sherrill 380c9f6165 2013-11-26 Julio Gutierrez <jgutleyva@gmail.com>
*libc/include/wchar.h: Add restrict keyword.
	*libc/stdio/fgetws.c (fgetws): ditto.
	*libc/stdio/fputws.c (fputws): ditto.
	*libc/stdio/fwprintf.c (fwprintf): ditto.
	*libc/stdio/fwscanf.c (fwscanf): ditto.
	*libc/stdio/swprintf.c (swprintf): ditto.
	*libc/stdio/swscanf.c (swscanf): ditto.
	*libc/stdio/vfwprintf.c (vfwprintf): ditto.
	*libc/stdio/vfwscanf.c (vfwscanf): ditto.
	*libc/stdio/vswprintf.c (vswprintf): ditto.
	*libc/stdio/vswscanf.c (vswscanf): ditto.
	*libc/stdio/vwprintf.c (vwprintf): ditto.
	*libc/stdio/vwscanf.c (vwscanf): ditto.
	*libc/stdio/wprintf.c (wprintf): ditto.
	*libc/stdio/wscanf.c (wscanf): ditto.
	*libc/stdlib/mbrlen.c (mbrlen): ditto.
	*libc/stdlib/mbrtowc.c (mbrtowc): ditto.
	*libc/stdlib/mbsnrtowcs.c (mbsnrtowcs): ditto.
	*libc/stdlib/mbsrtowcs.c (mbsrtowcs): ditto.
	*libc/stdlib/wcrtomb.c (wcrtomb): ditto.
	*libc/stdlib/wcsnrtombs.c (wcsnrtombs): ditto.
	*libc/stdlib/wcsrtombs.c (wcsrtombs): ditto.
	*libc/stdlib/wcstod.c (wcstod): ditto.
	*libc/stdlib/wcstol.c (wcstol): ditto.
	*libc/stdlib/wcstold.c (wcstold): ditto.
	*libc/stdlib/wcstoll.c (wcstoll): ditto.
	*libc/stdlib/wcstoul.c (wcstoul): ditto.
	*libc/stdlib/wcstoull.c (cstoull): ditto.
	*libc/string/wcpcpy.c (wcpcpy): ditto.
	*libc/string/wcpncpy.c (wcpncpy): ditto.
	*libc/string/wcscat.c (wcscat): ditto.
	*libc/string/wcscpy.c (wcscpy): ditto.
	*libc/string/wcsncat.c (wcsncat): ditto.
	*libc/string/wcsncpy.c (wcsncpy): ditto.
	*libc/string/wcsstr.c (wcsstr): ditto.
	*libc/string/wcstok.c (wcstok): ditto.
	*libc/string/wcsxfrm.c (wcsxfrm): ditto.
	*libc/string/wmemcpy.c (wmemcpy): ditto.
2013-11-26 17:21:01 +00:00
Corinna Vinschen 4d3c733045 * libc/posix/posix_spawn.c: Drop using namespace.h. 2013-11-26 13:51:19 +00:00
Corinna Vinschen 6fe752f94f * libc/posix/posix_spawn.c: Eliminate OS function calls not present
in newlib or Cygwin.
	(process_spawnattr): Use sigprocmask rather than _sigprocmask.  Use
	sigaction rather than _sigaction.
	(process_file_actions_entry): Use dup2 rather than _dup2.
	(do_posix_spawn): Use execvpe rather than _execvpe.  Use waitpid
	rather than _waitpid.
2013-11-26 13:48:00 +00:00
Joel Sherrill d264970f79 2013-11-25 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/iconv/lib/iconv.c, libc/time/strftime.c: Change "restrict<" to
	"restrict <" to fix formatting.
2013-11-25 17:55:33 +00:00
Corinna Vinschen 05efdc441d * libc/include/spawn.h (posix_spawn_file_actions_destroy): Fix typo
in function name.
	* libc/posix/posix_spawn.c (posix_spawn_file_actions_destroy): Ditto.
2013-11-25 17:23:30 +00:00
Joel Sherrill d482870337 2013-11-25 Sahil Patnayakuni <sahil.patnayakuni@gmail.com>
* libc/include/time.h (time): Add restrict keyword.
	* libc/include/wchar.h (wcsftime): Add restrict keyword.
	* libc/time/asctime_r.c (asctime_r): Same.
	* libc/time/gmtime_r.c (gmtime_r): Same.
	* libc/time/lcltime_r.c (lcltime_r): Same.
	* libc/time/strftime.c (strftime): Same.
	* libc/time/strptime.c (strptime): Same.
	* libc/sys/linux/linuxthreads/timer_create.c (timer_create): Same.
	* libc/sys/linux/linuxthreads/timer_settime.c (timer_settime): Same.
2013-11-25 13:46:23 +00:00
Joel Sherrill f68a40cdf9 2013-11-23 Bryan Dunsmore <dunsmoreb@gmail.com>
* libc/include/wordexp.h (wordexp): Add restrict keyword.
	* libc/posix/wordexp.c (wordexp): Ditto.
2013-11-23 22:39:34 +00:00
Joel Sherrill 9cd69d84ef 2013-11-22 Bryan Dunsmore <dunsmoreb@gmail.com>
* libc/include/sys/time.h (gettimeofday): Add restrict keyword.
	(setitimer): Likewise.
	* libc/sys/rdos/gettod.c (gettimeofday): Likewise.
	* libc/sys/rtems/crt0.c (gettimeofday): Likewise.
2013-11-23 01:25:47 +00:00
Joel Sherrill 849fe25d0e 2013-11-22 Chirayu Desai <chirayudesai1@gmail.com>
* libc/include/sys/unistd.h (readlink): Add restrict keyword.
	(readlinkat): Ditto.
	(swab): Ditto.
	* libc/sys/rdos/readlink.c (readlink): Ditto.
	* libc/string/swab.c (swab): Ditto.
2013-11-22 22:39:51 +00:00
Joel Sherrill 2464ecbf64 2013-11-21 Daniel Ramirez <javamonn@gmail.com>
* libc/sys/linux/statvfs.c (statvfs): Added restrict keyword.
2013-11-22 01:17:42 +00:00
Joel Sherrill d0d3968f8f 2013-11-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/sys/rdos/chown.c, libc/sys/rdos/close.c, libc/sys/rdos/execve.c,
	libc/sys/rdos/fork.c, libc/sys/rdos/fstat.c, libc/sys/rdos/getpid.c,
	libc/sys/rdos/gettod.c, libc/sys/rdos/isatty.c, libc/sys/rdos/kill.c,
	libc/sys/rdos/link.c, libc/sys/rdos/lseek.c, libc/sys/rdos/open.c,
	libc/sys/rdos/rdos.h, libc/sys/rdos/read.c, libc/sys/rdos/readlink.c,
	libc/sys/rdos/sbrk.c, libc/sys/rdos/stat.c, libc/sys/rdos/symlink.c,
	libc/sys/rdos/times.c, libc/sys/rdos/unlink.c, libc/sys/rdos/wait.c,
	libc/sys/rdos/write.c: Convert from DOS to UNIX CRLF.
2013-11-21 19:27:17 +00:00
Joel Sherrill 9977fcbc42 2013-11-21 Julio Gutierrez <jgutleyva@gmail.com>
* libc/include/glob.h (glob): Add restrict keyword.
	* libc/posix/glob.c (glob): Ditto.
2013-11-21 17:04:57 +00:00
Joel Sherrill a7c3258311 2013-11-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/posix/readdir_r.c: Add restrict keyword.
	* libc/machine/spu/sys/dirent.h, libc/sys/decstation/sys/dirent.h,
	libc/sys/linux/sys/dirent.h, libc/sys/rtems/sys/dirent.h,
	libc/sys/sparc64/sys/dirent.h, libc/sys/sun4/sys/dirent.h,
	libc/sys/sysvi386/sys/dirent.h: Add readdir_r() prototype.
2013-11-21 16:44:39 +00:00
Joel Sherrill 21cf2aee53 2013-11-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/sys/rdos/stat.c: Remove stray +.
2013-11-21 16:39:06 +00:00
Joel Sherrill 32e2cbeeab 2013-11-21 Daniel Ramirez <javamonn@gmail.com>
* libc/include/sys/stat.h, libc/sys/linux/sys/stat.h,
	libc/sys/m88kbug/syscalls.c, libc/sys/rdos/stat.c,
	libc/sys/sparc64/sys/stat.h: Add restrict keyword.
2013-11-21 16:35:47 +00:00
Joel Sherrill 3c7451d8de 2013-11-20 Daniel Ramirez <javamonn@gmail.com>
* libc/include/search.h, libc/search/tdelete.c: Add restrict keyword.
2013-11-20 18:22:27 +00:00
Joel Sherrill ea9d80921f 2013-11-20 Chirayu Desai <chirayudesai1@gmail.com>
* libc/include/regex.h, libc/posix/regcomp.c,
	libc/posix/regerror.c, libc/posix/regex.3
	libc/posix/regexec.c: Add restrict keyword.
2013-11-20 16:25:50 +00:00
Joel Sherrill a2c4eac5d0 2013-11-20 Daniel Ramirez <javamonn@gmail.com>
* libc/iconv/lib/iconv.c, libc/include/iconv.h,
	libc/sys/linux/iconv/iconv.c: Add restrict keyword.
2013-11-20 13:39:36 +00:00
Corinna Vinschen 8273b2112f * libc/include/stdlib.h: Declare realpath only if !__STRICT_ANSI__. 2013-11-20 09:46:39 +00:00
Joel Sherrill 3007afbca3 3013-11-19 Jennifer Averett <jennifer.averett@oarcorp.com>
* libc/sys/rtems/sys/cpuset.h: New file.
2013-11-19 19:11:24 +00:00
Joel Sherrill 670c036efa Fix date 2013-11-19 17:39:43 +00:00
Joel Sherrill aed5f73fa8 2013-11-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/stdlib.h: Add prototype of realpath().
	* libc/sys/linux/realpath.c: Add restrict keyword.
2013-11-19 17:32:24 +00:00
Joel Sherrill 7dffe44b09 2013-11-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* libm/common/modfl.c: Add cast to remove compiler warning.
2013-11-19 17:28:04 +00:00
Corinna Vinschen ff125797e3 * libc/posix/closedir.c: Fix use after free.
Remove useless test dd_fd != -1
	* libc/posix/readdir.c: Remove useless test dd_fd == -1
	* libc/posix/readdir_r.c: Ditto.
2013-11-19 11:48:02 +00:00
Joel Sherrill 481cb456a4 2013-11-18 Sahil Patnayakuni <sahilp@oarcorp.com>
* libc/include/stdio.h, libc/machine/powerpc/vfscanf.c,
	libc/machine/spu/fgetpos.c, libc/machine/spu/fgets.c,
	libc/machine/spu/fopen.c, libc/machine/spu/fputs.c,
	libc/machine/spu/fread.c, libc/machine/spu/freopen.c,
	libc/machine/spu/fwrite.c, libc/machine/spu/setbuf.c,
	libc/machine/spu/vfprintf.c, libc/machine/spu/vfscanf.c,
	libc/machine/spu/vsnprintf.c, libc/machine/spu/vsprintf.c,
	libc/machine/spu/vsscanf.c, libc/stdio/asnprintf.c,
	libc/stdio/asprintf.c, libc/stdio/dprintf.c,
	libc/stdio/fgetpos.c, libc/stdio/fgets.c,
	libc/stdio/fmemopen.c, libc/stdio/fopen.c,
	libc/stdio/fprintf.c, libc/stdio/fputs.c,
	libc/stdio/fread.c, libc/stdio/freopen.c,
	libc/stdio/fscanf.c, libc/stdio/fwrite.c,
	libc/stdio/printf.c, libc/stdio/scanf.c,
	libc/stdio/setbuf.c, libc/stdio/snprintf.c,
	libc/stdio/sprintf.c, libc/stdio/sscanf.c,
	libc/stdio/vdprintf.c, libc/stdio/vprintf.c,
	libc/stdio/vscanf.c, libc/stdio/vsnprintf.c,
	libc/stdio/vsprintf.c, libc/stdio/vsscanf.c: Add restrict keyword.
2013-11-18 17:28:06 +00:00
Joel Sherrill 8ab08406da 2013-11-18 Sahil Patnayakuni <sahilp@oarcorp.com>
* libc/include/stdlib.h, libc/stdlib/mbstowcs.c,
	libc/stdlib/mbstowcs_r.c, libc/stdlib/mbtowc.c,
	libc/stdlib/mbtowc_r.c, libc/stdlib/strtod.c,
	libc/stdlib/strtol.c, libc/stdlib/strtold.c,
	libc/stdlib/strtoll.c, libc/stdlib/strtoll_r.c,
	libc/stdlib/strtoul.c, libc/stdlib/strtoull.c,
	libc/stdlib/strtoull_r.c, libc/stdlib/wcstombs.c,
	libc/stdlib/wcstombs_r.c: Add restrict keyword.
2013-11-18 17:26:52 +00:00
Marcus Shawcroft c709105913 [ARM] Provide ftruncate() and truncate() stubs. 2013-11-18 09:53:46 +00:00
Corinna Vinschen 2b2290caba * newlib/libc/stdlib/getopt.c (getopt_internal): Add missing braces. 2013-11-13 20:04:18 +00:00
Corinna Vinschen 02365c2064 * newlib/libc/include/getopt.h (struct option): name field should be
"const char *".
	* newlib/libc/stdlib/getopt.c (getopt_internal): Use fputs()/fputc()
	instead of fprintf() to save code space.  Fix signed/unsigned
	comparison.
2013-11-13 09:09:45 +00:00
Corinna Vinschen f1359420da * libc/libc/stdlib/getopt.c (getopt_internal): Fix NULL pointer access. 2013-11-12 11:30:32 +00:00
Corinna Vinschen 874e065fa1 * libm/libm.texinfo: Rename node Index to Document Index.
* libc/libc.texinfo: Rename node Library Index to Document Index.
2013-11-08 12:48:29 +00:00
Corinna Vinschen 2a98b3363e * libc/stdio/fvwrite.c: Allow writing in larger chunks for fully
buffered and unbuffered files, to improve write performance.
2013-11-04 14:18:44 +00:00
Corinna Vinschen a5f316d8cf * libc/stdio/fvwrite.h: change type of uio_resid from int to size_t to
fix fwrite() of > 2GByte buffers.
2013-10-31 10:35:54 +00:00
Corinna Vinschen 566fd12b68 Implement malloc_stats for nano.
* 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.
2013-10-30 15:53:05 +00:00
Corinna Vinschen 4afcc6ced9 * libc/include/machine/_default_types.h: Revert change from 2013-10-10. 2013-10-30 15:51:13 +00:00
Hans-Peter Nilsson 72a386373e * libc/include/stdio.h [!__LARGE64_FILES] (funopen): Fix typo
in last change.
2013-10-24 01:21:33 +00:00
Corinna Vinschen 0c3d8e5ab5 * libc/include/stdio.h (funopen): Change prototype of
__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.
2013-10-23 10:04:43 +00:00
Corinna Vinschen f3debae528 Fix formatting 2013-10-18 08:44:12 +00:00
Corinna Vinschen e4aa6ea112 * configure.in (enable-newlib-global-atexit): New option.
* configure: Regenerated.
	* newlib.hin (_REENT_GLOBAL_ATEXIT): Place-holder.
	* README (enable-newlib-global-atexit): Description for
	new option.
2013-10-18 08:43:05 +00:00
Corinna Vinschen 05b637e340 * libc/include/sys/unistd.h (MAXPATHLEN): Delete.
* 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-18 08:30:29 +00:00
Corinna Vinschen 1c1fa247a6 Fix ChangeLog entries 2013-10-16 10:41:06 +00:00
Joel Sherrill 77e22783e4 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/libc/sys/rtems/sys/param.h: Update some parameters to
	the latest FreeBSD values.
2013-10-15 17:40:02 +00:00
Joel Sherrill 50eb944a7c 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/sys/rtems/machine/_types.h (_HAVE_SYSTYPES): Define.
2013-10-15 17:39:19 +00:00
Joel Sherrill 8635dec1a5 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
* 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-15 17:38:32 +00:00
Joel Sherrill 0351747c13 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
* 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-15 17:37:37 +00:00
Joel Sherrill 7a75a3aa7c 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/sys/rtems/machine/_types.h (_ssize_t): Delete.
	(__ssize_t_defined) Likewise.
2013-10-15 17:36:16 +00:00
Joel Sherrill 6a0563a2e3 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
* 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-15 17:35:38 +00:00
Joel Sherrill 50588a20d4 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/include/paths.h (_PATH_DEVNULL): Define.
	(_PATH_DEVZERO): Likewise.
2013-10-15 17:34:23 +00:00
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