]> sourceware.org Git - newlib-cygwin.git/log
newlib-cygwin.git
9 years agoflock.cc: Fix stack allocation from callee used in caller
Corinna Vinschen [Tue, 8 Sep 2015 08:57:54 +0000 (10:57 +0200)]
flock.cc: Fix stack allocation from callee used in caller

* flock.cc (lockf_t::create_lock_obj_attr): Add buffer parameter.
Call _everyone_sd with buffer argument from caller rather than
everyone_sd with locally allocated stack buffer.
(lockf_t::create_lock_obj): Call create_lock_obj_attr only once
outside the loop and with additional buffer argument.
(lockf_t::open_lock_obj): Call create_lock_obj_attr with additional
buffer argument.

9 years agofaq-using.xml: Replace makewhatis with mandb
Corinna Vinschen [Mon, 7 Sep 2015 11:55:21 +0000 (13:55 +0200)]
faq-using.xml: Replace makewhatis with mandb

* faq-using.xml (faq.using.man): Replace makewhatis with mandb.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoAdd FTDI license for newlib and libgloss.
Jeff Johnston [Fri, 4 Sep 2015 18:41:45 +0000 (14:41 -0400)]
Add FTDI license for newlib and libgloss.

9 years agoAdd support for ft32 to newlib.
Jeff Johnston [Fri, 4 Sep 2015 17:17:53 +0000 (13:17 -0400)]
Add support for ft32 to newlib.

9 years agoAdd support for FT32 platform.
Jeff Johnston [Fri, 4 Sep 2015 17:07:00 +0000 (13:07 -0400)]
Add support for FT32 platform.

9 years agolibc/machine/cris/sys/signal.h (kill): Declare.
Hans-Peter Nilsson [Wed, 2 Sep 2015 23:59:43 +0000 (01:59 +0200)]
libc/machine/cris/sys/signal.h (kill): Declare.

9 years agocygcheck.cc: Fix missing commas in products array
Corinna Vinschen [Sun, 30 Aug 2015 19:46:58 +0000 (21:46 +0200)]
cygcheck.cc: Fix missing commas in products array

* cygcheck.cc (dump_sysinfo): Fix missing commas in products array.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agocygcheck.cc: Fix debugger problem
Corinna Vinschen [Sun, 30 Aug 2015 19:35:23 +0000 (21:35 +0200)]
cygcheck.cc: Fix debugger problem

        * cygcheck.cc (load_cygwin): Only unload cygwin DLL if not running
        under a debugger.  Explain why.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agocygcheck.cc: Handle W10/2016 sysinfo
Corinna Vinschen [Sun, 30 Aug 2015 19:34:24 +0000 (21:34 +0200)]
cygcheck.cc: Handle W10/2016 sysinfo

        * cygcheck.cc (dump_sysinfo): Correctly handle Windows 10/Server 2016.
        Add missing product types.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agocygcheck.cc: Fix downlevel DLL handling
Corinna Vinschen [Sun, 30 Aug 2015 19:32:56 +0000 (21:32 +0200)]
cygcheck.cc: Fix downlevel DLL handling

        * cygcheck.cc (track_down): Skip error output for "api-ms-win-"
        downlevel DLLs.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agosysconf.cc: Fix compiler warning.
Corinna Vinschen [Sat, 29 Aug 2015 07:32:00 +0000 (09:32 +0200)]
sysconf.cc: Fix compiler warning.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoAllow sysconf to return CPU cache information
Corinna Vinschen [Sat, 29 Aug 2015 07:16:47 +0000 (09:16 +0200)]
Allow sysconf to return CPU cache information

        * include/sys/unistd.h (_SC_LEVEL*): Add cache-related variables as
        on Linux.

        * fhandler_proc.cc (format_proc_cpuinfo): Fetch cache information
        from new cache functions in sysconf.cc, get_cpu_cache_intel and
        get_cpu_cache_amd.
        * sysconf.cc (__nt_query_system): New local helper.
        (get_nproc_values): Utilize __nt_query_system on pre-Windows 7 systems.
        Use GetLogicalProcessorInformationEx otherwise to handle more than
        64 CPUs.  Only handle _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLN.
        (get_phys_pages): New helper to handle _SC_PHYS_PAGES.
        (cpuid2_cache_descriptor): New array to map Intel CPUID 2 descriptor
        values to cache type, cache size, associativity and linesize.
        (cpuid2_cache_desc_compar): Comparision function for bsearch over
        cpuid2_cache_descriptor.
        (get_cpu_cache_intel_cpuid2): New function to fetch cache info from
        Intel CPUID 2.
        (get_cpu_cache_intel_cpuid4): Ditto from Intel CPUID 4.
        (get_cpu_cache_intel): New function as CPU-specific entry point.
        (assoc): New array to map associativity values from AMD CPUID
        0x80000006.
        (get_cpu_cache_amd): New function to fetch cache info from AMD CPUIDs
        0x80000005 and 0x80000006.
        (get_cpu_cache): New function to fetch cache info.
        (sca): Call get_phys_pages if _SC_PHYS_PAGES is requested.  Call
        get_cpu_cache for new _SC_* cache requests.
        (SC_MAX): Set to _SC_LEVEL4_CACHE_LINESIZE.
        (get_phys_pages(void)): Call get_phys_pages(int).
        * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.

        * new-features.xml (ov-new2.3): Document sysconf cache addition.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoImplement POSIX_MADV_WILLNEED/POSIX_MADV_DONTNEED for newer OSes
Corinna Vinschen [Thu, 27 Aug 2015 11:34:10 +0000 (13:34 +0200)]
Implement POSIX_MADV_WILLNEED/POSIX_MADV_DONTNEED for newer OSes

        * autoload.cc (DiscardVirtualMemory): Import.
        (PrefetchVirtualMemory): Import.
        * mmap.cc (posix_madvise): Actually implement POSIX_MADV_WILLNEED
        utilizing PrefetchVirtualMemory and POSIX_MADV_DONTNEED utilizing
        DiscardVirtualMemory on systems supporting them.
        * wincap.h (wincaps::has_broken_prefetchvm): New element.
        * wincap.cc: Implement above element throughout.
        (wincapc::init): Make sure has_broken_prefetchvm is only true on
        W10 under WOW64.
        * include/cygwin/version.h (CYGWIN_VERSION_DLL_MAJOR): Bump to 2003.
        (CYGWIN_VERSION_API_MINOR): Reset to 0.

        * new-features.xml (ov-new2.3): New section, document posix_madvise
        POSIX_MADV_WILLNEED/POSIX_MADV_DONTNEED change.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agostrlen-armv7.S: Fix preprocessor check
Corinna Vinschen [Thu, 27 Aug 2015 10:55:22 +0000 (12:55 +0200)]
strlen-armv7.S: Fix preprocessor check

Hi!

I've got the situation, that the function strlen() occurs twice in libc.a
(building newlib for ARM-V7a and Size-Optimized).

In newlib/libc/machine/arm/strlen.c there are the pre-processor stetements ...
#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) || \
  (defined (__thumb__) && !defined (__thumb2__))
/*...*/
#else

#if !(defined(_ISA_ARM_7) || defined(__ARM_ARCH_6T2__))
/*...*/
#endif

and in newlib/libc/machine/arm/strlen-armv7.S the "exclude" begins with

/* NOTE: This ifdef MUST match the ones in arm/strlen.c
   We fallback to the one in arm/strlen.c for size optimised or
   for older architectures. */
#if defined(_ISA_ARM_7) || defined(__ARM_ARCH_6T2__) && \
    !(defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) || \
      (defined (__thumb__) && !defined (__thumb2__)))

But this is not completely contrary to arm/strlen.c (see above)!

To fix the logical statement in arm/strlen-armv7.S there are parentheses needed

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoFix for pri and scn formats
Andre Simoes Dias Vieira [Thu, 27 Aug 2015 10:50:25 +0000 (11:50 +0100)]
Fix for pri and scn formats

9 years agofhandler_proc.cc: Only request group relation information
Corinna Vinschen [Wed, 26 Aug 2015 16:39:53 +0000 (18:39 +0200)]
fhandler_proc.cc: Only request group relation information

        * fhandler_proc.cc (format_proc_cpuinfo): Only fetch group relations,
        we don't need anything else.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agowinsup.h: Claim Windows 10 support
Corinna Vinschen [Tue, 25 Aug 2015 20:23:01 +0000 (22:23 +0200)]
winsup.h: Claim Windows 10 support

        * winsup.h (_WIN32_WINNT): Set to 0x0a00 for Windows 10.
        (WINVER): Ditto.  Remove outdated comment.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoautoload.cc: Drop using full paths for system DLLs
Corinna Vinschen [Tue, 25 Aug 2015 20:17:03 +0000 (22:17 +0200)]
autoload.cc: Drop using full paths for system DLLs

System DLLs are always first in the DLL search order so
http://www.microsoft.com/technet/security/advisory/2269637.mspx
doesn't apply for them.

        * autoload.cc (std_dll_init): Revert using full paths to system DLLs.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoautload.cc: Avoid clobbering return address in noload on i686
Corinna Vinschen [Tue, 25 Aug 2015 20:15:22 +0000 (22:15 +0200)]
autload.cc: Avoid clobbering return address in noload on i686

This fixes a long-standing problem when GetProcAddress fails
to load a function.  The noload code calls SetLastError on
i686 without saving the edx register.  Starting with Windows 7,
SetLastError apparently uses $edx and the register is set to
0x00000000 on return.  So the subsequent `jmp *$edx' in noload
supposed to return to the caller, actually jumps to address NULL,
which results in a SEGV.

        * autoload.cc (noload): i686 only: Save and restore $edx when calling
        SetLastError to avoid clobbering return address stating with Windows 7.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agommap.cc: Fix some comments
Corinna Vinschen [Tue, 25 Aug 2015 20:02:35 +0000 (22:02 +0200)]
mmap.cc: Fix some comments

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoUpdated copyright notice
Andre Vieira [Fri, 21 Aug 2015 08:24:39 +0000 (09:24 +0100)]
Updated copyright notice

Update the ARM copyright notice to include 2015.

2015-08-20  Andre Vieira  <andre.simoesdiasvieira@arm.com>
         * COPYING.NEWLIB: Updated ARM's copyright notice.

From 913be92b12851bc6285b8ab77d6878fda613f77c Mon Sep 17 00:00:00 2001
From: Andre Simoes Dias Vieira <andsim01@arm.com>
Date: Thu, 20 Aug 2015 14:16:42 +0100
Subject: [PATCH] Updated general Copyright notice

9 years agoAlways declare "kill" in include/sys/signal.h
James Greenhalgh [Tue, 25 Aug 2015 13:31:11 +0000 (14:31 +0100)]
Always declare "kill" in include/sys/signal.h

Hi,

As I mentioned recently [1], newlib is providing a "kill" symbol to link
against, without declaring "kill" in signal.h. This is confusing for the
libgfortran build, which tries to link against kill (which succeeds), then
tries to use it (which triggers -Werror=implicit-function-declaration).

This patch implements my suggestion in that thread - making the declaration
of 'kill' in libc/include/sys/signal.h unconditional.

I've tested this by building a modified libgfortran on AArch64/ARM to see
that the Werror goes away, and the libgfortran build succeeds.

Is something like this OK for newlib? If so, can someone please commit
it on my behalf, as I have no commit access here.

Otherwise, what is your preferred direction for me to take this patch?

Thanks,
James

9 years agoSigproc.cc: Fix copyright. newlib-snapshot-20150824
Corinna Vinschen [Mon, 24 Aug 2015 17:09:16 +0000 (19:09 +0200)]
Sigproc.cc: Fix copyright.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoFix hang stracing forking processes but not following child
Corinna Vinschen [Mon, 24 Aug 2015 16:37:53 +0000 (18:37 +0200)]
Fix hang stracing forking processes but not following child

        * ntdll.h (PROCESSINFOCLASS): Define ProcessDebugFlags.
        * sigproc.cc (child_info::child_info): Only propagate _CI_STRACED to
        child if strace is actually tracing child processes.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoBump Cygwin DLL minor number.
Corinna Vinschen [Mon, 24 Aug 2015 16:35:49 +0000 (18:35 +0200)]
Bump Cygwin DLL minor number.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agooops - forgot to add PR number to ChangeLog entry.
Nick Clifton [Mon, 24 Aug 2015 09:05:19 +0000 (10:05 +0100)]
oops - forgot to add PR number to ChangeLog entry.

9 years agoAdd Lavasoft Web Companion to BLODA list.
Jon TURNEY [Tue, 18 Aug 2015 16:24:10 +0000 (17:24 +0100)]
Add Lavasoft Web Companion to BLODA list.

2015-08-18  Jon Turney  <jon.turney@dronecode.org.uk>

* faq-using.xml (faq.using.bloda): Add Lavasoft Web Companion to
BLODA list.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
9 years ago * msp430/crt0.S: Remove watchdog disabling code.
Nick Clifton [Thu, 20 Aug 2015 16:19:49 +0000 (17:19 +0100)]
* msp430/crt0.S: Remove watchdog disabling code.

9 years agoManuals failing to build on Ubuntu LTS 14.04 cygwin-2_2_1-release
Jon TURNEY [Tue, 11 Aug 2015 13:55:23 +0000 (14:55 +0100)]
Manuals failing to build on Ubuntu LTS 14.04

On 11/08/2015 11:08, Andre Vieira wrote:
> On 10/08/15 14:38, Jon TURNEY wrote:
>> On 07/08/2015 11:13, Andre Vieira wrote:
>>> Building the manuals on Ubuntu LTS 14.04 (64-bit) using pdfTeX
>>> 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) is failing with the
>>> following error:
>>> "Transcript written on libc.log.
>>> /usr/bin/texi2dvi: pdfetex exited with bad status, quitting."
>>>
>>> libc.log complaints about the following:
>>>
>>> You can't use `@unskip' in vertical mode.
>>>
[...]
>>>
>>> This code has been around for a while, so it might have to do with a
>>> change in pdfTex?

So it seems this problem has been around for a while, and looks like it
is due to a change in texi2dvi in texinfo 5.0 or late 4.x, see [1].

I guess it's not very noticeable since it only occurs when doing 'make
dvi', which doesn't happen by default.

Attached is a different and perhaps cleaner workaround to the one in
that thread.

[1] https://sourceware.org/ml/newlib/2013/msg00057.html

From 4d386b5900b6c68e022004b447faa696be5ff8c7 Mon Sep 17 00:00:00 2001
From: Jon TURNEY <jon.turney@dronecode.org.uk>
Date: Tue, 11 Aug 2015 14:46:39 +0100
Subject: [PATCH] Use '@sp 1' rather than '@*' to workaround a change in
 texi2dvi.

Since about TexInfo 5.0, using '@*' immediately after a table causes a 'You
can't use `@unskip' in vertical mode' error.

See https://sourceware.org/ml/newlib/2013/msg00057.html

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
9 years agoAdd MIN MAX macro to param header file.
Andre Vieira [Fri, 31 Jul 2015 09:29:08 +0000 (10:29 +0100)]
Add MIN MAX macro to param header file.

newlib/ChangeLog:
2015-07-28  Andre Vieira  <andre.simoesdiasvieira@arm.com>

   * libc/sys/arm/sys/param.h (MIN,MAX): Define.

From 536ca7365d269f5e56679048e336d6969186d550 Mon Sep 17 00:00:00 2001
From: Andre Simoes Dias Vieira <andsim01@arm.com>
Date: Tue, 28 Jul 2015 14:19:08 +0100
Subject: [PATCH] Added min max macros

9 years agoUse machine header file for endianness configuration.
Andre Vieira [Fri, 31 Jul 2015 09:28:51 +0000 (10:28 +0100)]
Use machine header file for endianness configuration.

newlib/ChangeLog:
2015-07-28  Andre Vieira  <andre.simoesdiasvieira@arm.com>

   * libc/sys/arm/sys/param.h (BIG_ENDIAN, LITTLE_ENDIAN): Moved
   to machine/endian.h.
   * libc/machine/arm/machine/param.h (BYTE_ORDER): Idem.
   * libc/machine/arm/machine/endian.h: New.

From ca6efccda91bc6b620b7d96a466b0f1e2f02cfeb Mon Sep 17 00:00:00 2001
From: Andre Simoes Dias Vieira <andsim01@arm.com>
Date: Tue, 28 Jul 2015 12:16:20 +0100
Subject: [PATCH 2/2] Move endianness configuration to machine/endian.h

9 years agoUse machine header file for param configuration.
Andre Vieira [Wed, 5 Aug 2015 12:22:43 +0000 (13:22 +0100)]
Use machine header file for param configuration.

On 31/07/15 10:34, Richard Earnshaw wrote:
> On 31/07/15 10:28, Andre Vieira wrote:
>> newlib/ChangeLog:
>> 2015-07-28  Andre Vieira  <andre.simoesdiasvieira@arm.com>
>>
>>    * libc/sys/arm/sys/param.h: Include machine/param.h
>>    (HZ, NOFILE, PATHSIZE): Define.
>>
>> param_refactor_1.patch
>>
>>
>>  From abc2d5f3398721f6ca891b9581feaba58730b19c Mon Sep 17 00:00:00 2001
>> From: Andre Simoes Dias Vieira <andsim01@arm.com>
>> Date: Tue, 28 Jul 2015 12:10:59 +0100
>> Subject: [PATCH 1/2] Moved param configuration to machine/param.h
>>
>> ---
>>   newlib/libc/sys/arm/sys/param.h | 12 ++++++++++--
>>   1 file changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/newlib/libc/sys/arm/sys/param.h b/newlib/libc/sys/arm/sys/param.h
>> index adc066e9a8756e07edaaa8cadc79b5f05c996ac9..622c371972ab3c9dbb93ea5c51323a593e2a171a 100644
>> --- a/newlib/libc/sys/arm/sys/param.h
>> +++ b/newlib/libc/sys/arm/sys/param.h
>> @@ -3,9 +3,17 @@
>>   #ifndef _SYS_PARAM_H
>>   # define _SYS_PARAM_H
>>
>> -# define HZ (100)
>> -# define NOFILE (60)
>> +#include <machine/param.h>
>> +
>> +#ifndef HZ
>> +# define HZ (60)
>
> Why have you changed the value for HZ?  It seems that, by convention,
> ARM boards have always used 100.
>
> R.
>
>> +#endif
>> +#ifndef NOFILE
>> +# define NOFILE>(60)
>> +#endif
>> +#ifndef PATHSIZE
>>   # define PATHSIZE (1024)
>> +#endif
>>
>>   #define BIG_ENDIAN      4321
>>   #define LITTLE_ENDIAN   1234
>>
>
Hi Richard,

ARM's machine/param.h that is included in "#include <machine/param.h>",
before the 'ifndef' already defines HZ to be 100. This file was already
there, it was just not being used. I understand that this 'ifndef' might
be confusing, though I decided to add it to mimic the behavior of the
default sys/param.h.

There is however an unrelated issue with this patch, a typo in the
"#define NOFILE" that crept in there due to some copy pasting when
splitting the patch.

Here is a fixed version.

BR,
Andre

newlib/ChangeLog:
2015-07-28  Andre Vieira  <andre.simoesdiasvieira@arm.com>

   * libc/sys/arm/sys/param.h: Include machine/param.h
   (HZ, NOFILE, PATHSIZE): Define.

From abc2d5f3398721f6ca891b9581feaba58730b19c Mon Sep 17 00:00:00 2001
From: Andre Simoes Dias Vieira <andsim01@arm.com>
Date: Tue, 28 Jul 2015 12:10:59 +0100
Subject: [PATCH 1/2] Moved param configuration to machine/param.h

9 years agoCygwin: Return port number from getservent in network byte order
Corinna Vinschen [Tue, 18 Aug 2015 11:12:07 +0000 (13:12 +0200)]
Cygwin: Return port number from getservent in network byte order

        * netdb.cc (parse_services_line): Convert port number to network byte
        order.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoexceptions.cc: Drop including ucontext.h.
Corinna Vinschen [Tue, 18 Aug 2015 09:09:25 +0000 (11:09 +0200)]
exceptions.cc: Drop including ucontext.h.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agosys/signal.h: include sys/ucontext.h on Cygwin per POSIX.1-2008
Yaakov Selkowitz [Tue, 18 Aug 2015 02:46:19 +0000 (21:46 -0500)]
sys/signal.h: include sys/ucontext.h on Cygwin per POSIX.1-2008

* libc/include/sys/signal.h [__CYGWIN__]: include <sys/ucontext.h>
if compiling for POSIX.1-2008.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
9 years agoDon't call LsaLookupSids if we're not utilizing Windows account DBs
Corinna Vinschen [Mon, 17 Aug 2015 20:45:02 +0000 (22:45 +0200)]
Don't call LsaLookupSids if we're not utilizing Windows account DBs

        * grp.cc (internal_getgrfull): Drop asking caches.  Explain why.
        (internal_getgroups): In case we're not utilizing the Windows account
        DBs, don't call LsaLookupSids but iterate over the group SIDs in the
        token and call internal_getgrsid for each of them.  Explain why.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoTry harder to avoid LDAP access for RFC2307 mapping
Corinna Vinschen [Mon, 17 Aug 2015 18:24:49 +0000 (20:24 +0200)]
Try harder to avoid LDAP access for RFC2307 mapping

        * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Rearrange
        to fall back to myself uid/gid in case we don't utilize Windows
        account DBs, just as prior to 1.7.34.
        * sec_helper.cc (cygpsid::get_id): Disable Samba user/group mapping per
        RFC2307 if we're not utilizing Windows account DBs.
        * security.cc (convert_samba_sd): Revert previous patch.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoFix /proc/cpuinfo topology info on newer AMD CPUs
Corinna Vinschen [Mon, 17 Aug 2015 14:35:41 +0000 (16:35 +0200)]
Fix /proc/cpuinfo topology info on newer AMD CPUs

        * fhandler_proc.cc (format_proc_cpuinfo): Handle AMDs providing
        extended topology info in CPUID leaf 0x8000001e.  Fix handling of
        AMD CPUs providing extended legacy core info in CPUID leaf 0x80000008.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agomkglobals_h: Handle CRLF earlier.
Orgad Shaneh [Mon, 17 Aug 2015 09:05:20 +0000 (11:05 +0200)]
mkglobals_h: Handle CRLF earlier.

When globals.cc has CRLF line endings, winsup.h is not removed, and
compilation fails for duplicate definitions.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoSupport cpb and eff_freq_ro power mgmt flags in /proc/cpuinfo
Corinna Vinschen [Mon, 17 Aug 2015 08:04:33 +0000 (10:04 +0200)]
Support cpb and eff_freq_ro power mgmt flags in /proc/cpuinfo

        * fhandler_proc.cc (format_proc_cpuinfo): Print cpb and eff_freq_ro
        power management flags.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoCygwin: Improve 2.2.1 release notes
Corinna Vinschen [Sat, 15 Aug 2015 11:32:31 +0000 (13:32 +0200)]
Cygwin: Improve 2.2.1 release notes

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoCygwin: Try to fix potential data corruption in pipe write
Corinna Vinschen [Sat, 15 Aug 2015 10:30:09 +0000 (12:30 +0200)]
Cygwin: Try to fix potential data corruption in pipe write

        * fhandler.cc (fhandler_base_overlapped::raw_write): When performing
        nonblocking I/O, copy user space data into own buffer.  Add longish
        comment to explain why.
        * fhandler.h (fhandler_base_overlapped::atomic_write_buf): New member.
        (fhandler_base_overlapped::fhandler_base_overlapped): Initialize
        atomic_write_buf.
        (fhandler_base_overlapped::fhandler_base_overlapped): New destructor,
        free'ing atomic_write_buf.
        (fhandler_base_overlapped::copyto): Set atomic_write_buf to NULL in
        copied fhandler.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoFix copy/paste error in previous patch
Corinna Vinschen [Fri, 14 Aug 2015 19:55:42 +0000 (21:55 +0200)]
Fix copy/paste error in previous patch

        * security.cc (convert_samba_sd): Fix copy/paste error in previous
patch.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoDon't perform RFC2307 account mapping without account DB
Corinna Vinschen [Fri, 14 Aug 2015 19:41:37 +0000 (21:41 +0200)]
Don't perform RFC2307 account mapping without account DB

        * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Only try
        to map user and group info per RFC2307 if account info is fetched
        from Windows account DB.
        (convert_samba_sd): Ditto.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoEvaluate all group perms in ACL to emulate POSIX user perms
Corinna Vinschen [Fri, 14 Aug 2015 08:10:34 +0000 (10:10 +0200)]
Evaluate all group perms in ACL to emulate POSIX user perms

        * security,cc (get_attribute_from_acl): Merge all group perms into
        user perms if user is member of group.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoFix /proc/cpuinfo topology and cache size info
Corinna Vinschen [Thu, 13 Aug 2015 15:59:47 +0000 (17:59 +0200)]
Fix /proc/cpuinfo topology and cache size info

        * autoload.cc (GetLogicalProcessorInformationEx): Import.
        (SetThreadGroupAffinity): Import.
        * fhandler_proc.cc (add_size): New macro.
        (get_msb): New inline function.
        (mask_bits): Ditto.
        (format_proc_cpuinfo): Drop handling of old CPUs.  Check if we're
        running on a OS version supporting porcessor groups.  If so, use
        SetThreadGroupAffinity to set thread affinity.  Improve cache info
        to include 3rd level cache on Intel CPUs.  Improve multi core info.
        * wincap.h (wincaps::has_processor_groups): New element.
        * wincap.cc: Implement above element throughout.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agomiscfuncs.cc: Fix comment preceeding x86_64 memset and friends.
Corinna Vinschen [Mon, 10 Aug 2015 10:07:22 +0000 (12:07 +0200)]
miscfuncs.cc: Fix comment preceeding x86_64 memset and friends.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoRevert to leaving $HOME alone
Corinna Vinschen [Mon, 10 Aug 2015 10:00:12 +0000 (12:00 +0200)]
Revert to leaving $HOME alone

* uinfo.cc (cygheap_user::ontherange): Revert previous patch.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoor1k: Typo fixes
Jeff Johnston [Fri, 7 Aug 2015 18:55:49 +0000 (14:55 -0400)]
or1k: Typo fixes

  Wrong paranthesis and an incorrect symbol name are fixed.

          * or1k/boards/optimsoc.S: Fix symbol name
          * or1k/crt0.S: Remove paranthesis

9 years agoor1k: Allow exception nesting
Jeff Johnston [Fri, 7 Aug 2015 18:52:07 +0000 (14:52 -0400)]
or1k: Allow exception nesting

    Allow exceptions to be nested, which is especially useful with urgent
    interrupts while processing an exception.

    The implementation counts up the nesting level with each call to an
    exception. In the outer exception (level 1), the exception stack is
    started. All nested exceptions just reserve the redzone (scratch
    memory that may be used by compiler) and exception context on the
    stack, but then process on the same scratch.

    Restriction: Impure pointers are shared among all exceptions. This may
    be solved by creating an impure data structure in the stack frame with
    each nested exception.

       * or1k/crt0.S: Add exception nesting
       * or1k/exceptions-asm.S: ditto
       * or1k/util.c: ditto

9 years agoor1k: Fix critical handling in malloc locks
Jeff Johnston [Fri, 7 Aug 2015 18:49:16 +0000 (14:49 -0400)]
or1k: Fix critical handling in malloc locks

    Only on first call to the recursive malloc lock the restore value of
    exception enable fields is stored.

       * libc/sys/or1k/mlock.c: Fix exception enable saving

9 years agoor1k: Make heap end globally visible
Jeff Johnston [Fri, 7 Aug 2015 18:43:38 +0000 (14:43 -0400)]
or1k: Make heap end globally visible

    Boards may change the initial value from _end to another value.

           * or1k/sbrk.c: Make heap end globally visible

9 years agoImprove FAQ answer on debugging Cygwin
Jon TURNEY [Tue, 4 Aug 2015 12:34:10 +0000 (13:34 +0100)]
Improve FAQ answer on debugging Cygwin

Improve FAQ answer on debugging Cygwin to mention the cygwin-debuginfo package
and the gdb command 'set cygwin-exceptions on'.

2015-08-03  Jon Turney  <jon.turney@dronecode.org.uk>

* faq-programming.xml: Improve debugging-cygwin answer.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
9 years agoThis is part of a larger fix for RL78 complex relocs - they need an absolute symbol...
Nick Clifton [Tue, 4 Aug 2015 12:38:27 +0000 (13:38 +0100)]
This is part of a larger fix for RL78 complex relocs - they need an absolute symbol at address 0 that is not part of the *ABS* section.

* rl78/rl78-sim.ld: Provide a value for __rl78_abs__.
* rl78/rl78.ld: Likewise.

9 years agoFix wscanf family positional parameter handling in %lc, %ls, %l[]
Shoichi Sakon [Mon, 3 Aug 2015 19:51:16 +0000 (21:51 +0200)]
Fix wscanf family positional parameter handling in %lc, %ls, %l[]

        * libc/stdio/vfwscanf.c (__SVFWSCANF_R): Convert wrong usage of va_arg
        to GET_ARG in %lc, %ls nad %l[] cases.  Fix unterminated string in %l[]
        case.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoBump Cygwin DLL minor number.
Corinna Vinschen [Mon, 3 Aug 2015 19:46:55 +0000 (21:46 +0200)]
Bump Cygwin DLL minor number.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agostrace: Handle ofile descriptor more carefully. cygwin-2_2_0-release
Corinna Vinschen [Mon, 3 Aug 2015 10:02:17 +0000 (12:02 +0200)]
strace: Handle ofile descriptor more carefully.

Fix coverity CIDs 128250 - 128252

        * strace.cc (main2): Don't call setvbuf on NULL descriptor.
        Explicitely fclose ofile.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoDon't include stdio64 functions in reentrant syscalls menu when not bulding stdio64.
Jon TURNEY [Wed, 29 Jul 2015 15:48:00 +0000 (16:48 +0100)]
Don't include stdio64 functions in reentrant syscalls menu when not bulding stdio64.

Fix documentation build since 6c2b1842 by not including stdio64 functions in the
reent syscalls menu if the node itself isn't going to be included because it's
under the STDIO64 flag.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
9 years agoFix typo in <sys/lock.h>
Sebastian Huber [Thu, 30 Jul 2015 07:53:04 +0000 (02:53 -0500)]
Fix typo in <sys/lock.h>

Sorry, there was a typo in <sys/lock.h> which leads to memory corruption
since not enough space is reserved for the lock object.

newlib/ChangeLog
2015-07-30  Sebastian Huber  <sebastian.huber@embedded-brains.de>

* libc/sys/rtems/include/sys/lock.h (__LOCK_INIT_RECURSIVE): Use
proper type.

9 years ago[AArch64] Rewrite optimized memset.
Wilco Dijkstra [Thu, 30 Jul 2015 11:51:34 +0000 (12:51 +0100)]
[AArch64] Rewrite optimized memset.

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.

9 years agoCygwin: Fix x86_64 memcpy/memset for n > 2GB
Corinna Vinschen [Wed, 29 Jul 2015 20:09:34 +0000 (22:09 +0200)]
Cygwin: Fix x86_64 memcpy/memset for n > 2GB

https://cygwin.com/ml/cygwin/2015-07/msg00344.html:

RtlFillMemory and RtlCopyMemory only work for size values
up to 2GB.  Fix this problem by using NetBSD code for
memset and memcpy.  Add entry points for memmove, wmemset,
wmemmove, wmemcpy.  Thanks to Roman Petrovski
<RPetrovski@illumina.com> for pointing this out.

        * miscfuncs.cc (memset): x86_64 only: Implement in assembler.
        (memmove,memcpy): x86_64 only: Ditto.
        (wmemmove,wmemcpy): x86_64 only: Ditto.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoMove header files
Sebastian Huber [Mon, 27 Jul 2015 09:31:26 +0000 (11:31 +0200)]
Move header files

During libgcc build the first include search path for <...> is
"../newlib/libc/sys/rtems/include".  Move all RTEMS specific header
files to "libc/sys/rtems/include" so that they can be found.  Later
during libc build the header files in the previous location were somehow
present, but for libgcc build they were invisible.  This change is
necessary to use <pthread.h> for the GCC thread model implementation.

newlib/ChangeLog
2015-07-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>

libc/sys/rtems/machine/_types.h: Move to ...
libc/sys/rtems/include/machine/_types.h: ... here.
libc/sys/rtems/machine/limits.h: Move to ...
libc/sys/rtems/include/machine/limits.h: ... here.
libc/sys/rtems/machine/param.h: Move to ...
libc/sys/rtems/include/machine/param.h: ... here.
libc/sys/rtems/sys/cpuset.h: Move to ...
libc/sys/rtems/include/sys/cpuset.h: ... here.
libc/sys/rtems/sys/dirent.h: Move to ...
libc/sys/rtems/include/sys/dirent.h: ... here.
libc/sys/rtems/sys/param.h: Move to ...
libc/sys/rtems/include/sys/param.h: ... here.
libc/sys/rtems/sys/syslimits.h: Move to ...
libc/sys/rtems/include/sys/syslimits.h: ... here.
libc/sys/rtems/sys/utime.h: Move to ...
libc/sys/rtems/include/sys/utime.h: ... here.

9 years agonewlib/ChangeLog: Left out of previous commit.
Joel Sherrill [Wed, 29 Jul 2015 19:48:07 +0000 (12:48 -0700)]
newlib/ChangeLog: Left out of previous commit.

9 years agoAdd <sys/lock.h>
Sebastian Huber [Tue, 28 Jul 2015 09:32:05 +0000 (04:32 -0500)]
Add <sys/lock.h>

Provide self-contained synchronization objects for RTEMS.  The API was
designed to be able to use it for the Newlib internal locks, the C11
threads support, the GCC thread model support and the libgomp operating
system configuration in combination with <pthread.h>.

References:

https://lists.rtems.org/pipermail/devel/2015-July/011989.html
https://lists.rtems.org/pipermail/devel/2015-July/012000.html

Tickets:

https://devel.rtems.org/ticket/1247
https://devel.rtems.org/ticket/2274.

v2: Fix typo in _Condition_Wait_recursive_timed() declaration.

newlib/ChangeLog
2015-07-28  Sebastian Huber  <sebastian.huber@embedded-brains.de>

* libc/sys/rtems/include/sys/lock.h: New.

9 years agocygwin: Fix copyright dates
Corinna Vinschen [Wed, 29 Jul 2015 11:45:46 +0000 (13:45 +0200)]
cygwin: Fix copyright dates

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agocygwin: Fix crashes under AllocationPreference=0x100000 condition
Corinna Vinschen [Wed, 29 Jul 2015 11:32:29 +0000 (13:32 +0200)]
cygwin: Fix crashes under AllocationPreference=0x100000 condition

        * cygtls.h: Include cygtls_padsize.h and define CYGTLS_PADSIZE there.
        * cygtls_padsize.h: New file.  Define CYGTLS_PADSIZE.
        * environ.cc (parse_options): Fix NULL pointer access.
        * init.cc (threadfunc_fe): Do not force stack align on x86_64.

        * strace.cc (main2): Rename from main.
        (main): Make room for _cygtls area on stack and just call main2.  Add
        comment to explain why.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoRemove workaround for texinfo bug with underscores in filenames from mothballed mathfp/ newlib-snapshot-20150723
Jon TURNEY [Wed, 15 Jul 2015 14:40:38 +0000 (15:40 +0100)]
Remove workaround for texinfo bug with underscores in filenames from mothballed mathfp/

This got removed everywhere else in commit 139f923b, so I'm assuming whatever
ancient bug this was has been fixed long since.

There are plenty of other uses of texinfo with a filename containing an
underscore now.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
9 years agoRemove a stray sentence fragment in iconv.tex
Jon TURNEY [Tue, 21 Jul 2015 12:50:22 +0000 (13:50 +0100)]
Remove a stray sentence fragment in iconv.tex

I can't work out any meaning for this random sentence fragment, so remove it.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
9 years agoFix a typo in iconv.tex
Jon TURNEY [Tue, 21 Jul 2015 12:47:14 +0000 (13:47 +0100)]
Fix a typo in iconv.tex

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
9 years agoFix SYNPOSIS prototypes for iconv functions
Jon TURNEY [Tue, 21 Jul 2015 12:46:46 +0000 (13:46 +0100)]
Fix SYNPOSIS prototypes for iconv functions

Terminate all protoypes with a semicolon.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
9 years agoUse makedoc generated texinfo documentation for reentrant syscalls
Jon TURNEY [Tue, 21 Jul 2015 12:41:46 +0000 (13:41 +0100)]
Use makedoc generated texinfo documentation for reentrant syscalls

We use texinfo nodes beginning with an underscore in several other places, so
revert this ancient workaround for a no longer existing bug, and use the makedoc
generated texinfo for reentrant versions of syscalls, rather than handwritten
documentation.

Also alphabetically sort these functions.

Also add documentation for _execve_r, _getpid_r, _kill_r and _times_r functions,
whose non-reentrant versions are documented as stubs

v2:
Keep _open64_r, _lseek64_r and _fstat64_r functions under texinfo conditional STDIO64
Add _stat64_r function likewise.

Notes:

1. The handwritten prototypes give the reentrancy structure pointer as of type
void *, rather than the presumably more correct struct __reent *

2. The fcntl, gettimeofday, mkdir and rename functions are not documented as
stubs, so I haven't added the reentrant versions either

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
9 years agoAdd missing NEWPAGE commands to makedoc markup in reent/
Jon TURNEY [Tue, 21 Jul 2015 12:42:04 +0000 (13:42 +0100)]
Add missing NEWPAGE commands to makedoc markup in reent/

makedoc requires a NEWPAGE command to preceed the second and subsequent FUNCTION
commands in a file in order to produce the correct texinfo output.

Add missing NEWPAGE commands needed in reent/execr.c. and reent/signalr.c, which
contain makedoc markup for multiple functions.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
9 years agoImprove cygwin 2.2.0 release text
Corinna Vinschen [Thu, 23 Jul 2015 19:19:43 +0000 (21:19 +0200)]
Improve cygwin 2.2.0 release text

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoFix potential buffer overflow in makecontext trampoline
Corinna Vinschen [Thu, 23 Jul 2015 18:25:22 +0000 (20:25 +0200)]
Fix potential buffer overflow in makecontext trampoline

glibc's tst-makecontext2 testcase uncovered a bug in
__cont_link_context.  If the function misses to reserve
shadow space for the calls to setcontext/cygwin_exit,
both functions could overwrite memory beyond the stack
configured in uc_stack.

        * exceptions.cc (__cont_link_context): x86_64: align stack and reserve
        shadow space for subsequent function calls, otherwise suffer potential
        buffer overflow.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoIgnore non-absolute $HOME when started from native process
Corinna Vinschen [Thu, 23 Jul 2015 15:42:07 +0000 (17:42 +0200)]
Ignore non-absolute $HOME when started from native process

* uinfo.cc (cygheap_user::ontherange): Ignore $HOME if it's not
starting with a slash (aka, absolute POSIX Path).

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoCygwin: Implement siglongjmp and sigsetjmp functions.
Corinna Vinschen [Tue, 21 Jul 2015 15:31:02 +0000 (17:31 +0200)]
Cygwin: Implement siglongjmp and sigsetjmp functions.

* 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>
9 years agoAdd previous ldd fix to release file
Corinna Vinschen [Mon, 20 Jul 2015 16:43:16 +0000 (18:43 +0200)]
Add previous ldd fix to release file

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoFix potential hang in ldd if DLL encounters missing entry point
Corinna Vinschen [Mon, 20 Jul 2015 16:32:24 +0000 (18:32 +0200)]
Fix potential hang in ldd if DLL encounters missing entry point

         * ldd.cc (STATUS_DLL_NOT_FOUND): Drop definition.
        (report): Handle STATUS_ENTRYPOINT_NOT_FOUND exception.  Explain why.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoLower Cygwin's MINSIGSTKSZ and SIGSTKSZ
Corinna Vinschen [Sun, 19 Jul 2015 20:40:29 +0000 (22:40 +0200)]
Lower Cygwin's MINSIGSTKSZ and SIGSTKSZ

        * include/cygwin/signal.h (MINSIGSTKSZ): Define as 8K, unconditionally.
        (SIGSTKSZ): Define as 32K, unconditionally.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoReduce stack pressure throughout Cygwin
Corinna Vinschen [Sun, 19 Jul 2015 20:38:30 +0000 (22:38 +0200)]
Reduce stack pressure throughout Cygwin

        * dcrt0.cc (initial_env): Reduce size of local path buffers to
        PATH_MAX.  Allocate debugger_command from process heap.
        (init_windows_system_directory): Very early initialize new global
        variable global_progname.
        * dll_init.cc (dll_list::alloc): Make path buffer static.  Explain why.
        (dll_list::populate_deps): Use tmp_pathbuf for local path buffer.
        * exceptions.cc (debugger_command): Convert to PWCHAR.
        (error_start_init): Allocate debugger_command and fill with wide char
        strings.  Only allocate if NULL.
        (try_to_debug): Just check if debugger_command is a NULL pointer to
        return.  Drop conversion from char to WCHAR and drop local variable
        dbg_cmd.
        * globals.cc (global_progname): New global variable to store Windows
        application path.
        * pinfo.cc (pinfo_basic::pinfo_basic): Just copy progname over from
        global_progname.
        (pinfo::status_exit): Let path_conv create the POSIX path to
        avoid local buffer.
        * pseudo_reloc.cc (__report_error): Utilize global_progname, drop local
        buffer.
        * smallprint.cc (__small_vsprintf): Just utilize global_progname for
        %P format specifier.
        (__small_vswprintf): Ditto.
        * strace.cc (PROTECT): Change to reflect x being a pointer.  Reformat.
        (CHECK): Ditto.  Reformat.
        (strace::activate): Utilize global_progname, drop local buffer.
        Fix formatting.
        (strace::vsprntf): Reduce size of local progname buffer to NAME_MAX.
        Copy and, if necessary, convert only the last path component to
        progname.
        (strace_buf_guard): New muto.
        (buf): New static pointer.
        (strace::vprntf): Use buf under strace_buf_guard lock only.  Allocate
        buffer space for buf on Windows heap.
        * wow64.cc (wow64_respawn_process): Utilize global_progname, drop
        local path buffer.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoRemove x86_64 __sjfault/__ljfault
Corinna Vinschen [Sat, 18 Jul 2015 12:48:32 +0000 (14:48 +0200)]
Remove x86_64 __sjfault/__ljfault

* gendef: Remove unused 64 bit versions of __sjfault and __ljfault.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoRearrange makecontext and add lots of comments
Corinna Vinschen [Sat, 18 Jul 2015 10:35:23 +0000 (12:35 +0200)]
Rearrange makecontext and add lots of comments

        * exceptions.cc (makecontext): Rearrange order of initialization and
        document at great length.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoFix ucontext creation in call_signal handler
Corinna Vinschen [Fri, 17 Jul 2015 16:29:52 +0000 (18:29 +0200)]
Fix ucontext creation in call_signal handler

        * exceptions.cc (__unwind_single_frame): Define empty macro on i686.
        (_cygtls::call_signal_handler): Try to make sure signal context makes
        sense in case we're generating context here.  Add comment to explain.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoComment fixup
Corinna Vinschen [Fri, 17 Jul 2015 14:47:14 +0000 (16:47 +0200)]
Comment fixup

        * exceptions.cc (getcontext/x86_64): Drop comment on RtlCaptureContext.
        (swapcontext/x86_64): Fix comment yet again.
        (getcontext/i686): Move comment from x86_64 getcontext, slightly
        rearranged, to preceeding comment.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoReuse __unwind_single_frame where appropriate
Corinna Vinschen [Fri, 17 Jul 2015 14:29:41 +0000 (16:29 +0200)]
Reuse __unwind_single_frame where appropriate

        * exceptions.cc (__unwind_single_frame): Move up in file to be
        accessible from other places.  Move comment to getcontext.
        (stack_info::walk): Call __unwind_single_frame in 64 bit case.  Fix
        preceeding comment.
        (myfault_altstack_handler): Call __unwind_single_frame.
        (getcontext): Give comment from __unwind_single_frame a new home.
        (swapcontext): Fix comment.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoImplement getcontext, setcontext, makecontext, swapcontext
Corinna Vinschen [Fri, 17 Jul 2015 12:31:12 +0000 (14:31 +0200)]
Implement getcontext, setcontext, makecontext, swapcontext

        * common.din (getcontext): Export.
        (makecontext): Export.
        (setcontext): Export.
        (swapcontext): Export.
        * exceptions.cc (__unwind_single_frame): New static functions, 64 bit
        only.
        (setcontext): New function.
        (getcontext): New function.
        (swapcontext): New function.
        (__cont_link_context): New function.
        (makecontext): New function.
        * include/cygwin/version.h (CYGWIN_VERSION_DLL_MAJOR): Bump to 2002.
        (CYGWIN_VERSION_API_MINOR): Bump.
        * include/ucontext.h (getcontext): Add prototype.
        (setcontext): Ditto.
        (swapcontext): Ditto.
        (makecontext): Ditto.
        * ntdll.h (NtContinue): Ditto.

        * new-features.xml (ov-new2.2): Add new section.  Document getcontext,
        setcontext, makecontext, swapcontext.
        * posix.xml (std-deprec): Add getcontext, setcontext, makecontext,
        swapcontext.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoDocument the fact that we forgot to bump for sigaltstack and sethostname
Corinna Vinschen [Fri, 17 Jul 2015 12:02:43 +0000 (14:02 +0200)]
Document the fact that we forgot to bump for sigaltstack and sethostname

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years ago[AArch64] Reverting recent optimized memset().
Marcus Shawcroft [Wed, 15 Jul 2015 12:34:58 +0000 (13:34 +0100)]
[AArch64] Reverting recent optimized memset().

9 years agoChange to nano.specs to add nano's include dir cygwin-2_1_0-release
Andre Simoes Dias Vieira [Mon, 29 Jun 2015 12:38:59 +0000 (13:38 +0100)]
Change to nano.specs to add nano's include dir

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoexceptions.cc: Reenable code only disabled for debug purposes
Corinna Vinschen [Mon, 13 Jul 2015 14:08:29 +0000 (16:08 +0200)]
exceptions.cc: Reenable code only disabled for debug purposes

* exceptions.cc (exception::handle): Reenable code only disabled for
debug purposes.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years ago[AArch64] Optimized memset.
Wilco Dijkstra [Mon, 13 Jul 2015 12:13:34 +0000 (13:13 +0100)]
[AArch64] Optimized memset.

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.

9 years agoFix ChangeLog entry for previous two commits.
Marcus Shawcroft [Mon, 13 Jul 2015 12:17:04 +0000 (13:17 +0100)]
Fix ChangeLog entry for previous two commits.

9 years ago[AArch64] Optimized memcpy.
Wilco Dijkstra [Mon, 13 Jul 2015 12:09:02 +0000 (13:09 +0100)]
[AArch64] Optimized memcpy.

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.

9 years ago[AArch64] Optimized memmove.
Wilco Dijkstra [Mon, 13 Jul 2015 12:03:02 +0000 (13:03 +0100)]
[AArch64] Optimized memmove.

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.

9 years agoFix typo in README.
Jeff Johnston [Fri, 10 Jul 2015 20:49:40 +0000 (16:49 -0400)]
Fix typo in README.

9 years agotzset: Check timezone and country case-insensitive
Corinna Vinschen [Wed, 8 Jul 2015 08:25:49 +0000 (10:25 +0200)]
tzset: Check timezone and country case-insensitive

        * tzset.c (main): Check timezone and country case-insensitive.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoAdd accidentally missing ChangeLog entry for previous patch
Corinna Vinschen [Tue, 7 Jul 2015 18:49:02 +0000 (20:49 +0200)]
Add accidentally missing ChangeLog entry for previous patch

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agox86_64: Handle myfault exceptions when running on alternate signal stack
Corinna Vinschen [Tue, 7 Jul 2015 18:45:06 +0000 (20:45 +0200)]
x86_64: Handle myfault exceptions when running on alternate signal stack

        x86_64 only:
        * cygtls.cc (san::leave): Restore _my_tls.andreas.
        * cygtls.h (class san):  Add _clemente as in 32 bit case.  Add ret and
        frame members.
        (san::san): Handle _my_tls.andreas as on 32 bit.  Take parameter and
        write it to new member ret.  Store current stack pointer in frame.
        (san::~san): New destructor to restore _my_tls.andreas.
        (__try): Use __l_except address as parameter to san::san.
        * dcrt0.cc (dll_crt0_0): Add myfault_altstack_handler as vectored
        continuation handler.
        * exception.h (myfault_altstack_handler): Declare.
        * exceptions.cc (myfault_altstack_handler): New function.  Explain what
        it's good for.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoSimplify stack allocation code in child after fork
Corinna Vinschen [Tue, 7 Jul 2015 15:24:37 +0000 (17:24 +0200)]
Simplify stack allocation code in child after fork

        * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
        (child_info_fork::alloc_stack_hard_way): Drop declaration.
        * dcrt0.cc (child_info_fork::alloc_stack_hard_way): Fold into
        child_info_fork::alloc_stack.
        (getstack): Remove.
        (child_info_fork::alloc_stack): Simplify check for application-provided
        stack in "hard way" code.  Don't call getstack for each page, just
        reallocate stack immediately as required.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 years agoSimplify fork code setting up child stack info
Corinna Vinschen [Tue, 7 Jul 2015 15:05:20 +0000 (17:05 +0200)]
Simplify fork code setting up child stack info

        * fork.cc (frok::parent): Simplify code propagating stack setup to
        child process.  Tweak comments.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This page took 0.079616 seconds and 5 git commands to generate.