Commit Graph

17007 Commits

Author SHA1 Message Date
Marcus Shawcroft 9959058932 [ARM] Factor out the thumb1 -Os implementation.
The patch moves the inline ASM thumb1 -O2 implementation out into its
own .S file.

Tested by building newlib and comparing libc.a binaries before and
after for all permutations of:

      Architectures:
        armv4 armv4t armv5 armv5t armv5te armv6 armv6j armv6k
        armv6z armv6kz armv6t2 armv6-m armv6s-m armv7 armv7-a
        armv7ve armv7-r armv7-m armv7e-m armv8-a iwmmxt iwmmxt2

      ISAs:
        thumb arm

      Optimization Levels:
        Os O2

      Excluding:
        armv6s-m -mthumb
        armv6-m -mthumb

        armv6zk -mthumb
        armv6z -mthumb
        armv6k -mthumb
        armv6j -mthumb
2015-11-13 11:54:28 +00:00
Marcus Shawcroft bcd5e8e3f9 [ARM] Adding strlen.S
The patch adds strlen.S to contain the complementary preprocessor
logic to strlen-stub.c intended to provide #inclusion of alternative
.S implementations.

Initially we just include the existing strlen-armv7.S implementation.

We rewrite _ISA_ARMV7 in both strlen.S and strlen-stub.c to use the
underlying existing underlying defintion from arm_asm.h in order to
avoide including that file, this is in effect the first step towards a
move to ACLE predefines only.

Tested by building newlib and comparing libc.a binaries before and
after for all permutations of:

      Architectures:
        armv4 armv4t armv5 armv5t armv5te armv6 armv6j armv6k
        armv6z armv6kz armv6t2 armv6-m armv6s-m armv7 armv7-a
        armv7ve armv7-r armv7-m armv7e-m armv8-a iwmmxt iwmmxt2

      ISAs:
        thumb arm

      Optimization Levels:
        Os O2

      Excluding:
        armv6s-m -mthumb
        armv6-m -mthumb

        armv6zk -mthumb
        armv6z -mthumb
        armv6k -mthumb
        armv6j -mthumb
2015-11-13 11:54:28 +00:00
Marcus Shawcroft 42de6f5085 [ARM] Rename strlen to strlen-stub.c
In order to maintain consistency both within machine/arm and between
machine/arm and machine/aarch64, rename the 'c' stub to -stub.c.

Tested by building newlib and comparing libc.a binaries before and
after for all permutations of:

      Architectures:
        armv4 armv4t armv5 armv5t armv5te armv6 armv6j armv6k
        armv6z armv6kz armv6t2 armv6-m armv6s-m armv7 armv7-a
        armv7ve armv7-r armv7-m armv7e-m armv8-a iwmmxt iwmmxt2

      ISAs:
        thumb arm

      Optimization Levels:
       Os O2

      Excluding:
        armv6s-m -mthumb
        armv6-m -mthumb

        armv6zk -mthumb
        armv6z -mthumb
        armv6k -mthumb
        armv6j -mthumb
2015-11-13 11:54:23 +00:00
Marcus Shawcroft 2c8e31d654 [ARM] Reorganize strlen selection.
Remove automake and autoconf selection of strchr implementation in
favour of conditional compilation in strlen.c.
2015-11-13 11:52:01 +00:00
Marcus Shawcroft 52f5864096 [ARM] Refactor strlen.c #if nesting.
This patch flattens the condition code selection used in strlen in an
attempt to make the guarding condition for each alternative
implementation clearer and to structure the logic in a manner that
makes it easier to maintain complementary logic between the
alternative 'C' and assembler implementations.

Tested by building newlib and comparing libc.a binaries before and
after for all permutations of:

  Architectures:
    armv4 armv4t armv5 armv5t armv5te armv6 armv6j armv6k
    armv6z armv6kz armv6t2 armv6-m armv6s-m armv7 armv7-a
    armv7ve armv7-r armv7-m armv7e-m armv8-a iwmmxt iwmmxt2

  ISAs:
    thumb arm

  Optimization Levels:
    Os O2

  Excluding:
    armv6s-m -mthumb
    armv6-m -mthumb

    armv6zk -mthumb
    armv6z -mthumb
    armv6k -mthumb
    armv6j -mthumb
2015-11-13 11:51:31 +00:00
Anton Kolesov 995a130bd9 Add Synopsys license for newlib and libgloss
ChangeLog:
2015-11-12  Anton Kolesov  <Anton.Kolesov@synopsys.com>

	* COPYING.LIBGLOSS: Add Synopsys license.
	* COPYING.NEWLIB: Likewise.
2015-11-12 14:16:32 +01:00
Anton Kolesov c0a99f0293 Add support for ARC to newlib
newlib/ChangeLog:
2015-11-12  Anton Kolesov  <Anton.Kolesov@synopsys.com>

	* configure.host: Add ARC support.
	* libc/include/machine/setjmp.h: Likewise.
	* libc/machine/configure: Likewise.
	* libc/machine/configure.in: Likewise.
	* libc/machine/arc/Makefile.am: Likewise.
	* libc/machine/arc/Makefile.in: Likewise.
	* libc/machine/arc/aclocal.m4: Likewise.
	* libc/machine/arc/asm.h: Likewise.
	* libc/machine/arc/configure: Likewise.
	* libc/machine/arc/configure.in: Likewise.
	* libc/machine/arc/memcmp-bs-norm.S: Likewise.
	* libc/machine/arc/memcmp-stub.c: Likewise.
	* libc/machine/arc/memcmp.S: Likewise.
	* libc/machine/arc/memcpy-archs.S: Likewise.
	* libc/machine/arc/memcpy-bs.S: Likewise.
	* libc/machine/arc/memcpy-stub.c: Likewise.
	* libc/machine/arc/memcpy.S: Likewise.
	* libc/machine/arc/memset-archs.S: Likewise.
	* libc/machine/arc/memset-bs.S: Likewise.
	* libc/machine/arc/memset-stub.c: Likewise.
	* libc/machine/arc/memset.S: Likewise.
	* libc/machine/arc/setjmp.S: Likewise.
	* libc/machine/arc/strchr-bs-norm.S: Likewise.
	* libc/machine/arc/strchr-bs.S: Likewise.
	* libc/machine/arc/strchr-stub.c: Likewise.
	* libc/machine/arc/strchr.S: Likewise.
	* libc/machine/arc/strcmp-archs.S: Likewise.
	* libc/machine/arc/strcmp-stub.c: Likewise.
	* libc/machine/arc/strcmp.S: Likewise.
	* libc/machine/arc/strcpy-bs-arc600.S: Likewise.
	* libc/machine/arc/strcpy-bs.S: Likewise.
	* libc/machine/arc/strcpy-stub.c: Likewise.
	* libc/machine/arc/strcpy.S: Likewise.
	* libc/machine/arc/strlen-bs-norm.S: Likewise.
	* libc/machine/arc/strlen-bs.S: Likewise.
	* libc/machine/arc/strlen-stub.c: Likewise.
	* libc/machine/arc/strlen.S: Likewise.
	* libc/machine/arc/strncpy-bs.S: Likewise.
	* libc/machine/arc/strncpy-stub.c: Likewise.
	* libc/machine/arc/strncpy.S: Likewise.
2015-11-12 14:14:17 +01:00
Anton Kolesov acdfcb0a0a Add support for ARC to libgloss
ChangeLog:
2015-11-12  Anton Kolesov  <Anton.Kolesov@synopsys.com>

	* configure.in: Add ARC support to libgloss.
	* configure: Regenerate.

libgloss/ChangeLog:
2015-11-12  Anton Kolesov  <Anton.Kolesov@synopsys.com>

	* configure: Add ARC support.
	* configure.in: Likewise.
	* arc/Makefile.in: Likewise.
	* arc/aclocal.m4: Likewise.
	* arc/configure: Likewise.
	* arc/configure.in: Likewise.
	* arc/crt0.S: Likewise.
	* arc/libcfunc.c: Likewise.
	* arc/nsim-syscall.h: Likewise.
	* arc/nsim-syscalls.c: Likewise.
	* arc/nsim.specs: Likewise.
	* arc/sbrk.c: Likewise.
2015-11-12 14:11:47 +01:00
Anton Kolesov e945a19cb2 Remove obsolete ARC system
ARC architecture specific files has been added ages ago in newlib/libc/sys,
but with invention of libgloss those files should be moved from newlib to
libgloss.

newlib/ChangeLog:
2015-11-12  Anton Kolesov  <Anton.Kolesov@synopsys.com>

	* configure.host: Remove ARC system.
	* libc/sys/configure: Likewise.
	* libc/sys/configure.in: Likewise.
	* libc/sys/arc/Makefile.am: Likewise.
	* libc/sys/arc/Makefile.in: Likewise.
	* libc/sys/arc/aclocal.m4: Likewise.
	* libc/sys/arc/configure: Likewise.
	* libc/sys/arc/configure.in: Likewise.
	* libc/sys/arc/crt0.S: Likewise.
	* libc/sys/arc/dummy.S: Likewise.
	* libc/sys/arc/isatty.c: Likewise.
	* libc/sys/arc/mem-layout.c: Likewise.
	* libc/sys/arc/sbrk.c: Likewise.
	* libc/sys/arc/sys/syscall.h: Likewise.
	* libc/sys/arc/syscalls.c: Likewise.
2015-11-12 14:03:05 +01:00
Marcus Shawcroft 332a6236a2 Fix multilib libgloss selection.
Regression testing newlib in conjunction with libgloss and
--enable-multilib can result in incompatible multilib versions of
newlib and libgloss being used during link.

This manifests on ARM target when newlib regression is run using a
GCC configured using --with-multilib-list=aprofile

With this configuration many of the multilib variants built are
mutually incompatible.

The issue is that the newlib dejagnu foo iterates each multilib
variant and correctly chooses the appropriate newlib variant but
always chooses the root/base libgloss variant.

The implementation of newlib/testsuite/lib/flags.exp contains the
following fragment:

set target_build_path "$objdir/$multibuildtop.."

The effect of this fragment is to explicitly select the root version
of libgloss, irrespective of the current multilib.

Digging around in VC it appears that the original implementation of
multlib magic came into the tree back in 2002 with:

6e9d950a (Thomas Fitzsimmons 2002-05-01 17:06:25 +0000 39)

In this initial version of multilib support, newlib was multilib
capable, but libgloss was not multilib capable, hence the necessity to
explicitly select the root libgloss version.

Subsequently flags.exp was modified to support out of tree testing:

cec1d3b4 (Jeff Johnston      2005-07-05 00:11:50 +0000 25)

This change is orthogonal to this issue, its effect is to exit early
in none multilib configurations.

Subsequently libgloss gained --enable-multilib support, the relevant
change is:

https://sourceware.org/ml/newlib/2006/msg00440.html
commit 00a4b31ad0
Author: Jeff Johnston <jjohnstn@redhat.com>
Date: Wed May 10 20:51:41 2006 +0000

This change enabled multilib support throughout libgloss, but ommitted
to adjust the flag.exp behaviour which anchors the libgloss multilib
selection to the base version.

The attached patch adjusts flags.exp to select the current multilib
variant of libgloss.

2015-11-06  Marcus Shawcroft  <marcus.shawcroft@arm.com>

        * testsuite/lib/flags.exp (libgloss_link_flags): Drop multilibtop
        from target_build_path.
2015-11-12 13:48:06 +01:00
Jon Turney 1129ef019f makedoc: Don't interpret license text as a command
Align makedoc's iscommand() with it's documentation, and don't allow commands to
contain a space.  A command is a line containing only a sequence of capital
letters or '_', followed by optional spaces.

This prevents "IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE" (the only line in the license text which consists of only
capitals and spaces, without any punctuation) from being interepreted as a
makedoc command, leading to:

"Can't find IMPLIED"
"warning, IMPLIED is not recognised"

being emitted by makedoc, (which is normally un-noticed because makedoc's stderr
is redirected to a .ref file)

2015-11-06  Jon Turney  <jon.turney@dronecode.org.uk>

	* doc/makedoc.c (iscommand): Only allow commands to have trailing
	spaces, not space separated words.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2015-11-12 12:42:19 +00:00
Jon Turney 81a7c8c37f doc: Fix some inconsistent QUICKREF lines
makedoc defines a command as 'all upper case, and alone on a line'.

A few QUICKREF lines currently violate this by having some additional text after
the QUICKREF.

So, currently, these lines are treated as an unknown command.

This is benign as QUICKREF currently does nothing but produce some ignored
output on stderr.  I'm not sure what the intent of QUICKREF is.

2015-11-06  Jon Turney  <jon.turney@dronecode.org.uk>

	* libm/mathfp/s_acos.c: Fix QUICKREF.
	* libm/mathfp/e_acosh.c: Ditto.
	* libm/math/w_asin.c: Ditto.
	* libm/mathfp/e_acosh.c: Ditto.
	* libm/mathfp/s_acos.c: Ditto.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2015-11-12 12:42:17 +00:00
Jon Turney 0c02db4d28 makedoc: Fix INTERNAL(|DEFINITION|FUNCTION) command definitions
The unused INTERNAL_DEFINITION, INTERNAL_FUNCTION and INTERNAL commands are
defined in terms of the non-existent built-in 'func'

This causes every single invocation of makedoc to output "Can't find func" three
times, as it parses doc.str.

This is normally un-noticed because makedoc's stderr is redirected to a .ref
file.

Fix these unused command definitions to something with equivalent lack of
effect, but without generating an error.

2015-11-06  Jon Turney  <jon.turney@dronecode.org.uk>

	* doc/doc.str: Fix INTERNAL_DEFINITION, INTERNAL_FUNCTION and
	INTERNAL.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2015-11-12 12:42:15 +00:00
Wilco Dijkstra 3c8636acf6 AArch64: Tune memcpy
* newlib/libc/machine/aarch64/memcpy.S (memcpy):
 	Further tuning for performance.
2015-11-12 13:38:39 +01:00
Corinna Vinschen 914620a7e6 flock: Fix hang in object collision case
* flock.cc (lockf_t::create_lock_obj): Correctly recreate lock object
	attributes anew in each loop.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-12 13:14:08 +01:00
Joseph Myers e6459123e4 Avoid .eh_frame in ARM newlib.
ARM newlib has various strcmp implementations that use .cfi_*
directives to generate unwind information.

The effect of this is that the generated objects contain .eh_frame
sections.  However, ARM uses its own unwind info format, not
.eh_frame, which is generated by ARM-specific directives, not .cfi_*.
The .eh_frame sections are useless, but also not removed by strip and
may be loaded into memory at runtime.

This patch fixes this by using .cfi_sections .debug_frame (as in
glibc) so that the directives generate .debug_frame instead.
.debug_frame is useful for the debugger, can be removed by strip, and
is not loaded into memory at runtime.

	* libc/machine/arm/strcmp-arm-tiny.S: Use .cfi_sections
	.debug_frame.
	* libc/machine/arm/strcmp-armv4.S: Likewise.
	* libc/machine/arm/strcmp-armv4t.S: Likewise.
	* libc/machine/arm/strcmp-armv6.S: Likewise.
	* libc/machine/arm/strcmp-armv6m.S: Likewise.
	* libc/machine/arm/strcmp-armv7.S: Likewise.
	* libc/machine/arm/strcmp-armv7m.S: Likewise.
2015-11-12 12:09:24 +00:00
Corinna Vinschen 4998ac4341 Add comment to explain previous patch
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-12 11:52:02 +01:00
Corinna Vinschen d03f429727 Fix crash at process init on 64 bit XP/2003 under WOW64
* init.cc (munge_threadfunc): Don't call NtQueryInformationThread with
	ThreadQuerySetWin32StartAddress info class on XP 64 and Server 2003 64.
	It crashes.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-12 11:48:30 +01:00
Corinna Vinschen 1968c57d9c Bump Cygwin DLL minor number
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-09 10:12:48 +01:00
Marcus Shawcroft d18f1fc8a3 Reorganize memchr selection.
The patch cleans up the auto configury mechanism used to select
different implementations of memchr for various architecture versions.

The approach here is to remove the selection of memchr within automake
and instead use complimentary logic in memchr-stub.c and memchr.S to
choose between the gerneric memchr.c implementation or one of the
architecture specific implementations.

This patch also changes the selection criteria inline with the
previous proposal here:

https://sourceware.org/ml/newlib/2015/msg00752.html

but using the ACLE predefines.

Regressed for armv7-a armv5 armv8-a, correct selection of memcpy
implementation by manual inspection of a test program built for these
three architectures.
2015-11-06 16:11:32 +00:00
Marcus Shawcroft 72be1dead4 Reorganize memcpy selection.
This patch cleans up the auto configury mechanism used to select
different implementations of memcpy for various architecture versions.

The approach here is to remove the selection of memcpy within automake
and instead use complimentary logic in memcpy-stub.c and memcpy.S to
choose between the generic memcpy.c implemenation or one of the
architecture specific memcpy*.S implemenations.

Regressed for armv7-a armv5 armv8-a, correct selection of memcpy
implementation by manual inspection of a test program built for these
three architectures.

This revised patch flips the remaining preprocessor logic in
memcpy-stub.c to use ACLE defines as requested in the previous review
and removes the now disused HAVE_ARMV7A and HAVE_ARMV8A configure.in
support.
2015-11-06 15:40:31 +00:00
Olivier Martin cdb1ebe107 Replace __attribute((__warning__())) by __attribute__((deprecated()))
Clang raises the warning message:
warning: unknown attribute '__warning__' ignored [-Wunknown-attributes]

	* libc/include/stdlib.h (mktemp): Change attribute to deprecated.
	(_mktemp_r): Ditto.

Signed-off-by: Olivier Martin <olivier@labapart.com>
2015-11-06 11:29:58 +01:00
Corinna Vinschen c56dc181f9 Fake volume serial number on filesystems not providing it
* mount.cc (fs_info::update): Fake a serial number on filesystems not
	providing one.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-05 18:34:34 +01:00
Corinna Vinschen 41299df081 Avoid deadlock in flock(2)
* fcntl.cc (fcntl64): Don't lock fd table when performing locking.
	* flock.cc (flock): Ditto.
	(lockf): Ditto.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-05 18:31:36 +01:00
Corinna Vinschen eeef727026 Fix iterating over pending signals if a signal doesn't have to be cleared
* sigproc.cc (pending_signals::clear): Yet another fix to fix the fix.
	Actually iterate over the list of pending signals even if there's a
	signal which doesn't have to be cleared.  Other than that, revert loop
	to it's former self as a while loop.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-05 10:09:08 +01:00
Corinna Vinschen 57d93bebb2 Accommodate trailing NUL in PrlSF filesystem name.
* globals.cc (ro_u_prlfs): Add trailing NUL.  Explain why.
	* mount.cc (fs_info::update): Add a comment to explain PrlSF.
	* path.h (path_conv::fs_is_prlfs): Add for symmetry.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-04 14:47:25 +01:00
Corinna Vinschen 58922d3125 Add missing release message for 68b4238f4a1276a1f6f18430580b62dfa0420ffd 2015-11-04 10:09:12 +01:00
Corinna Vinschen 0ed1523470 Fix potential endless loop in pending_signals::clear
* sigproc.cc (pending_signals::clear): Fix previous fix resulting in
	yet another endless loop.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-03 18:25:23 +01:00
Marcus Shawcroft 0a4019eed2 [ARM] Select appropriate memcpy implementation for ARMv8-a.
The newlib configury logic that detects architecture version and
chooses an appropriate memcpy implementation does not consider
ARMv8-a.

This patch adds configury logic to detect ARMv8-a along with the
associated changes in Makefile.am and memcpy.
2015-11-03 11:04:55 +00:00
Jeff Johnston 0631279394 Move duplicated documentation rules to Makefile.shared
- Also, harmonize libm to use CHEWOUT_FILES like libc, rather than chobj.
  Update documentation appropriately.

        * HOWTO: Update.
        * Makefile.shared: Move documentation rules to here...
        * libc/argz/Makefile.am: ... from here ...
        * libc/ctype/Makefile.am: ... and here.
        * libc/errno/Makefile.am: Ditto.
        * libc/iconv/Makefile.am: Ditto.
        * libc/iconv/ccs/Makefile.am : Ditto.
        * libc/iconv/ces/Makefile.am: Ditto.
        * libc/iconv/lib/Makefile.am: Ditto.
        * libc/locale/Makefile.am: Ditto.
        * libc/misc/Makefile.am: Ditto.
        * libc/posix/Makefile.am: Ditto.
        * libc/reent/Makefile.am: Ditto.
        * libc/search/Makefile.am: Ditto.
        * libc/stdio/Makefile.am: Ditto.
        * libc/stdio64/Makefile.am: Ditto.
        * libc/stdlib/Makefile.am : Ditto.
        * libc/string/Makefile.am: Ditto.
        * libc/syscalls/Makefile.am: Ditto.
        * libc/time/Makefile.am : Ditto.
        * libc/unix/Makefile.am: Ditto.
        * libc/xdr/Makefile.am: Ditto.
        * libm/common/Makefile.am: Ditto.
        * libm/complex/Makefile.am: Ditto.
        * libm/math/Makefile.am: Ditto.
        * libm/mathfp/Makefile.am: Ditto.
2015-11-02 18:02:39 -05:00
Jeff Johnston 53617ce4e6 Consistently use an em-dash in math functions.
- also move previous ChangeLog entry to newlib instead of top-level

        * libc/time/wcsftime.c: Consistently use an em-dash in FUNCTION
summary.
        * libm/common/isgreater.c: Ditto.
        * libm/common/s_fdim.c: Ditto.
        * libm/common/s_fma.c: Ditto.
        * libm/common/s_fmax.c: Ditto.
        * libm/common/s_fmin.c: Ditto.
        * libm/common/s_infinity.c: Ditto.
        * libm/common/s_isnan.c: Ditto.
        * libm/common/s_log2.c: Ditto.
        * libm/common/s_logb.c: Ditto.
        * libm/common/s_lrint.c: Ditto.
        * libm/common/s_lround.c: Ditto.
        * libm/common/s_nearbyint.c: Ditto.
        * libm/common/s_remquo.c: Ditto.
        * libm/common/s_rint.c: Ditto.
        * libm/common/s_round.c: Ditto.
        * libm/common/s_scalbn.c: Ditto.
        * libm/common/s_signbit.c: Ditto.
        * libm/common/s_trunc.c: Ditto.
        * libm/math/w_exp2.c: Ditto.
        * libm/math/w_gamma.c: Ditto.
2015-11-02 16:43:22 -05:00
Jeff Johnston 72e18faf62 Add missing semicolons to prototypes.
* libc/stdio/fseek.c: Add missing semicolons to prototypes in
        SYNOPSIS.
        * libc/stdio/fwide.c: Ditto.
        * libc/stdio64/fseeko64.c: Ditto.
        * libc/string/strtok.c: Ditto.
        * libc/string/wcstok.c: Ditto.
        * libm/math/w_cosh.c: Ditto.
        * libm/math/w_fmod.c:  Ditto.
        * libm/mathfp/s_cosh.c: Ditto.
        * libm/mathfp/s_fmod.c: Ditto.
2015-11-02 16:34:49 -05:00
Steve Ellcey 5045532322 Improve performance of MIPS memcpy.
* libc/machine/mips/memcpy.S (memcpy): Add word copies for small
	aligned data.
2015-11-02 13:30:19 -08:00
Corinna Vinschen 7321662bb0 Define MAX_IPOPTLEN
* include/netinet/ip.h (MAX_IPOPTLEN): Define.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-02 15:42:30 +01:00
Corinna Vinschen 90b9303f0b Fix incorrect implementation to clear per-thread pending signals
* sigproc.cc (class pending_signals): Drop sigproc_init friendship.
	(pending_signals::clear): Fix implementation to avoid subsequent
	endless loop in wait_sig.  Improve comment.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-02 13:54:30 +01:00
Corinna Vinschen df6206aa56 Add support for Parallels Desktop FS (prlfs)
* mount.h (enum fs_info_type): Add prlfs (Parallels Desktop FS).
	(class fs_info): Add has_broken_fnoi flag.  Implement prlfs FS flag.
	* mount.cc (fs_info::update): Handle PrlFS.  Fill new has_broken_fnoi
	flag with life.
	(fs_names): Add prlfs.
	* globals.cc (ro_u_prlfs): Define.
	* path.h (path_conv::has_broken_fnoi): New method.
	* path.cc (symlink_info::check): Call file_get_fnoi utilizing new
	has_broken_fnoi filesystem flag.
	* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Ditto.

	* new-features.xml (ov-new2.3): Document Parallels Desktop FS support.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-02 12:08:25 +01:00
Corinna Vinschen 7ac60f6ceb Add missing ChangeLog entry for ce8159d5 2015-11-02 10:24:14 +01:00
Sebastian Huber ce8159d5ce Include <sched.h> in <pthread.h>
This is mandated by POSIX.

2015-10-30  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	libc/include/pthread.h: Include <sched.h> instead of
	<sys/sched.h>.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-10-30 20:28:00 +01:00
Corinna Vinschen 677eea00a6 Workaround bug in LocaleNameToLCID on Windows 10
* nlsfuncs.cc (__get_lcid_from_locale): Handle LocaleNameToLCID
	returning LOCALE_CUSTOM_UNSPECIFIED instead of failing in case of
	an unsupported locale on Windows 10.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-10-30 20:13:26 +01:00
Corinna Vinschen 4a407e9037 Avoid double unlock of TLS mutex
* exceptions.cc (sigpacket::process): Avoid potentially double unlocking
	the TLS mutex.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-10-30 17:21:30 +01:00
Corinna Vinschen 8f97c045b8 Fix sigwait and pthread_kill return values in case of error
* signal.cc (sigwait): Fix return value to reflect errno in case of
	error according to POSIX.  Never return EINTR.
	* thread.cc (pthread_kill): Return errno if sig_send failed.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-10-30 16:05:43 +01:00
Qian Hong ff3c4a7d2f Check for correct funtion entry address in munge_threadfunc
* init.cc (munge_threadfunc): Check that we're actually replacing
	the correct original function address on the stack.
	* ntdll.h (enum _THREADINFOCLASS): Add ThreadQuerySetWin32StartAddress.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-10-29 09:17:57 +01:00
Jon Turney e30d78d685 Remove spurious execute permissions from some Cygwin source and text files
2015-08-21  Jon Turney  <jon.turney@dronecode.org.uk>

	* cygwin-cxx.h: Remove execute permissions.
	* fenv.cc: Ditto.
	* how-startup-shutdown-works.txt: Ditto.
	* include/arpa/nameser.h: Ditto.
	* include/arpa/nameser_compat.h: Ditto.
	* include/fenv.h: Ditto.
	* include/resolv.h: Ditto.
	* libstdcxx_wrapper.cc: Ditto.

2015-10-27  Jon Turney  <jon.turney@dronecode.org.uk>

	* winsup.api/signal-into-win32-api.c: Remove execute permissions.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2015-10-27 16:10:37 +00:00
Brian Inglis 6090952296 strftime: Add support for %s (seconds since epoch)
* libc/time/strftime.c (__strftime): add support for %s (seconds from
	Unix epoch).  Fix whitespaces.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-10-27 09:41:40 +01:00
Corinna Vinschen cf51db8baa Clear pending signals targeting exiting thread
* cygtls.cc (_cygtls::remove): Call remove_pending_sigs.
	* cygtls.h (_cygtls::remove_pending_sigs): Declare.
	* sigproc.cc (pending_signals::clear): Define new method taking a
	_cygtls pointer argument.  Drop pending signals for that thread.
	(_cygtls::remove_pending_sigs): Call pending_signals::clear for this
	thread.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-10-23 14:30:40 +02:00
Yaakov Selkowitz 505812d042 winsup/utils: add CPU cache variables to getconf(1)
* getconf.c (conf_table): Add LEVEL*_CACHE_* variables.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2015-10-22 12:51:20 -05:00
Corinna Vinschen 6b457615e6 Export aligned_alloc, at_quick_exit, quick_exit.
* common.din (aligned_alloc): Export.
	(at_quick_exit): Export.
	(quick_exit): Export.

	* posix.xml (std-iso): New section.
	(std-deprec): Rearrange title text.
	* new-features.xml (ov-new2.3): Document aligned_alloc, at_quick_exit,

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-10-22 16:21:17 +02:00
Corinna Vinschen e01381afde Avoid SEGV when handling SIDs with 0 subauthorities
* sec_helper.cc (cygsid::get_sid): Don't reject SIDs with missing
	subauthorities.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-10-22 15:38:42 +02:00
Corinna Vinschen 6599fad55d Add release message for previous Cygwin patch 2015-10-22 15:35:46 +02:00
Corinna Vinschen ef75017378 Fix length returned from sys_cp_wcstombs in case nwc > # of wchars
* strfuncs.cc (sys_cp_wcstombs): Always return number of multibytes
	without trailing NUL as the documentation implies.  Throughout Cygwin,
	fix usage to align to this pattern.
	* fhandler_process.cc (format_process_winexename): Drop trailing NUL
	and LF from output.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-10-22 14:22:07 +02:00