Commit Graph

11620 Commits

Author SHA1 Message Date
Yaakov Selkowitz e6321aa6a6 ansification: remove _PTR
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:16 -06:00
Yaakov Selkowitz eea249da3b ansification: remove _PARAMS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:13 -06:00
Yaakov Selkowitz 0bda30e1ff ansification: remove _CONST
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:08 -06:00
Yaakov Selkowitz 1e39db3062 cygwin: add asm/bitsperlong.h, dummy asm/posix_types.h headers
These changes are necessary for cross-compiling the Linux kernel.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 03:09:35 -06:00
Yaakov Selkowitz 2cb24159fb cygwin: add LFS_CFLAGS etc. to confstr/getconf
These are used, for instance, when cross-compiling the Linux kernel.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-16 12:12:45 -06:00
Brian Inglis 3cc77b4f29 cleanup winsup/doc/etc.{postinstall,preremove}.cygwin-doc.sh quote test variables, correct utility paths, define site in preremove 2017-12-22 20:15:32 +01:00
Brian Inglis ae3bd4f49e winsup/doc/etc.postinstall.cygwin-doc.sh fix shell variable typo 2017-12-22 20:15:32 +01:00
Corinna Vinschen eb4bfe4621 cygwin: block devices: fix file offset after short writes
When reading/writing block devices, Cygwin emulates Linux, providing
a byte-exact file position, albeit the underlying device drivers don't.

Unfortunately this only worked correctly for reading.  The raw_write
method failed to revalidate the buffer after the read-modify-write
cycle in case len is not a multiple of the sector length.  This in
turn resulted in lseek reporting a wrong file pointer.

Also, fix a condition for invalidating the buffer after writing from
a remaining read buffer.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-19 18:58:06 +01:00
Corinna Vinschen d5abcdd5a7 Cygwin: document sigtimedwait and ftell{o} patch
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-18 20:21:15 +01:00
Corinna Vinschen 7af691a784 Cygwin: rearrange sigwait functions, convert sigwait_common to inline
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-18 19:46:35 +01:00
Mark Geisert 24ff42d79a Cygwin: Implement sigtimedwait
Abstract out common code from sigwait/sigwaitinfo/sigtimedwait to
implement the latter.
2017-12-18 19:46:18 +01:00
Corinna Vinschen 314ddf908c winsup: Belatedly add Mark Geisert to CONTRIBUTORS
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-18 19:46:18 +01:00
Corinna Vinschen 32988bd409 cygwin: add mmap fork fix to 2.10.0 release test
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-10 14:32:34 +01:00
Corinna Vinschen 0c201166f5 cygwin: mmap: fix comment and formatting, drop unused code
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-10 14:14:28 +01:00
Corinna Vinschen 67a657cb1d cygwin: mmap: fix a fork failure with private, anonymous mappings
Rounddown incoming addr on a page boundary. Without this, we may end
up with a fork error for private, anonymous maps.  The reason is, we
use VirtualAlloc in this case which will potentially overcommit if
addr is not on a page boundary.  This isn't taken into account in
bookkeeping, but fixup_mmaps_after_fork will eventually stumble over
this when trying to reproduce the copy-on-write pages: VirtualQuery
returns a region reaching beyond the supposedly allocated address
range and from there it goes downhill.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-10 14:14:24 +01:00
Jon Turney c6f14b3c81 cygwin: Improve discussion of linker library ordering in faq-programming
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-12-08 12:09:18 +00:00
Corinna Vinschen 3476c8c868 cygwin: doc: cleanup cygutils info
Especially don't keep on about d2u and u2d.  Dos2unix exists.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-05 17:58:02 +01:00
Corinna Vinschen 08d77e5154 cygwin: document %l[ and bump API minor
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-01 18:21:59 +01:00
Corinna Vinschen 10b57ba8d0 cygwin: Document latest changes, bump API minor
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-30 21:57:16 +01:00
Corinna Vinschen 27c1a7972c cygwin: [w]mempcpy: fix global symbol
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-30 21:34:29 +01:00
Corinna Vinschen aea710b5fb cygwin: x86_64: implement mempcpy/wmempcpy in assembler
* change memcpy to internal _memcpy not setting the return value in %rax
* implement all memcpy-like functions as caller to _memcpy, setting %rax
  to correct return value beforehand.  This is possible because _memcpy
  does not use %rax at all

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-30 21:15:28 +01:00
Yaakov Selkowitz f636eae26f cygwin: export wmempcpy
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-30 04:06:51 -06:00
Yaakov Selkowitz da4839ec18 cygwin: add Object Size Checking to sys/socket.h
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-30 04:06:48 -06:00
Yaakov Selkowitz b3281de25f cygwin: add Object Size Checking to sys/poll.h
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-30 04:06:47 -06:00
Yaakov Selkowitz 552a20ab4e cygwin: create libssp compatibility import library
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-29 11:25:49 -06:00
Yaakov Selkowitz 6a848db442 cygwin: export SSP functions
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-29 11:25:48 -06:00
Corinna Vinschen 3913811454 cygserver: remove all asserts on "this"
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-28 19:08:04 +01:00
Yaakov Selkowitz c37171b528 cygwin: fix getconf after commit 032aa2dba5
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-28 11:36:14 -06:00
Yaakov Selkowitz f2b27ce620 cygwin: define _POSIX_TIMEOUTS
Since commit 8128f5482f, we have all the
non-tracing functions listed in posixoptions(7).  The tracing functions
are gated by their own option, and are obsolecent anyway.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-28 10:26:00 -06:00
Corinna Vinschen 76bd5cab33 cygwin: don't allow empty strings in __ASMNAME tags
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-28 13:31:20 +01:00
Corinna Vinschen df75aedc20 cygwin: improve _EXFUN tags generation
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-28 13:26:37 +01:00
Corinna Vinschen 2d2833dfab cygwin: remove accidentally committed debug statments
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-28 13:12:07 +01:00
Corinna Vinschen 662740b3d0 cygwin: further improve tags generation
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-28 13:10:34 +01:00
Yaakov Selkowitz 032aa2dba5 Feature test macros overhaul: Cygwin limits.h, part 2
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html
https://sourceware.org/ml/newlib/2017/msg01133.html

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-28 04:11:33 -06:00
Corinna Vinschen 76f06705be cygwin: convert most #ifndef __x86_64__ to #ifdef __i386__
Address the real offender

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-27 14:36:06 +01:00
Corinna Vinschen bc14f1c174 cygwin: improve tags generation
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-27 14:34:40 +01:00
Corinna Vinschen 9789cdffde cygwin: cleanup fhandler_socket::release_events
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-27 13:38:21 +01:00
Corinna Vinschen 57732f9b4b Cygwin: pipe_data_available: cleanup code
* Don't use a bool var to store three states (-1, 0, 1).
* Correctly check for NT_SUCCESS of a function returning NTSTATUS.
* Straighten out code for better readability.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-15 21:49:28 +01:00
Brian Inglis 0f88d21e4d Cygwin: Add FAQ How do I fix find_fast_cwd warnings? 2017-11-15 14:18:51 +01:00
Corinna Vinschen 0d57ef9de5 Cygwin: open: Remove unused code to handle HIDDEN and SYSTEM files
Commit 603ef545bd broke this snippet and
commit 5b312b4747 didn't help at all since
FILE_CREATE is exactly *not* the situation the test was originally
supposed to handle.

In fact, none of the open flags used by fhandler_base::open actually
hits this problem anymore, so just drop the code.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-14 21:50:32 +01:00
Corinna Vinschen 0b0b2b96f2 Cygwin: link: Simplify an expression
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-14 21:45:32 +01:00
Corinna Vinschen ce0b11f9c4 Cygwin: Bump DLL version to 2.10.0, bump API minor to 319
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-14 21:45:32 +01:00
Corinna Vinschen 0aa99373c1 Cygwin: fcntl.h: Define O_TMPFILE and implement it
Difference to Linux: We can't create files which don't show up
in the filesystem due to OS restrictions.  As a kludge, make a
(half-hearted) attempt to hide the file in the filesystem.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-14 21:45:25 +01:00
Corinna Vinschen f94fe74aad Cygwin: open: cleanup code in preparation of O_TMPFILE
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-14 16:30:44 +01:00
Corinna Vinschen 181fe5d2ed cygwin: pread: Remove incorrect comment
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-08 13:36:34 +01:00
Corinna Vinschen c983aa4879 cygwin: fhandler_disk_file::pread: always print debug info on return
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-08 13:30:42 +01:00
Xiaofeng Liu 46702f92ea cygwin: pread() returns non-zero if read beyond EOF
NtReadFile returns EOF status but doesn't set information to 0.
Set return value explicitly on EOF.
2017-11-08 13:21:30 +01:00
Corinna Vinschen 2e989b2129 cygwin: fix stray semicolon
introduced by patch 1c50e0d1ab

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-07 16:34:29 +01:00
Corinna Vinschen 2640628b09 cygwin: add socket bugfix to release notes
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-07 16:11:08 +01:00
Erik M. Bray 1c50e0d1ab Fix two bugs in the limit of large numbers of sockets:
* Fix the maximum number of sockets allowed in the session to 2048,
  instead of making it relative to sizeof(wsa_event).

  The original choice of 2048 was in order to fit the wsa_events array
  in the .cygwin_dll_common shared section, but there is still enough
  room to grow there to have 2048 sockets on 64-bit as well.

* Return an error and set errno=ENOBUF if a socket can't be created
  due to this limit being reached.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-07 16:08:14 +01:00