Commit Graph

522 Commits

Author SHA1 Message Date
Corinna Vinschen b9261fa1d9 Cygwin: bump version to 3.2.0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-08-22 13:43:46 +02:00
Corinna Vinschen b3af1d5aa3 Cygwin: Bump DLL version to 3.1.7
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-07-09 10:14:23 +02:00
Corinna Vinschen 8873f073c8 Bump version to 3.1.6
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-06-01 10:48:11 +02:00
Corinna Vinschen ac36c2ec90 Bump DLL version to 3.1.5
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-02-19 13:38:42 +01:00
Corinna Vinschen 6afb1ba504 Cygwin: Bump DLL version to 3.1.4
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-02-17 13:56:44 +01:00
Corinna Vinschen 71091d165f Cygwin: Bump DLL version to 3.1.3
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-01-24 10:17:31 +01:00
Corinna Vinschen 7fc78f07ed Cygwin: Bump DLL version to 3.1.2
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-12-18 10:48:10 +01:00
Corinna Vinschen d3574fc148 Cygwin: Bump DLL version to 3.1.1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-12-16 21:09:50 +01:00
Corinna Vinschen a13145a30d Cygwin: Export newlib ndbm functions
Signed-off-by: Corinna Vinschen <corinna-cygwin@cygwin.com>
2019-07-24 22:32:48 +02:00
Mark Geisert fff17ad73f Cygwin: Fix return value of sched_getaffinity
Have sched_getaffinity() interface like glibc's, and provide an
undocumented internal interface __sched_getaffinity_sys() like the Linux
kernel's sched_getaffinity() for benefit of taskset(1).
2019-06-28 17:10:39 +02:00
Mark Geisert 641ecb0753 Cygwin: Implement sched_[gs]etaffinity()
This patch set implements the Linux syscalls sched_getaffinity,
sched_setaffinity, pthread_getaffinity_np, and pthread_setaffinity_np.
Linux has a straightforward view of the cpu sets used in affinity masks.
They are simply long (1024-bit) bit masks.  This code emulates that view
while internally dealing with Windows' distribution of available CPUs among
processor groups.
2019-06-24 09:18:14 +02:00
Corinna Vinschen 9fd429e6a7 Cygwin: Bump DLL version to 3.1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-03-27 14:01:44 +01:00
Corinna Vinschen df960cb954 Cygwin: bump version to 3.0.5
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-03-18 11:29:00 +01:00
Corinna Vinschen 7cbe4b59d6 Cygwin: bump version to 3.0.4
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-03-09 20:13:50 +01:00
Corinna Vinschen 633278b877 Cygwin: bump version to 3.0.3
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-03-05 20:00:30 +01:00
Corinna Vinschen 65c569f9fd Cygwin: bump version to 3.0.2
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-02-22 00:13:06 +01:00
Yaakov Selkowitz 850705f92e Cygwin: add secure_getenv
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2019-02-19 13:01:50 -06:00
Corinna Vinschen 959077ac0a CYgwin: bump API minor for MOUNT_BINARY -> MOUNT_TEXT change
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-02-18 11:04:38 +01:00
Corinna Vinschen 538e7abc36 Cygwin: bump version to 3.0.1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-02-16 18:11:16 +01:00
Michael Haubenwallner 135577f708 forkables: simplify disabling via shm
* Rename cygwin_shared->prefer_forkable_hardlinks to
  forkable_hardlink_support, with values
  0 for Unknown, 1 for Supported, -1 for Unsupported.
  Upon first dll loaded ever, dll_list::forkable_ntnamesize checks the
  /var/run/cygfork directory to both exist and reside on NTFS, setting
  cygwin_shared->forkable_hardlink_support accordingly.
* Replace enum forkables_needs by bool forkables_created: Set
  to True by request_forkables after creating forkable hardlinks.
2019-02-07 15:58:02 +01:00
Michael Haubenwallner 5a41aa6f4d forkables: Keep hardlinks disabled via shared mem.
To avoid the need for each process to check the filesystem to detect
that hardlink creation is impossible or disabled, cache this fact in
shared memory.  Removing cygfork directory while in use does disable
hardlinks creation.  To (re-)enable hardlinks creation, the cygfork
directory has to exist before the first cygwin process does fork.

	* forkable.cc (dll_list::forkable_ntnamesize): Short cut
	forkables needs to impossible when disabled via shared memory.
	(dll_list::update_forkables_needs): When detecting hardlink
	creation as impossible (not on NTFS) while still (we are the
	first one checking) enabled via shared memory, disable the
	shared memory value.
	(dll_list::request_forkables): Disable the shared memory value
	when hardlinks creation became disabled, that is when the
	cygfork directory was removed.
	* include/cygwin/version.h: Bump CYGWIN_VERSION_SHARED_DATA 6.
	* shared_info.h (struct shared_info): Add member
	prefer_forkable_hardlinks.  Update CURR_SHARED_MAGIC.
	* shared.cc (shared_info::initialize): Initialize
	prefer_forkable_hardlinks to 1 (Yes).
2019-02-07 15:58:02 +01:00
Corinna Vinschen b5e1003722 Cygwin: processes: use dedicated Cygwin PID rather than Windows PID
Using the Windows PID as Cygwin PID has a few drawbacks:

- the PIDs on Windows get reused quickly.  Some POSIX applications choke
  on that, so we need extra code to avoid too quick PID reuse.

- The code to avoid PID reuse keeps parent process handles and
  (depending on a build option) child processes open unnecessarily.

- After an execve, the process has a split personality:  Its Windows PID
  is a new PID, while its Cygwin PID is the PID of the execve caller
  process.  This requires to keep two procinfo shared sections open, the
  second just to redirect process info requests to the first, correct
  one.

This patch changes the way Cygwin PIDs are generated:

- Cygwin PIDs are generated independently of the Windows PID, in a way
  expected by POSIX processes.  The PIDs are created incrementally in
  the range between 2 and 65535, round-robin.

- On startup of the first Cygwin process, choose a semi-random start PID
  for the first process in the lower PID range to make the PIDs slightly
  unpredictable.  This may not be necessary but it seems kind of inviting
  to know that the first Cygwin process always starts with PID 2.

- Every process not only creates the shared procinfo section, but also a
  symlink in the NT namespace, symlinking the Windows PID to the Cygwin
  PID.  This drops the need for the extra procinfo section after execve.

- Don't keep other process handles around unnecessarily.

- Simplify the code creating/opening the shared procinfo section and
  make a clear distinction between interfaces getting a Cygwin PID and
  interfaces getting a Windows PID.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-02-01 20:06:47 +01:00
Corinna Vinschen 0fb497165f Cygwin: seteuid: use Kerberos/MsV1_0 S4U authentication by default
- This simple and official method replaces cyglsa and "create token"
  methods.  No network share access, same as before.

- lsaauth and create_token are disabled now.  If problems crop up,
  they can be easily reactivated.  If no problems crop up, they
  can be removed in a while, together with the lsaauth subdir.

- Bump Cygwin version to 3.0.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-01-26 19:41:03 +01:00
Corinna Vinschen 84230b71c6 Cygwin: uname: Raise size of utsname fields and revamp uname(2) output
New format:

  sysname:      CYGWIN_NT-${osversion}-${os_build_number}[-WOW64]
  nodename:     `gethostname`
  release:      ${cygwin_version}-${API minor}.${arch}[.snap]
  version:      YYYY-MM-DD HH:MM UTC
  machine:      ${arch}
_GNU_SOURCE:
  domainname:   `getdomainname`
!_GNU_SOURCE:
  __domainname: `getdomainname`

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-01-26 18:37:25 +01:00
Jozef Lawrynowicz b14a879d85 Remove matherr, and SVID and X/Open math library configurations
Default math library configuration is now IEEE
2019-01-23 10:46:24 +01:00
Corinna Vinschen 068182e26c Cygwin: timers: implement timerfd
First cut of a timerfd implementation.

Still TODO:
- fork/exec semantics
- timerfd_settime TFD_TIMER_CANCEL_ON_SET flag
- ioctl(TFD_IOC_SET_TICKS)
- bug fixes

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-01-15 22:02:33 +01:00
Corinna Vinschen 9d13a2995c Cygwin: signal: implement signalfd
First cut of a signalfd implementation.

Still TODO: Non-polling select.

This should mostly work as on Linux except for missing support
for some members of struct signalfd_siginfo, namely ssi_fd,
ssi_band (both SIGIO/SIGPOLL, not fully implemented) and ssi_trapno
(HW exception, required HW support).

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-01-13 23:13:33 +01:00
Corinna Vinschen 9e295a8d19 Cygwin: posix timers: implement timer_getoverrun
- set DELAYTIMER_MAX to INT_MAX
- make sure to set siginfo_t::si_overrun, as on Linux

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-01-12 21:26:07 +01:00
Corinna Vinschen c05df02725 Cygwin: implement extensible clock interface
- Drop hires_[nm]s clocks, rename hires.h to clock.h.

- Implement clk_t class as an extensible clock class in new file clock.cc.

- Introduce get_clock(clock_id) returning a pointer to the clk_t instance
  for clock_id.  Provide the following methods along the lines of the former
  hires classes:

	void		clk_t::nsecs (struct timespec *);
	ULONGLONG	clk_t::nsecs ();
	LONGLONG	clk_t::usecs ();
	LONGLONG	clk_t::msecs ();
	void 		clk_t::resolution (struct timespec *);

- Add CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC_RAW, CLOCK_MONOTONIC_COARSE
  and CLOCK_BOOTTIME clocks.

- Allow clock_nanosleep, pthread_condattr_setclock and timer_create to use
  all new clocks (both clocks should be usable with a small tweak, though).

- Bump DLL major version to 2.12.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-11-29 11:05:42 +01:00
Corinna Vinschen bba82041b2 Cygwin: Bump DLL version to 2.11.3
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-11-08 15:31:25 +01:00
Corinna Vinschen 9bbda85e27 Cygwin: Bump DLL version to 2.11.2
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-09-05 13:02:09 +02:00
Corinna Vinschen fc3a8ecca5 Cygwin: Bump DLL version to 2.11.1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-08-31 13:01:23 +02:00
Corinna Vinschen 1e0a1f59d9 Cygwin: implement sched_getcpu
* create new function __get_cpus_per_group to evaluate # of CPU groups
* Call from  format_proc_cpuinfo and sched_getcpu
* Bump API minor version

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-08-07 14:51:10 +02:00
Mark Geisert 7f32efbf73 POSIX Asynchronous I/O support: other files
Updates to misc files to integrate AIO into the Cygwin source tree.
Much of it has to be done when adding any new syscalls.  There are
some updates to limits.h for AIO-specific limits.  And some doc mods.
2018-07-25 09:36:24 +02:00
Corinna Vinschen 732e0b395d Cygwin: Implement pthread_tryjoin_np and pthread_timedjoin_np
- Move pthread_join to thread.cc to have all `join' calls in
  the same file (pthread_timedjoin_np needs pthread_convert_abstime
  which is static inline in thread.cc)
- Bump API version

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-06-27 17:56:59 +02:00
Ken Brown ebc9171ede Bump Cygwin DLL version to 2.11.0 2018-06-07 09:42:36 +02:00
Ken Brown 2ea436b433 Cygwin: Document clearenv and bump API minor
Also add earlier "What changed" items to new-features.xml.
2018-06-07 09:42:36 +02:00
Corinna Vinschen 623d3fdf6b Cygwin: bump version to 2.10.1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-02-02 15:32:28 +01:00
Yaakov Selkowitz cadc12f695 cygwin: add catopen, catgets, catclose
The implementation is taken from FreeBSD with #ifdef __CYGWIN__ modifications.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-19 13:19:21 -06: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 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
Yaakov Selkowitz f636eae26f cygwin: export wmempcpy
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-30 04:06:51 -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 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 3bdd484103 cygwin: belatedly bump DLL minor version
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-10-18 16:40:56 +02:00
Corinna Vinschen cf8bf843f8 cygwin: export strnstr
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-25 18:00:46 +02:00
Ken Brown f665b1cef3 cygwin: Implement renameat2
Define the RENAME_NOREPLACE flag in <cygwin/fs.h> as defined on Linux
in <linux/fs.h>.  The other RENAME_* flags defined on Linux are not
supported.
2017-08-19 18:06:49 +02:00
Corinna Vinschen 8128f5482f cygwin: Implement pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 21:31:38 +02:00
Corinna Vinschen eb206317a8 cygwin: Bump DLL version to 2.9.0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 19:17:45 +02:00