Commit Graph

11494 Commits

Author SHA1 Message Date
Brian Inglis cff8513220 fix cygwin-doc postinstall/preremove no SMPrograms/Cygwin dir 2017-07-06 10:01:54 +02:00
Sebastian Huber 461152e4eb Add ffsl(), ffsll(), fls(), flsl(), flsll()
Use compiler builtin for ffs().  Remove duplicate implementation from
Cygwin.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-07-05 13:49:48 +02:00
Yaakov Selkowitz 8a508f301c Cygwin: fix signal.h with _POSIX_C_SOURCE=1
struct sigaction is POSIX.1-1990 but siginfo_t, which is used by its
sa_sigaction member, is POSIX.1b-1993.  Therefore it needs to be guarded
as well, and as part of a union, the struct size is protected.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-07-04 19:22:23 -05:00
Corinna Vinschen 56c1cfa009 add scandirat patch to release notes
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-04 15:13:31 +02:00
Corinna Vinschen 1a942680bf cygwin: scandirat: fix path given to scandir
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-04 15:11:06 +02:00
Corinna Vinschen 055daff132 Bump DLL minor version
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-07-04 15:10:27 +02:00
Brian Inglis d54ee34e23 replace shortcut parameter assignments with read loops, run with sh 2017-06-27 09:37:28 +02:00
Corinna Vinschen 0220e40e8f cygwin: doc: Fix doc install path in postinstall script
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-06-23 20:24:49 +02:00
Jon Turney 95e66aae33 Update documentation of cygwin setup proxy configuration details 2017-06-22 16:04:20 +01:00
Jon Turney f4fb7b93ef Update and sort list of cygwin setup command line options. 2017-06-22 16:04:20 +01:00
Corinna Vinschen 92fc6ea7e3 Note regtool fix in release message
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-06-22 14:48:43 +02:00
Fujii Hironori 4d336756fa 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.
2017-06-20 13:17:49 +02:00
Corinna Vinschen c5ca43f359 Revert "cygserver: Revamp thread sleep handling"
This reverts commit b80b2c0119.
2017-06-20 13:09:07 +02:00
Corinna Vinschen 185cd97d24 cygwin: readdir: Activate check for remote reparse points
Fix and move comment accordingly.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-06-20 10:06:45 +02:00
Joe_Lowe 7a4e299a18 Compatibility improvements to reparse point handling. 2017-06-20 09:57:36 +02:00
Yaakov Selkowitz f698efbce1 cygwin: export strverscmp, add versionsort
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-06-19 08:16:42 -05:00
Erik M. Bray 5ca286666a 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.
2017-06-19 12:51:39 +02:00
Yaakov Selkowitz a5cc86ba13 cygwin: document XSI sigpause
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-06-14 14:30:44 -05:00
Yaakov Selkowitz dde6af6f82 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>
2017-06-14 14:23:52 -05:00
Yaakov Selkowitz 6a6c1c52e6 Feature test macros overhaul: Cygwin signal.h
This should match newlib's <sys/signal.h>.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-06-14 10:18:15 -05:00
Corinna Vinschen 8eada33223 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>
2017-06-14 13:22:56 +02:00
Joe Lowe 0a9edd73e3 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.
2017-06-14 10:57:02 +02:00
David Macek 5562000225 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>
2017-06-09 11:10:54 +02:00
Corinna Vinschen 105436dead cygwin: document lrint bugfix
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-06-07 11:07:52 +02:00
Corinna Vinschen e4094e49c1 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>
2017-06-07 11:03:16 +02:00
Corinna Vinschen 163066a1a5 cygwin: document env var crash fix
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-06-06 21:11:52 +02:00
Corinna Vinschen 7afc1124b6 cygwin: Fix crash if env var name starts with non-ASCII char
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-06-06 21:10:23 +02:00
Corinna Vinschen 41b7ef9e1f cygwin: document wcsxfrm fix
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-06-06 18:39:41 +02:00
Corinna Vinschen c0d7d3e1a2 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>
2017-06-06 18:27:47 +02:00
Corinna Vinschen 9d32147e35 cygwin CONTRIBUTORS: Add Daniel Santos
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-04-25 14:26:36 +02:00
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
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
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
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
Mark Geisert c6c7dfc493 mkvers.sh: Remove "function" to avoid dash objecting to bash-ism. 2017-04-06 18:17:08 +02:00