]> sourceware.org Git - newlib-cygwin.git/log
newlib-cygwin.git
7 years agostring: fix strverscmp doc inclusion
Yaakov Selkowitz [Mon, 19 Jun 2017 16:52:02 +0000 (11:52 -0500)]
string: fix strverscmp doc inclusion

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
7 years agocygwin: export strverscmp, add versionsort
Yaakov Selkowitz [Wed, 14 Jun 2017 20:26:38 +0000 (15:26 -0500)]
cygwin: export strverscmp, add versionsort

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
7 years agostring: add strverscmp
Yaakov Selkowitz [Wed, 14 Jun 2017 20:22:00 +0000 (15:22 -0500)]
string: add strverscmp

The actual implementation is from musl (MIT license).

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
7 years agoFix guard for siginfo_t and pthread_t definition
Thomas Preud'homme [Thu, 15 Jun 2017 13:09:39 +0000 (14:09 +0100)]
Fix guard for siginfo_t and pthread_t definition

Commit 8a3b3bb4d7224d419cc1a4af60ccf7e70edc876b changed the guard on
some functions from _POSIX_THREADS to __POSIX_VISIBLE. As a consequence,
some use of siginfo_t and pthread_t became visible under configurations
where _POSIX_THREADS is unset but __POSIX_VISIBLE is. Build then fails
because the definition of those types are still unavailable.

This commit make those type definition visible for __POSIX_VISIBLE
configurations. This requires moving the siginfo_t definition out of the
RTEMS specific definitions in sys/signal.h while still guarding it
against cygwin case.

7 years agoRevert "Don't overread or write memory returned by _DTOA_R"
Corinna Vinschen [Mon, 19 Jun 2017 10:57:16 +0000 (12:57 +0200)]
Revert "Don't overread or write memory returned by _DTOA_R"

This reverts commit efaef1bba263501e1e7264833ddfc9b8c20f9ebc.

7 years agoEnsure that send() interrupted by a signal returns sucessfully
Erik M. Bray [Thu, 15 Jun 2017 13:30:08 +0000 (15:30 +0200)]
Ensure that send() interrupted by a signal returns sucessfully

When SA_RESTART is not set on a socket, a blocking send() that is
interrupted mid-transition by a signal should return success (and
report just how many bytes were actually transmitted).

The err variable used here was not always guaranteed to be set
correctly in the loop, so better to just remove it and call
WSAGetLastError() explicitly.

7 years agocygwin: document XSI sigpause
Yaakov Selkowitz [Wed, 14 Jun 2017 19:30:44 +0000 (14:30 -0500)]
cygwin: document XSI sigpause

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
7 years agoExport XSI sigpause
Yaakov Selkowitz [Wed, 14 Jun 2017 15:20:05 +0000 (10:20 -0500)]
Export XSI sigpause

There are two common sigpause variants, both of which take an int argument.
If you request _XOPEN_SOURCE or _GNU_SOURCE, you get the System V version,
which removes the given signal from the process's signal mask; otherwise
you get the BSD version, which sets the process's signal mask to the given
value.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
7 years agonewlib/MAINTAINERS: Add OS maintainers section and myself for RTEMS and Write After...
Joel Sherrill [Tue, 13 Jun 2017 21:29:13 +0000 (16:29 -0500)]
newlib/MAINTAINERS: Add OS maintainers section and myself for RTEMS and Write After Approval.

7 years agoFeature test macros overhaul: Cygwin signal.h
Yaakov Selkowitz [Tue, 13 Jun 2017 19:58:33 +0000 (14:58 -0500)]
Feature test macros overhaul: Cygwin signal.h

This should match newlib's <sys/signal.h>.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
7 years agoFeature test macros overhaul: signal.h (part 3)
Yaakov Selkowitz [Tue, 13 Jun 2017 19:56:02 +0000 (14:56 -0500)]
Feature test macros overhaul: signal.h (part 3)

Notably, sigaction and friends are POSIX, but the form of sigpause
currently provided is BSD.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
7 years agostdio.h: guard function macros with !__cplusplus
Yaakov Selkowitz [Tue, 13 Jun 2017 19:51:18 +0000 (14:51 -0500)]
stdio.h: guard function macros with !__cplusplus

While POSIX allows these functions to also be defined as macros in C, in
C++ this is not allowed, and prevents these names (particularly feof) from
being used in a custom namespace.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
7 years agoAdd JLI support.
Claudiu Zissulescu [Tue, 23 May 2017 13:05:49 +0000 (15:05 +0200)]
Add JLI support.

Initialize the jli_base registers for ARCv2 cpus.

libgloss/
2017-05-23  Claudiu Zissulescu  <claziss@synopsys.com>

* arc/crt0.S: Initialize the jli_base registers for ARCv2 cpus.

7 years agoAdd profile support.
Claudiu Zissulescu [Tue, 23 May 2017 13:05:48 +0000 (15:05 +0200)]
Add profile support.

Add profile support for ARC processors.

libgloss/
2016-07-28  Claudiu Zissulescu  <claziss@synopsys.com>

* arc/crt0.S: Add calls to profiler support routines.
* Makefile.in (CRT0): Add gcrt0.
(NSIM_OBJS): Add mcount.
(CRT0_INSTALL): Install gcrt0, and crt0.
* arc/gcrt0.S: New file.
* arc/mcount.c: Likewise.

7 years agocygwin: readdir: don't lookup mount target inodes
Corinna Vinschen [Wed, 14 Jun 2017 11:22:56 +0000 (13:22 +0200)]
cygwin: readdir: don't lookup mount target inodes

So far Cygwin's readdir returned the inode number of a mount target
in d_ino, rather than the actual inode number of the mount point in
the underlying filesystem.  This not only results in a performance
hit if the mount target is a remote FS, it is also not done on other
POSIX systems.

Remove the code evaluating the mount target inode number.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoreaddir() with mount point dentry, return mount point INO
Joe Lowe [Tue, 13 Jun 2017 18:12:50 +0000 (11:12 -0700)]
readdir() with mount point dentry, return mount point INO

This patch fixes a minor compatibility issue w/ cygwin mount point handling in
readdir(), compared to equivalent behavior of Linux and MacOS. dentry.d_ino
should indicate the INO of the mount point itself, not the target volume root
folder.

Changed return type from readdir_check_reparse_point to uint8_t, to avoid
unnecessarily being implicitly cast to and from a signed int.

Renamed a related local variable "attr" to "oattr" that was eclipsing a member
variable with the same name.

Joe L.

7 years agoccoshl: Align formatting to upstream
Aditya Upadhyay [Wed, 14 Jun 2017 08:36:38 +0000 (10:36 +0200)]
ccoshl: Align formatting to upstream

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoImporting ccoshl.c from netbsd.
Aditya Upadhyay [Mon, 12 Jun 2017 19:16:22 +0000 (00:46 +0530)]
Importing ccoshl.c from netbsd.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoRemove FreeBSD specifics from RTEMS <arpa/inet.h>
Sebastian Huber [Mon, 12 Jun 2017 06:38:56 +0000 (08:38 +0200)]
Remove FreeBSD specifics from RTEMS <arpa/inet.h>

For whatever reason FreeBSD renames several functions provided by
<arpa/inet.h> and uses weak references to provide the standard function
names.  This causes problems on targets lacking proper support for weak
references.  We do not need this function renaming on RTEMS.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
7 years agoDon't overread or write memory returned by _DTOA_R
Silviu Baranga [Mon, 5 Jun 2017 08:54:42 +0000 (09:54 +0100)]
Don't overread or write memory returned by _DTOA_R

Don't over-read memory returned by _DTOA_R, and never write to it
since the result might be a string literal.

For example, when doing:
  swprintf(tt, 20, L"%.*f", 6, 0.0);

we will get back "0".

Instead, write the result returned by _DTOA_R to the output buffer.
After this, write the 0 chars directly to the the output buffer
(if there are any). This also has the (marginal) advantage that
we read/write less memory overall.

7 years agoAdd COMODO Internet Security and ConEmu to BLODA
David Macek [Thu, 8 Jun 2017 12:48:53 +0000 (14:48 +0200)]
Add COMODO Internet Security and ConEmu to BLODA

ConEmu: There has been at least one report of it causing crashes <https://github.com/Maximus5/ConEmu/issues/1158>

COMODO Internet Security: Causing GPG failures <https://github.com/msys2/msys2/issues/38>

7 years agoFix RTEMS ioctl() declaration
Sebastian Huber [Wed, 7 Jun 2017 09:05:38 +0000 (11:05 +0200)]
Fix RTEMS ioctl() declaration

Using uint32_t for ioctl_command_t does not work well on 64-bit targets.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
7 years agoUpdate FreeBSD revision of RTEMS <sys/bitset.h>
Sebastian Huber [Wed, 7 Jun 2017 06:40:48 +0000 (08:40 +0200)]
Update FreeBSD revision of RTEMS <sys/bitset.h>

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
7 years agoFix some RTEMS CPUSET(9) macros
Sebastian Huber [Wed, 7 Jun 2017 07:17:23 +0000 (09:17 +0200)]
Fix some RTEMS CPUSET(9) macros

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
7 years agoFix RTEMS CPU_EQUAL_S()
Sebastian Huber [Wed, 7 Jun 2017 06:38:22 +0000 (08:38 +0200)]
Fix RTEMS CPU_EQUAL_S()

According to the FreeBSD man page BIT_CMP() returns true in case the two
sets are NOT equal.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
7 years agoAdd myself to Write After Approval
Sebastian Huber [Wed, 7 Jun 2017 12:36:51 +0000 (14:36 +0200)]
Add myself to Write After Approval

7 years agoFix minor issues in memchr NEON implementation
Prakhar Bahuguna [Fri, 2 Jun 2017 09:22:32 +0000 (10:22 +0100)]
Fix minor issues in memchr NEON implementation

7 years agoPrint sign of NaN values.
Kito Cheng [Sat, 3 Jun 2017 13:41:29 +0000 (21:41 +0800)]
Print sign of NaN values.

7 years agocygwin: document lrint bugfix
Corinna Vinschen [Wed, 7 Jun 2017 09:07:52 +0000 (11:07 +0200)]
cygwin: document lrint bugfix

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin: Fix lrint{f,l} to return a 64 bit long on x86_64
Corinna Vinschen [Wed, 7 Jun 2017 09:03:16 +0000 (11:03 +0200)]
cygwin: Fix lrint{f,l} to return a 64 bit long on x86_64

Mingw-w64 (where the code has been taken from) has 4 byte longs
independently of the architecture but x86_64 Cygwin has 64 bit longs.
So use fistpll instead of fistpl on x86_64 Cygwin.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin: document env var crash fix
Corinna Vinschen [Tue, 6 Jun 2017 19:11:52 +0000 (21:11 +0200)]
cygwin: document env var crash fix

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin: Fix crash if env var name starts with non-ASCII char
Corinna Vinschen [Tue, 6 Jun 2017 19:10:23 +0000 (21:10 +0200)]
cygwin: Fix crash if env var name starts with non-ASCII char

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin: document wcsxfrm fix
Corinna Vinschen [Tue, 6 Jun 2017 16:39:41 +0000 (18:39 +0200)]
cygwin: document wcsxfrm fix

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin wcsxfrm: byte swap result ourselves
Corinna Vinschen [Tue, 6 Jun 2017 16:27:47 +0000 (18:27 +0200)]
cygwin wcsxfrm: byte swap result ourselves

Workaround a bug (or undocumented behaviour) in LCMapStringW:

It's documented(*) that the cchDest parameter is a byte count with
LCMAP_SORTKEY, but a character count otherwise.  But the docs don't
state what happens if you combine LCMAP_SORTKEY with LCMAP_BYTEREV.

Tests indicate that LCMAP_SORTKEY treats cchDest as byte count, but
then LCMAP_BYTEREV treats it as char count in the same call.  So the
latter swaps twice as much bytes in the destination buffer than the
byte count it returns, which potentially results in writing past the
end of the given output buffer.

Solution: Don't specify LCMAP_BYTEREV in the LCMapStringW(LCMAP_SORTKEY)
call, rather byte swap afterwards.

(*) https://msdn.microsoft.com/en-us/library/windows/desktop/dd318702(v=vs.85).aspx

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoFix thinko in MSP430 libgloss implementation of write() system call.
Martin Young [Fri, 26 May 2017 10:35:13 +0000 (11:35 +0100)]
Fix thinko in MSP430 libgloss implementation of write() system call.

7 years agoUpdate COPYING.NEWLIB appropriately.
Jeff Johnston [Thu, 25 May 2017 16:52:18 +0000 (12:52 -0400)]
Update COPYING.NEWLIB appropriately.

7 years agoAdd de-facto standard <sys/ioctl.h> for RTEMS
Sebastian Huber [Mon, 22 May 2017 09:54:27 +0000 (11:54 +0200)]
Add de-facto standard <sys/ioctl.h> for RTEMS

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
7 years agoAdd some POSIX header files for RTEMS
Sebastian Huber [Mon, 22 May 2017 08:42:39 +0000 (10:42 +0200)]
Add some POSIX header files for RTEMS

Add the POSIX header files

  * arpa/inet.h
  * net/if.h
  * netdb.h
  * netinet/in.h
  * netinet/tcp.h
  * sys/socket.h
  * sys/syslog.h
  * sys/uio.h
  * sys/un.h
  * syslog.h
  * termios.h

and their dependencies for RTEMS.  The origin of these files is the
latest FreeBSD.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
7 years agoFreeBSD compatibility for RTEMS <sys/cpuset.h>
Sebastian Huber [Mon, 22 May 2017 05:39:55 +0000 (07:39 +0200)]
FreeBSD compatibility for RTEMS <sys/cpuset.h>

Make the RTEMS <sys/cpuset.h> compatible with the latest FreeBSD
version.

Fix the CPU_COPY() parameter order, see also:

https://devel.rtems.org/ticket/3023

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
7 years agoAdd __bitcount*() to RTEMS <machine/types.h>
Sebastian Huber [Mon, 22 May 2017 06:32:52 +0000 (08:32 +0200)]
Add __bitcount*() to RTEMS <machine/types.h>

Use a dedicated header file <machine/_bitcount.h> to avoid cyclic header
dependencies in future changes.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
7 years agoMove ARM access.c from machine to sys
Sebastian Huber [Mon, 22 May 2017 07:34:31 +0000 (09:34 +0200)]
Move ARM access.c from machine to sys

The implementation of the POSIX access() function is nothing machine
specific like memcpy(), etc.  Move it back to the system domain.  This
avoids problems due to the include search order of the Newlib/GCC build
which picks up machine includes before system includes.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
7 years agoIncrease MSIZE for RTEMS
Sebastian Huber [Fri, 19 May 2017 11:04:48 +0000 (13:04 +0200)]
Increase MSIZE for RTEMS

Increase the MSIZE for RTEMS to be in line with the latest FreeBSD
version.  The legacy network stack of RTEMS will provides its own
definition.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
7 years agoFreeBSD compatibility for RTEMS <sys/param.h>
Sebastian Huber [Fri, 19 May 2017 09:56:13 +0000 (11:56 +0200)]
FreeBSD compatibility for RTEMS <sys/param.h>

Update the RTEMS <machine/param.h> and <sys/param.h> to be compatible
with the latest FreeBSD version.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
7 years agoAdd generic <machine/_align.h> for RTEMS
Sebastian Huber [Fri, 19 May 2017 09:16:11 +0000 (11:16 +0200)]
Add generic <machine/_align.h> for RTEMS

It uses __BIGGEST_ALIGNMENT__ which is available in recent GCC and
LLVM/clang.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
7 years agoARM/AArch64: Fix GetCmdLine semihosting directives newlib-snapshot-20170519
Laurent ALFONSI [Tue, 18 Apr 2017 15:50:16 +0000 (17:50 +0200)]
ARM/AArch64: Fix GetCmdLine semihosting directives

When simulating arm code, the target program startup code (crt0) uses
semihosting invocations to get the command line from the simulator. The
simulator returns the command line and its size into the area passed in
parameter. (ARM 32-bit specifications :
http://infocenter.arm.com/help/topic/com.arm.doc.dui0058d/DUI0058.pdf
chapter "5.4.19 SYS_GET_CMDLINE").

The memory area pointed by the semihosting register argument is located
in .text section (usually not writtable (RX)).

If we run this code on a simulator that respects this rights properties
(qemu user-mode for instance), the command line will not be written to
the .text program memory, in particular the length of the string. The
program runs with an empty command line. This problem hasn't been seen
earlier probably because qemu user-mode is not so much used, but this can
happen with another simulator that refuse to write in a read-only segment.

With this modification, the command line can be correctly passed to the
target program.

Changes:
- libgloss/arm/crt0.S : Arguments passed to the AngelSWI_Reason_GetCmdLine
  semihosting invocation are placed into .data section instead of .text
- libgloss/aarch64/crt0.S : Idem for aarch64 AngelSVC_Reason_GetCmdLine
  semihosting.

7 years agocygwin CONTRIBUTORS: Add Daniel Santos
Corinna Vinschen [Tue, 25 Apr 2017 12:26:36 +0000 (14:26 +0200)]
cygwin CONTRIBUTORS: Add Daniel Santos

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoFix transposed lines in 2.8.1 release text
Jon Turney [Mon, 24 Apr 2017 16:17:38 +0000 (17:17 +0100)]
Fix transposed lines in 2.8.1 release text

7 years agoUpdate 2.8.1 release text
Jon Turney [Mon, 24 Apr 2017 16:13:04 +0000 (17:13 +0100)]
Update 2.8.1 release text

7 years agocygwin: add 2.8.1 release file
Corinna Vinschen [Mon, 24 Apr 2017 15:36:54 +0000 (17:36 +0200)]
cygwin: add 2.8.1 release file

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin TEST: Add nagging debug output to pinfo
Corinna Vinschen [Mon, 24 Apr 2017 15:35:06 +0000 (17:35 +0200)]
cygwin TEST: Add nagging debug output to pinfo

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin: pinfo: do not wait for setting ppid on a transitional procinfo
Corinna Vinschen [Mon, 24 Apr 2017 15:34:31 +0000 (17:34 +0200)]
cygwin: pinfo: do not wait for setting ppid on a transitional procinfo

This leads to excessive lag when stracing processes if the inferior
process checks the process table.  The reason is that ppid isn't set
in the procinfo memory of the dynamically loading strace itself.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin: try unprivileged symlink creation on W10 1703 and later
Corinna Vinschen [Mon, 24 Apr 2017 15:17:29 +0000 (17:17 +0200)]
cygwin: try unprivileged symlink creation on W10 1703 and later

Add new SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE flag to
CreateSymbolicLinkW call when running on W10 1703 or later.
Don't do that on older versions to avoid ERROR_INVALID_PARAMETER.

Preliminary, needs testing.  There's an off-chance that the
flag results in the same ERROR_INVALID_PARAMETER on 1703 if the
developer settings are not enabled.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin: wincap: handle W10 1703
Corinna Vinschen [Mon, 24 Apr 2017 15:14:03 +0000 (17:14 +0200)]
cygwin: wincap: handle W10 1703

Add has_unprivileged_createsymlink flag and set to true on 1703 and
later.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin: wincap: fix evaluation of build number
Corinna Vinschen [Mon, 24 Apr 2017 15:12:16 +0000 (17:12 +0200)]
cygwin: wincap: fix evaluation of build number

RtlGetNtVersionNumbers returns the build number with some upper bits
set for no apparent reason.  The fact that RtlGetNtVersionNumbers is
undocumented doesn't exactly help.

Just filter out the upper WORD for now.  If build numbers are in
danger to become 6 digit numbers, re-evaluate.

7 years agocygwin: remov unused winpids constructor
Corinna Vinschen [Mon, 24 Apr 2017 12:22:02 +0000 (14:22 +0200)]
cygwin: remov unused winpids constructor

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoFix stat.st_blocks for files compressed with CompactOS method
Christian Franke [Sat, 22 Apr 2017 12:50:58 +0000 (14:50 +0200)]
Fix stat.st_blocks for files compressed with CompactOS method

Always retrieve FileCompressionInformation for non-empty
files if FileStandardInformation returns 0 allocated blocks.
This fixes stat.st_blocks for files compressed with CompactOS method.

Signed-off-by: Christian Franke <franke@computer.org>
7 years agocygwin doc: Add postinstall/preremove scripts to install Start Menu entries
Brian Inglis [Fri, 21 Apr 2017 11:26:10 +0000 (13:26 +0200)]
cygwin doc: Add postinstall/preremove scripts to install Start Menu entries

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin CONTRIBUTORS: Add Brian Inglis
Corinna Vinschen [Sat, 22 Apr 2017 11:54:03 +0000 (13:54 +0200)]
cygwin CONTRIBUTORS: Add Brian Inglis

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin doc: install-html: Fix docbook.css and index.html symlink installation
Corinna Vinschen [Sat, 22 Apr 2017 11:49:27 +0000 (13:49 +0200)]
cygwin doc: install-html: Fix docbook.css and index.html symlink installation

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoUpdate URLs for Cygwin packaging information newlib-snapshot-20170421
Jon Turney [Mon, 10 Apr 2017 18:32:47 +0000 (19:32 +0100)]
Update URLs for Cygwin packaging information

Also:
Remove obsolete reference to g-b-s
Remove mention of ancient pre-invisiconsole behaviour of setup scripts

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
7 years agostrace: Fix "over-optimization" flaw in strace.
Daniel Santos [Wed, 19 Apr 2017 16:06:02 +0000 (11:06 -0500)]
strace: Fix "over-optimization" flaw in strace.

Recent versions of gcc are optimizing away the TLS buffer allocated in
main, so we need to tell gcc that it's really used.  RtlSecureZeroMemory
accomplishes this while also inlining the memset.

Signed-off-by: Daniel Santos <daniel.santos@pobox.com>
7 years agoFix relocation type for _bsssize being R_MSP430X_ABS16 when large memory model is...
Jozef Lawrynowicz [Wed, 19 Apr 2017 11:47:13 +0000 (11:47 +0000)]
Fix relocation type for _bsssize being R_MSP430X_ABS16 when large memory model is used

7 years agocygwin doc: install-html: install docbook.css
Corinna Vinschen [Wed, 19 Apr 2017 08:09:16 +0000 (10:09 +0200)]
cygwin doc: install-html: install docbook.css

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin doc: install-html: link index.html instead of copying
Corinna Vinschen [Wed, 19 Apr 2017 08:08:28 +0000 (10:08 +0200)]
cygwin doc: install-html: link index.html instead of copying

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoAdd __packed to struct ldieee
Kito Cheng [Sat, 8 Apr 2017 16:06:06 +0000 (00:06 +0800)]
Add __packed to struct ldieee

 - We don't want any padding in struct ldieee, otherwise the offset
   might wrong in most compiler.

7 years agolibgloss/arm: fix discovery of "eabihf" toolchains
Carlos Santos [Thu, 13 Apr 2017 23:17:37 +0000 (20:17 -0300)]
libgloss/arm: fix discovery of "eabihf" toolchains

ARM EABI toolchains can optionally use the "hf" suffix to identify
hardware floating point support. Use the "*-*-eabi*" pattern to match
these toolchains.

Original patch by Bryan Hundven for the Crosstool-NG project. Improved
by Alexey Neyman.

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
CC: Bryan Hundven <bryanhundven@gmail.com
CC: Alexey Neyman <stilor@att.net>
7 years agonewlib: remove __infinity{f,ld} constants
Corinna Vinschen [Tue, 18 Apr 2017 10:17:26 +0000 (12:17 +0200)]
newlib: remove __infinity{f,ld} constants

previous commit 4c90db7bc89e7fa1077025fefdd58269dc71a6ac introduced
a compile time error because libm/common/s_infconst.c used the remove
__fmath, __dmath, and __ldmath union types.

Since this is very old, and unused for a very long time, just drop the
file and thus the __infinity constants entirely.

Exception: Cygwin exports __infinity from the beginning.  There's a very,
VERY low probability that any existing executable or lib still uses this
constant, but we just keep it in for backward compat, nevertheless.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoRemove legacy unions which are no longer used
Jeff Johnston [Mon, 17 Apr 2017 23:21:07 +0000 (19:21 -0400)]
Remove legacy unions which are no longer used

- remove __fmath, __dmath, and __ldmath unions

7 years agoAvoid decimal point localization in /proc/loadavg
Jon Turney [Sat, 8 Apr 2017 12:39:44 +0000 (13:39 +0100)]
Avoid decimal point localization in /proc/loadavg

Explicitly format the contents of /proc/loadavg to avoid the decimal point
getting localized according to LC_NUMERIC. Using anything other than '.' is
wrong and breaks top.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
7 years agoOptimise memchr for NEON-enabled processors
Prakhar Bahuguna [Thu, 26 Jan 2017 10:06:10 +0000 (10:06 +0000)]
Optimise memchr for NEON-enabled processors

7 years agomkvers.sh: Remove "function" to avoid dash objecting to bash-ism.
Mark Geisert [Thu, 6 Apr 2017 05:20:09 +0000 (22:20 -0700)]
mkvers.sh: Remove "function" to avoid dash objecting to bash-ism.

7 years agoMake ldd stop after any non-continuable exception
Jon Turney [Tue, 4 Apr 2017 17:47:44 +0000 (18:47 +0100)]
Make ldd stop after any non-continuable exception

Ensure that ldd always stops when the exception is flagged as
non-continuable.

Also arrange for ldd to exit with a non-zero exit code if something went
wrong which prevented us from listing all dynamic dependencies.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
7 years agoCygwin: Export reallocarray
Corinna Vinschen [Tue, 4 Apr 2017 10:23:18 +0000 (12:23 +0200)]
Cygwin: Export reallocarray

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoBump Cygwin to 2.8.1
Corinna Vinschen [Tue, 4 Apr 2017 10:23:09 +0000 (12:23 +0200)]
Bump Cygwin to 2.8.1

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoAdd BSD-specific reallocarray()
Sebastian Huber [Tue, 4 Apr 2017 10:06:57 +0000 (12:06 +0200)]
Add BSD-specific reallocarray()

It is available in FreeBSD, NetBSD and OpenBSD, but not in glibc.  It is
used for example by OpenSSH.

7 years agoRenumber copyright clause 4
imp [Tue, 4 Apr 2017 10:00:31 +0000 (12:00 +0200)]
Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96

7 years agoqueue.3: Document existing QMD_* macros
cem [Tue, 4 Apr 2017 10:00:30 +0000 (12:00 +0200)]
queue.3: Document existing QMD_* macros

Feedback from: bapt, bdrewery, emaste
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D3983

7 years agoqueue(3): Enhance queue debugging macros
cem [Tue, 4 Apr 2017 10:00:29 +0000 (12:00 +0200)]
queue(3): Enhance queue debugging macros

Split the QUEUE_MACRO_DEBUG into QUEUE_MACRO_DEBUG_TRACE and
QUEUE_MACRO_DEBUG_TRASH.

Add the debug macrso QMD_IS_TRASHED() and QMD_SLIST_CHECK_PREVPTR().

Document these in queue.3.

Reviewed by: emaste
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D3984

7 years agoAdd two new macros, SLIST_CONCAT and LIST_CONCAT
mckusick [Tue, 4 Apr 2017 10:00:28 +0000 (12:00 +0200)]
Add two new macros, SLIST_CONCAT and LIST_CONCAT

Add two new macros, SLIST_CONCAT and LIST_CONCAT. Note in both the
queue.h header file and in the queue.3 manual page that they are O(n) so
should be used only in low-usage paths with short lists (otherwise an
STAILQ or TAILQ should be used).

Reviewed by: kib

7 years agoMake the <sys/queue.h> fully usable within C++
hselasky [Tue, 4 Apr 2017 10:00:27 +0000 (12:00 +0200)]
Make the <sys/queue.h> fully usable within C++

Make the system queue header file fully usable within C++ programs by
adding macros to define class lists.

This change is backwards compatible for all use within C and C++
programs. Only C++ programs will have added support to use the queue
macros within classes. Previously the queue macros could only be used
within structures.

The queue.3 manual page has been updated to describe the new
functionality and some alphabetic sorting has been done while
at it.

Differential Revision: https://reviews.freebsd.org/D2745
PR: 200827 (exp-run)
MFC after: 2 weeks

7 years agoPass macro arguments properly.
hselasky [Tue, 4 Apr 2017 10:00:26 +0000 (12:00 +0200)]
Pass macro arguments properly.

MFC after: 1 week

7 years agoFix order of arguments in the TRACEBUF_INITIALIZER
hselasky [Tue, 4 Apr 2017 10:00:25 +0000 (12:00 +0200)]
Fix order of arguments in the TRACEBUF_INITIALIZER

Fix order of arguments in the TRACEBUF_INITIALIZER macro so that we can
define QUEUE_MACRO_DEBUG to debug list problems.

MFC after: 1 week

7 years agoAdd new FOREACH_FROM variants for queue(3)
lstewart [Tue, 4 Apr 2017 10:00:24 +0000 (12:00 +0200)]
Add new FOREACH_FROM variants for queue(3)

Add new FOREACH_FROM variants of the queue(3) FOREACH macros which can
optionally start the traversal from a previously found element by
passing the element in as "var". Passing a NULL "var" retains the same
semantics as the regular FOREACH macros.

Kudos to phk for suggesting the "FROM" suffix instead of my original
proposal.

Reviewed by: jhb (previous version), rpaulo
MFC after: 1 week

7 years agoRenumber copyright clause 4
imp [Tue, 4 Apr 2017 07:04:59 +0000 (09:04 +0200)]
Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96

7 years agodon't use C99 static array indices with older GCC versions
avg [Tue, 4 Apr 2017 07:04:58 +0000 (09:04 +0200)]
don't use C99 static array indices with older GCC versions

For example, the FreeBSD GCC (4.2.1) has a spotty support for that
feature.  If the static keyword is used with an unnamed array parameter
in a function declaration, then the compilation fails with:
error: static or type qualifiers in abstract declarator

The feature does work if the parameter is named.
So, the restriction introduced in this commit can be removed when all
affected function prototypes have the workaround.

MFC after: 1 week
Sponsored by: Panzura

7 years agoAddition of clang nullability qualifiers.
pfg [Tue, 4 Apr 2017 07:04:57 +0000 (09:04 +0200)]
Addition of clang nullability qualifiers.

For consistency with the qualifiers added in r310977, define a new
qualifier _Null_unspecified which is also defined in clang 3.7+.

Add two new macros:
__NULLABILITY_PRAGMA_PUSH
__NULLABILITY_PRAGMA_POP

These are for use in headers when we want avoid noisy warnings if
some pointers are left without nullability annotations.

These are added with way ahead of their first use to teach the GCC
ports headers of their existance before their first use.

7 years agoRemove unused __gnu_inline() attribute.
pfg [Tue, 4 Apr 2017 07:04:56 +0000 (09:04 +0200)]
Remove unused __gnu_inline() attribute.

This was meant to be used by a future FORTIFY_SOURCE implementation.
Probably for good, FORTIFY_SOURCE and this particular GCCism were never
well supported by clang or other compilers. Furthermore, the technology
has long since been replaced by either static checkers, sanitizers, or
even just the strong stack protector that was enabled by default.

Drop __gnu_inline to avoid cluttering the headers.

MFC after: 5 days

7 years agoAddition of clang nullability qualifiers.
pfg [Tue, 4 Apr 2017 07:04:55 +0000 (09:04 +0200)]
Addition of clang nullability qualifiers.

Add two new qualifiers for use by the static checkers:

_Nonnull
The _Nonnull nullability qualifier indicates that null is not a meaningful
value for a value of the _Nonnull pointer type.

_Nullable
The _Nullable nullability qualifier indicates that a value of the
_Nullable pointer type can be null.

These were introduced in Clang 3.7. For more information, see:
http://clang.llvm.org/docs/AttributeReference.html#nonnull

We add these now without using them so that the GCC ports have time to
pick up the header change.

Hinted by: Android Bionic libc [1]
Also seen in: Apple's Libc-1158.20.4

[1]
https://github.com/android/platform_bionic/commit/baa2a973bd776a51bb05a8590ab05d86eea7b321

7 years agoFix C++ includability of crypto headers with static array sizes
asomers [Tue, 4 Apr 2017 07:04:54 +0000 (09:04 +0200)]
Fix C++ includability of crypto headers with static array sizes

C99 allows array function parameters to use the static keyword for their
sizes. This tells the compiler that the parameter will have at least the
specified size, and calling code will fail to compile if that guarantee is
not met. However, this syntax is not legal in C++.

This commit reverts r300824, which worked around the problem for
sys/md5.h only, and introduces a new macro: min_size(). min_size(x) can
be used in headers as a static array size, but will still compile in C++
mode.

Reviewed by: cem, ed
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D8277

fix a typo in __STDC_VERSION__ in __min_size requirements

MFC after: 1 week
Sponsored by: Panzura

7 years agoStop exposing the C11 _Atomic() macro in <sys/cdefs.h>, when compiling for C++.
dim [Tue, 4 Apr 2017 07:04:53 +0000 (09:04 +0200)]
Stop exposing the C11 _Atomic() macro in <sys/cdefs.h>, when compiling for C++.

It clashes with the one in libc++'s <atomic> header.

(Previously, the _Atomic() macro was defined in <stdatomic.h>, which is
only for use with C11, but for various reasons it was moved to its
current location in r251804.)

Discussed with: bdrewery, ed
MFC after: 2 weeks

7 years agoRename __sentinel to __null_sentinel
pfg [Tue, 4 Apr 2017 07:04:52 +0000 (09:04 +0200)]
Rename __sentinel to __null_sentinel

GCC 5 uses a conflicting __sentinel definition in include/c++/bits/stl_algo.h

Reported by: matteo

7 years agoUse enum __packed in favour of -fshort-enums
Sebastian Huber [Fri, 31 Mar 2017 09:00:42 +0000 (11:00 +0200)]
Use enum __packed in favour of -fshort-enums

Some architectures like ARM encode the short enum option state in the
object file and the linker checks that this option is consistent for all
objects of an executable.  In case applications use -fno-short-enums,
then this leads to linker warnings.  Use the enum __packed attribute for
the relevent enums to avoid the -fshort-enums compiler option.  This
attribute is at least available on GCC, LLVM/clang and the Intel
compiler.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
7 years agoUse .syntax unified instead of .syntax divided. cygwin-2_8_0-release
Catherine Moore [Thu, 30 Mar 2017 14:26:23 +0000 (07:26 -0700)]
Use .syntax unified instead of .syntax divided.

7 years agoAdd latest changes to Cygwin release information
Corinna Vinschen [Tue, 28 Mar 2017 11:42:11 +0000 (13:42 +0200)]
Add latest changes to Cygwin release information

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoChange CURR_SHARED_MAGIC to account for getloadavg patch
Corinna Vinschen [Tue, 28 Mar 2017 11:41:31 +0000 (13:41 +0200)]
Change CURR_SHARED_MAGIC to account for getloadavg patch

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoImplement getloadavg()
Jon Turney [Tue, 21 Mar 2017 19:17:42 +0000 (19:17 +0000)]
Implement getloadavg()

v2:
autoload PerfDataHelper functions
Keep loadavg in shared memory
Guard loadavg access by a mutex
Initialize loadavg to the current load

v3:
Shared memory version bump isn't needed if we are only extending it
Remove unused autoload
Mark inititalized flags as NO_COPY for correct behaviour in fork child

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
7 years agodeclaration of ppoll() by poll.h should be guarded by _GNU_SOURCE
Jon Turney [Mon, 27 Mar 2017 14:19:36 +0000 (15:19 +0100)]
declaration of ppoll() by poll.h should be guarded by _GNU_SOURCE

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
7 years agoRecognize Netapp mode supporting reparse points
Corinna Vinschen [Mon, 27 Mar 2017 18:28:03 +0000 (20:28 +0200)]
Recognize Netapp mode supporting reparse points

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin: Do not generate surrogate chars on netapp
Corinna Vinschen [Fri, 24 Mar 2017 19:52:16 +0000 (20:52 +0100)]
cygwin: Do not generate surrogate chars on netapp

Just like Samba, Netapp FSes seem to dislike invalid surrogate usage in
filenames.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoDocument cygserver changes
Corinna Vinschen [Fri, 24 Mar 2017 17:13:08 +0000 (18:13 +0100)]
Document cygserver changes

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