fhandler_serial.cc: MARK and SPACE parity for serial port

2021-01-29 Thread Marek Smetana via Cygwin-patches
Hi, I have modified the patch as recommended and am sending it as an attachment. The CMSPAR value is the same as in "asm / termbits.h" on Linux. Patches  sent by me are licensed under the 2-clause BSD license. Best regards Marek winsup/cygwin/fhandler_serial.cc| 11 ++- winsup/

[PATCH] CYGWIN: Fix resolver debugging output

2021-01-29 Thread Anton Lavrentiev via Cygwin-patches
- Use %S (instead of %s) when a wide-character output is due; - Use native byte order for host and add port when doing I/O with DNS server; - Use forward way for resolv.conf's "options" processing, so listing "debug" as a first option, will show all following option(s) as they are read; - Re-eva

[PATCH 4/4] Cygwin: include/cygwin/limits.h: new header

2021-01-29 Thread Ken Brown via Cygwin-patches
The new header defines some Cygwin-specific limits, using private names. It is included by include/limits.h. For example, we now have #define __OPEN_MAX 3200 in include/cygwin/limits.h and #define OPEN_MAX __OPEN_MAX in include/limits.h. The purpose is to hide implementation details from

[PATCH 3/4] Cygwin: remove the OPEN_MAX_MAX macro

2021-01-29 Thread Ken Brown via Cygwin-patches
Replace all occurrences of OPEN_MAX_MAX by OPEN_MAX, and define the latter to be 3200, which was the value of the former. In view of the recent change to getdtablesize, there is no longer a need to distinguish between these two macros. --- winsup/cygwin/dtable.cc| 8 winsup/cygwi

[PATCH 2/4] Cygwin: sysconf, getrlimit: don't call getdtablesize

2021-01-29 Thread Ken Brown via Cygwin-patches
Now that getdtablesize always returns OPEN_MAX_MAX, we can simplify sysconf(_SC_OPEN_MAX) and getrlimit(RLIMIT_NOFILE) to just use that same constant instead of calling getdtablesize. --- winsup/cygwin/resource.cc | 5 + winsup/cygwin/sysconf.cc | 11 +-- 2 files changed, 2 insertion

[PATCH 0/4] getdtablesize, OPEN_MAX, etc.

2021-01-29 Thread Ken Brown via Cygwin-patches
This patchset is an extension of the patch submitted here: https://cygwin.com/pipermail/cygwin-patches/2021q1/011060.html That patch is included as the first patch in this set. The change to OPEN_MAX still needs testing to see if it has too much impact on the performance of tcsh. I've make a

[PATCH 1/4] Cygwin: getdtablesize: always return OPEN_MAX_MAX

2021-01-29 Thread Ken Brown via Cygwin-patches
According to the Linux man page for getdtablesize(3), the latter is supposed to return "the maximum number of files a process can have open, one more than the largest possible value for a file descriptor." The constant OPEN_MAX_MAX is the only limit enforced by Cygwin, so we now return that. Previ

Re: [PATCH] Cygwin: getdtablesize: always return OPEN_MAX_MAX

2021-01-29 Thread Ken Brown via Cygwin-patches
On 1/28/2021 5:28 PM, Ken Brown via Cygwin-patches wrote: On 1/28/2021 11:13 AM, Corinna Vinschen via Cygwin-patches wrote: On Jan 28 17:07, Corinna Vinschen via Cygwin-patches wrote: On Jan 28 08:42, Ken Brown via Cygwin-patches wrote: On 1/28/2021 5:20 AM, Corinna Vinschen via Cygwin-patches