]> sourceware.org Git - newlib-cygwin.git/log
newlib-cygwin.git
7 years agoImporting cargl.c from NetBSD.
Aditya Upadhyay [Wed, 28 Jun 2017 20:00:47 +0000 (01:30 +0530)]
Importing cargl.c from NetBSD.

7 years agoImporting csqrtl.c from NetBSD.
Aditya Upadhyay [Wed, 28 Jun 2017 19:58:51 +0000 (01:28 +0530)]
Importing csqrtl.c from NetBSD.

7 years agoImporting clogl.c from NetBSD.
Aditya Upadhyay [Wed, 28 Jun 2017 19:57:48 +0000 (01:27 +0530)]
Importing clogl.c from NetBSD.

7 years agoImporting cacoshl.c from NetBSD.
Aditya Upadhyay [Wed, 28 Jun 2017 19:55:21 +0000 (01:25 +0530)]
Importing cacoshl.c from NetBSD.

7 years agounistd.h: Remove trailing whitespace
Dionna Glaze [Thu, 29 Jun 2017 06:34:19 +0000 (08:34 +0200)]
unistd.h: Remove trailing whitespace

7 years agounistd.h: remove mktemp
Corinna Vinschen [Thu, 29 Jun 2017 06:32:33 +0000 (08:32 +0200)]
unistd.h: remove mktemp

mktemp is already correctly declared in stdlib.h

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoMake gethostname, getdtablesize, mktemp, ualarm available in BSD, XOPEN_SOURCE >...
Dionna Glaze [Thu, 29 Jun 2017 06:30:04 +0000 (08:30 +0200)]
Make gethostname, getdtablesize, mktemp, ualarm available in BSD, XOPEN_SOURCE >= 500.

7 years agoreplace shortcut parameter assignments with read loops, run with sh
Brian Inglis [Mon, 26 Jun 2017 19:43:40 +0000 (13:43 -0600)]
replace shortcut parameter assignments with read loops, run with sh

7 years agoaarch64: optimize the unaligned case of memcmp
Sebastian Pop [Fri, 23 Jun 2017 20:23:09 +0000 (15:23 -0500)]
aarch64: optimize the unaligned case of memcmp

This brings to newlib a performance improvement that we developed in Bionic
libc.  That change has been submitted for review to Bionic libc:
https://android-review.googlesource.com/418279

A similar patch has been submitted for review in glibc:
https://sourceware.org/ml/libc-alpha/2017-06/msg01143.html

Patch written by Vikas Sinha and Sebastian Pop.

The performance was measured on the bionic-benchmarks on a hikey (aarch64 8xA53)
board. There was no performance change to the existing benchmark
and a performance improvement on the new benchmark for memcmp
on the unaligned side. The new benchmark has been submitted for
review at https://android-review.googlesource.com/414860

The overall performance improves by 18% for the small data set 8
and the performance improves by 450% for the large data set 64k.

The base is with the libc from /system/lib64. The bionic libc
with this patch is in /data.

hikey:/data # export LD_LIBRARY_PATH=/system/lib64
hikey:/data # ./bionic-benchmarks --benchmark_filter='BM_string_memcmp*'
Run on (8 X 2.4 MHz CPU s)
Benchmark                                Time           CPU Iterations
----------------------------------------------------------------------
BM_string_memcmp/8                      30 ns         30 ns   22955680    251.07MB/s
BM_string_memcmp/64                     57 ns         57 ns   12349184   1076.99MB/s
BM_string_memcmp/512                   305 ns        305 ns    2297163   1.56496GB/s
BM_string_memcmp/1024                  571 ns        571 ns    1225211   1.66912GB/s
BM_string_memcmp/8k                   4307 ns       4306 ns     162562   1.77177GB/s
BM_string_memcmp/16k                  8676 ns       8675 ns      80676   1.75887GB/s
BM_string_memcmp/32k                 19233 ns      19230 ns      36394   1.58695GB/s
BM_string_memcmp/64k                 36986 ns      36984 ns      18952   1.65029GB/s
BM_string_memcmp_aligned/8             199 ns        199 ns    3519166   38.3336MB/s
BM_string_memcmp_aligned/64            386 ns        386 ns    1810734   158.073MB/s
BM_string_memcmp_aligned/512          1735 ns       1734 ns     403981   281.525MB/s
BM_string_memcmp_aligned/1024         3200 ns       3200 ns     218838   305.151MB/s
BM_string_memcmp_aligned/8k          25084 ns      25080 ns      28180   311.507MB/s
BM_string_memcmp_aligned/16k         51730 ns      51729 ns      13521   302.057MB/s
BM_string_memcmp_aligned/32k        103228 ns     103228 ns       6782   302.727MB/s
BM_string_memcmp_aligned/64k        207117 ns     207087 ns       3450   301.806MB/s
BM_string_memcmp_unaligned/8           339 ns        339 ns    2070998   22.5302MB/s
BM_string_memcmp_unaligned/64         1392 ns       1392 ns     502796   43.8454MB/s
BM_string_memcmp_unaligned/512        9194 ns       9194 ns      76133   53.1104MB/s
BM_string_memcmp_unaligned/1024      18325 ns      18323 ns      38206   53.2963MB/s
BM_string_memcmp_unaligned/8k       148579 ns     148574 ns       4713   52.5831MB/s
BM_string_memcmp_unaligned/16k      298169 ns     298120 ns       2344   52.4118MB/s
BM_string_memcmp_unaligned/32k      598813 ns     598797 ns       1085    52.188MB/s
BM_string_memcmp_unaligned/64k     1196079 ns    1196083 ns        540   52.2539MB/s

hikey:/data # export LD_LIBRARY_PATH=/data
hikey:/data # ./bionic-benchmarks --benchmark_filter='BM_string_memcmp*'
Run on (8 X 2.4 MHz CPU s)
Benchmark                                Time           CPU Iterations
----------------------------------------------------------------------
BM_string_memcmp/8                      30 ns         30 ns   23209918   252.802MB/s
BM_string_memcmp/64                     57 ns         57 ns   12348447   1076.95MB/s
BM_string_memcmp/512                   305 ns        305 ns    2296878   1.56471GB/s
BM_string_memcmp/1024                  572 ns        571 ns    1224426    1.6689GB/s
BM_string_memcmp/8k                   4309 ns       4308 ns     162491   1.77109GB/s
BM_string_memcmp/16k                  9348 ns       9345 ns      74894   1.63285GB/s
BM_string_memcmp/32k                 18329 ns      18322 ns      38249    1.6656GB/s
BM_string_memcmp/64k                 36992 ns      36981 ns      18952   1.65045GB/s
BM_string_memcmp_aligned/8             199 ns        199 ns    3513925   38.3162MB/s
BM_string_memcmp_aligned/64            386 ns        386 ns    1814038   158.192MB/s
BM_string_memcmp_aligned/512          1735 ns       1735 ns     402279   281.502MB/s
BM_string_memcmp_aligned/1024         3204 ns       3202 ns     218761   304.941MB/s
BM_string_memcmp_aligned/8k          25577 ns      25569 ns      27406   305.548MB/s
BM_string_memcmp_aligned/16k         52143 ns      52123 ns      13522   299.769MB/s
BM_string_memcmp_aligned/32k        105169 ns     105127 ns       6637    297.26MB/s
BM_string_memcmp_aligned/64k        206508 ns     206383 ns       3417   302.835MB/s
BM_string_memcmp_unaligned/8           282 ns        282 ns    2482953    27.062MB/s
BM_string_memcmp_unaligned/64          542 ns        541 ns    1298317    112.77MB/s
BM_string_memcmp_unaligned/512        2152 ns       2152 ns     325267   226.915MB/s
BM_string_memcmp_unaligned/1024       4025 ns       4025 ns     173904   242.622MB/s
BM_string_memcmp_unaligned/8k        32276 ns      32271 ns      21818    242.09MB/s
BM_string_memcmp_unaligned/16k       65970 ns      65970 ns      10554   236.851MB/s
BM_string_memcmp_unaligned/32k      131241 ns     131242 ns       5129    238.11MB/s
BM_string_memcmp_unaligned/64k      266159 ns     266160 ns       2661   234.821MB/s

7 years agocygwin: doc: Fix doc install path in postinstall script
Corinna Vinschen [Fri, 23 Jun 2017 18:24:49 +0000 (20:24 +0200)]
cygwin: doc: Fix doc install path in postinstall script

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoUpdate documentation of cygwin setup proxy configuration details newlib-snapshot-20170623
Jon Turney [Mon, 19 Jun 2017 16:18:36 +0000 (17:18 +0100)]
Update documentation of cygwin setup proxy configuration details

7 years agoUpdate and sort list of cygwin setup command line options.
Jon Turney [Fri, 26 May 2017 11:23:39 +0000 (12:23 +0100)]
Update and sort list of cygwin setup command line options.

7 years agoNote regtool fix in release message
Corinna Vinschen [Thu, 22 Jun 2017 12:48:43 +0000 (14:48 +0200)]
Note regtool fix in release message

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agocygwin: regtool: encode error messages correctly
Fujii Hironori [Tue, 20 Jun 2017 11:17:09 +0000 (13:17 +0200)]
cygwin: regtool: encode error messages correctly

Error messages of regtool can't be read, which are encoded in,
for instance, SHIFT_JIS in Japanese Windows.  Fix by using
wide chars instead of multibyte.

7 years agoRevert "cygserver: Revamp thread sleep handling"
Corinna Vinschen [Tue, 20 Jun 2017 11:09:07 +0000 (13:09 +0200)]
Revert "cygserver: Revamp thread sleep handling"

This reverts commit b80b2c011936f7f075b76b6e59f9e8a5ec49caa1.

7 years agocygwin: readdir: Activate check for remote reparse points
Corinna Vinschen [Tue, 20 Jun 2017 08:06:17 +0000 (10:06 +0200)]
cygwin: readdir: Activate check for remote reparse points

Fix and move comment accordingly.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
7 years agoCompatibility improvements to reparse point handling.
Joe_Lowe [Wed, 14 Jun 2017 20:01:28 +0000 (13:01 -0700)]
Compatibility improvements to reparse point handling.

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

This page took 0.075428 seconds and 5 git commands to generate.