* libc/include/machine/setjmp.h (siglongjmp): Declare as function on
Cygwin.
(sigsetjmp): Ditto.
(_longjmp): Mark as noreturn function on Cygwin.
* common.din (siglongjmp): Export.
(sigsetjmp): Export.
* gendef: Change formatting of some comments.
(sigsetjmp): Implement.
(siglongjmp): Implement.
(__setjmpex): x86_64 only: Drop entry point.
(setjmp): x86_64 only: Store tls stackptr in Frame now, store MXCSR
and FPUCW registers in Spare, as MSVCRT does.
(longjmp): x86_64 only: Restore tls stackptr from Frame now, restore
MXCSR and FPUCW registers from Spare.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* new-features.xml (ov-new2.2): Document sigsetjmp, siglongjmp.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This is an optimized memset for AArch64. Memset is split into 4 main
cases: small sets of up to 16 bytes, medium of 16..96 bytes which are
fully unrolled. Large memsets of more than 96 bytes align the
destination and use an unrolled loop processing 64 bytes per
iteration. Memsets of zero of more than 256 use the dc zva
instruction, and there are faster versions for the common ZVA sizes 64
or 128. STP of Q registers is used to reduce codesize without loss of
performance.
This is an optimized memcpy for AArch64. Copies are split into 3 main
cases: small copies of up to 16 bytes, medium copies of 17..96 bytes
which are fully unrolled. Large copies of more than 96 bytes align
the destination and use an unrolled loop processing 64 bytes per
iteration. In order to share code with memmove, small and medium
copies read all data before writing, allowing any kind of overlap. On
a random copy test memcpy is 40.8% faster on A57 and 28.4% on A53.
This is an optimized memmove for AArch64. All copies of up to 96
bytes and all backward copies are done by the new memcpy. The only
remaining case is large forward copies which are done in the same way
as the memcpy loop, but copying from the end rather than the start.
As a commonly-included header, the #define basename in <string.h> can
affect code which uses "basename" for its own purposes (e.g. struct
members or C++ namespaced functions). When such cases occur and some
code includes <string.h> and some not, then errors result. OTOH,
<libgen.h> is rarely used, and that's where the renaming occurs in
glibc, so code using <libgen.h> should already be safe.
* libc/include/libgen.h (basename): Define as __xpg_basename
for source compatibility with glibc.
Declare with __ASMNAME("basename") for ABI compatibility.
* libc/include/string.h (basename): Define as basename for
source compatibility with glibc.
Declare with __ASMNAME("__gnu_basename") for ABI compatibility.
https://sourceware.org/ml/newlib/2015/msg00520.html describes
how sys/time.h uses __BSD_VISIBLE while the types used in the
affected inline functions are guarded with !_POSIX_SOURCE.
Fix that by guarding the type with __BSD_VISIBLE as well.
* libc/include/sys/time.h: Explicitely include sys/cdefs.h.
* libc/include/sys/types.h: Ditto. Guard BSD convenience base types
with __BSD_VISIBLE rather than !_POSIX_SOURCE.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
The CHECK_INIT() is necessary before the _newlib_flockfile_start() since
this would use otherwise acquire an uninitialized lock which gets
initialized after this leading to a corrupt release.
newlib/ChangeLog
2015-07-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
libc/stdio/fputs.c (_puts_r): Add missing CHECK_INIT().
libc/stdio/gets.c (_gets_r): Add missing _REENT_SMALL_CHECK_INIT() and
CHECK_INIT(). Use _stdin_r() to get the file pointer instead of stdin.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
These source files have makedoc markup, but aren't listed to be chewed by
makedoc. I am assuming that is accidental.
Future work: Note that stdio/fseeko.c, stdio/ftello.c and common/s_isnand.c have
makedoc markup, but duplicate stdio/fseek.c, stdio/ftell.c and common/s_isnan.c
respectively.
2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
* libc/ctype/Makefile.am (CHEWOUT_FILES): Add isblank.def.
* libc/ctype/ctype.tex: Include isblank and add to menu.
* libc/posix/Makefile.am (CHEWOUT_FILES): Add posix_spawn.def.
* libc/posix/posix.tex: Include posix_spawn and add to menu.
* libc/stdio64/Makefile.am (CHEWOUT_FILES): Add fdopen.def.
* libc/stdio64/stdio64.tex: Include fdopen64 and add to menu.
* libc/stdio64/fdopen64.c: Improve one-line description.
* libc/string/Makefile.am (CHEWOUT_FILES): Add strchrnul.def.
* libc/string/strings.tex: Include strchrnul and add to menu.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
I think these are accidental omissions, as these source files are listed to be
chewed by makedoc, but the result is not included by any texinfo source file.
Future work: Nothing in libc/reent/ which is processed by makedoc is included by
reent.tex
2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
* libc/stdlib/stdlib.tex: Include itoa and utoa, and add to menu.
* libc/string/strings.tex: Include memrchr and rawmemchr, and add
to menu.
* libm/math/math.tex: Include exp10 and pow10, and add to menu.
* libm/common/s_exp10.c: Improve one-line description.
* libm/common/s_exp10.c: Ditto.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Don't chew files which contain no documentation markup.
Neither of the alternatives for MALLOCR (mallocr.c or nano-mallocr.c) contain
any documentation markup.
2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
* libc/stdlib/Makefile.am (CHEWOUT_FILES): Remove $(MALLOCR).def.
* libc/stdio/Makefile.am (CHEWOUT_FILES): Remove getwc.def and
putwc.def.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Fix typo-ed function names in efgcvt.c documentation, neither gvcvt nor gdvtf
exists.
2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
* libc/stdlib/efgcvt.c: Fix typo-ed function names in
documentation.
* libc/stdlib/stdlib.tex: Fix function name in menu to match.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Fix an inconsistent use of '.' to separate function names in FUNCTION. ',' is
used everywhere else.
2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
* libc/stdio/fread.c: Fix inconsistent use of '.' to separate
function names in FUNCTION mark up.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
* libc/stdlib/llabs.c: Mark up parameter name in ANSI_SYNOPSIS.
* libc/time/tzset.c: Add and mark up parameter in SYNOPSIS.
* libm/common/s_nan.c: Ditto.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
* libc/stdio/getchar_u.c: Fix a non-ANSI prototype in SYNOPSIS.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
* libc/string/wcscpy.c: Remove stray ',' from prototype in
ANSI_SYNOPSIS.
* libc/string/wcpcpy.c: Ditto.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
* libc/signal/signal.tex: Use texinfo not makedoc markup.
* libc/stdio/stdio.tex: Ditto.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* libc/include/sys/config.h: Move evaluation of _UINTPTR_EQ_ULONG and
_UINTPTR_EQ_ULONGLONG from here...
* libc/include/sys/_intsup.h: ...to here. Rename to _INTPTR_EQ_LONG
and _INTPTR_EQ_LONGLONG to refer to signed base type. Add test for
base type of int32_t and set _INT32_EQ_LONG accordingly.
* libc/include/stdint.h: Change checks for __have_long32 to checks
for _INT32_EQ_LONG.
* libc/include/inttypes.h: Ditto. Accommodate aforementioned name
change.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This avoids a strlen(NULL) crash a few lines later.
* libc/time/strftime.c (strftime) <%Z>: Initialize tznam to NULL.
Use _tzname as fallback if TM_ZONE is NULL.
2015-03-23 Joel Sherrill <joel.sherrill@oarcorp.com
* configure.in: Delete logic to determine _UINTPTR_EQ_ULONGLONG
and _UINTPTR_EQ_ULONG at configuration time.
*libc/include/sys/config.h: Add logic to determine
_UINTPTR_EQ_ULONGLONG and _UINTPTR_EQ_ULONG at compilation time.
* libc/include/inttypes.h: Add include of <sys/config.h>.
* configure: Regenerated.