Commit Graph

17633 Commits

Author SHA1 Message Date
Jon Turney fe7a7709ef Fix transposed lines in 2.8.1 release text 2017-04-24 17:17:38 +01:00
Jon Turney 2980e76ae3 Update 2.8.1 release text 2017-04-24 17:13:04 +01:00
Corinna Vinschen fccaaee026 cygwin: add 2.8.1 release file
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-04-24 17:36:54 +02:00
Corinna Vinschen 7437d656cb cygwin TEST: Add nagging debug output to pinfo
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-04-24 17:35:06 +02:00
Corinna Vinschen 5ef0399ddd 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>
2017-04-24 17:34:31 +02:00
Corinna Vinschen ffcfbf4b66 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>
2017-04-24 17:17:29 +02:00
Corinna Vinschen e7bcf4633e 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>
2017-04-24 17:14:03 +02:00
Corinna Vinschen 63f19278b9 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.
2017-04-24 17:12:16 +02:00
Corinna Vinschen 3885c06c4f cygwin: remov unused winpids constructor
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-04-24 14:22:02 +02:00
Christian Franke b8523353d7 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>
2017-04-22 16:12:36 +02:00
Brian Inglis 8e0876727b cygwin doc: Add postinstall/preremove scripts to install Start Menu entries
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-04-22 14:02:33 +02:00
Corinna Vinschen 0ee8e0d93d cygwin CONTRIBUTORS: Add Brian Inglis
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-04-22 14:02:33 +02:00
Corinna Vinschen 529110deba cygwin doc: install-html: Fix docbook.css and index.html symlink installation
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-04-22 14:02:33 +02:00
Jon Turney 17b85c59bf 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>
2017-04-20 15:28:06 +01:00
Daniel Santos b43e28aef0 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>
2017-04-19 20:17:04 +02:00
Jozef Lawrynowicz 161b4ff037 Fix relocation type for _bsssize being R_MSP430X_ABS16 when large memory model is used 2017-04-19 15:04:31 +02:00
Corinna Vinschen fe86ad29d6 cygwin doc: install-html: install docbook.css
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-04-19 10:09:16 +02:00
Corinna Vinschen 7f13f08701 cygwin doc: install-html: link index.html instead of copying
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-04-19 10:08:28 +02:00
Kito Cheng c23fbc3aed Add __packed to struct ldieee
- We don't want any padding in struct ldieee, otherwise the offset
   might wrong in most compiler.
2017-04-18 12:25:35 +02:00
Carlos Santos 8ae6d8003a 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>
2017-04-18 12:24:42 +02:00
Corinna Vinschen bdb017b30c newlib: remove __infinity{f,ld} constants
previous commit 4c90db7bc8 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>
2017-04-18 12:17:26 +02:00
Jeff Johnston 4c90db7bc8 Remove legacy unions which are no longer used
- remove __fmath, __dmath, and __ldmath unions
2017-04-17 19:22:19 -04:00
Jon Turney c84697c259 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>
2017-04-10 10:59:54 +01:00
Prakhar Bahuguna c47c9bdc1b Optimise memchr for NEON-enabled processors 2017-04-06 18:19:20 +02:00
Mark Geisert c6c7dfc493 mkvers.sh: Remove "function" to avoid dash objecting to bash-ism. 2017-04-06 18:17:08 +02:00
Jon Turney a9da3e4e67 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>
2017-04-04 18:47:44 +01:00
Corinna Vinschen 961a6909d9 Cygwin: Export reallocarray
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-04-04 12:23:18 +02:00
Corinna Vinschen 6f88e6b2d5 Bump Cygwin to 2.8.1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-04-04 12:23:09 +02:00
Sebastian Huber eb14d0cc64 Add BSD-specific reallocarray()
It is available in FreeBSD, NetBSD and OpenBSD, but not in glibc.  It is
used for example by OpenSSH.
2017-04-04 12:19:18 +02:00
imp 7c4ae7770e 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
2017-04-04 12:16:05 +02:00
cem 6c6ea2e457 queue.3: Document existing QMD_* macros
Feedback from:	bapt, bdrewery, emaste
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D3983
2017-04-04 12:16:05 +02:00
cem 5e36b70104 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
2017-04-04 12:16:05 +02:00
mckusick 9998bd4b7c 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
2017-04-04 12:16:05 +02:00
hselasky 218c5e7d72 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
2017-04-04 12:16:05 +02:00
hselasky 73603c98aa Pass macro arguments properly.
MFC after:	1 week
2017-04-04 12:16:05 +02:00
hselasky d3f9311fff 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
2017-04-04 12:16:05 +02:00
lstewart a36e348a9f 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
2017-04-04 12:16:05 +02:00
imp d3e919b42a 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
2017-04-04 11:44:03 +02:00
avg 3abc66ec6b 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
2017-04-04 11:44:03 +02:00
pfg 7b07f11b1f 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.
2017-04-04 11:44:03 +02:00
pfg e1563a05b7 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
2017-04-04 11:44:03 +02:00
pfg 81c121c487 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]
baa2a973bd
2017-04-04 11:44:03 +02:00
asomers 84a6dba57e 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
2017-04-04 11:44:02 +02:00
dim e0dabc0e8d 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
2017-04-04 11:43:49 +02:00
pfg 086730fb14 Rename __sentinel to __null_sentinel
GCC 5 uses a conflicting __sentinel definition in include/c++/bits/stl_algo.h

Reported by:	matteo
2017-04-04 11:41:13 +02:00
Sebastian Huber f70d9ae6ad 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>
2017-04-03 10:26:33 +02:00
Catherine Moore 571c69656a Use .syntax unified instead of .syntax divided. 2017-03-30 17:18:12 +02:00
Corinna Vinschen 577c9d55da Add latest changes to Cygwin release information
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-03-28 13:42:11 +02:00
Corinna Vinschen b5b03d2d5f Change CURR_SHARED_MAGIC to account for getloadavg patch
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-03-28 13:41:31 +02:00
Jon Turney d0a359f6d2 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>
2017-03-27 22:03:58 +01:00