[PATCH v2] Fix profiler error() definition and usage

2023-11-14 Thread Mark Geisert
number displays Fixes: 9887fb27f6126 ("Cygwin: New tool: profiler") Fixes: 087a3d76d7335 ("Cygwin: New tool: gmondump") Signed-off-by: Mark Geisert --- winsup/cygwin/release/3.4.10 | 3 +++ winsup/utils/gmondump.c | 8 --- winsup/utils/

Re: [PATCH] Cygwin: Fix profiler error() definition and usage

2023-11-14 Thread Mark Geisert
Hi Corinna, On Mon, 13 Nov 2023, Corinna Vinschen wrote: On Nov 13 01:46, Mark Geisert wrote: Minor updates to profiler and gmondump, which share some code: - fix operation of error() so it actually works as intended - resize 4K-size auto buffer reservations to BUFSIZ (==1K) - remove trailing

[PATCH] Cygwin: Fix profiler error() definition and usage

2023-11-13 Thread Mark Geisert
number displays Fixes: 9887fb27f6126 ("Cygwin: New tool: profiler") Fixes: 087a3d76d7335 ("Cygwin: New tool: gmondump") Signed-off-by: Mark Geisert --- winsup/utils/gmondump.c | 8 --- winsup/utils/profiler.cc | 46 +--- 2 files ch

Re: Which git hash to supply on Fixes: line -- never mind

2023-11-13 Thread Mark Geisert
On Sun, 12 Nov 2023, Mark Geisert wrote: Hi folks, I want to submit a patch that fixes 'profiler'. The Fixes: line of the patch commentary should reference the original addition of profiler to the Cygwin source tree. Using the gitweb interface, the commit display of profiler.cc shows

Which git hash to supply on Fixes: line

2023-11-12 Thread Mark Geisert
Hi folks, I want to submit a patch that fixes 'profiler'. The Fixes: line of the patch commentary should reference the original addition of profiler to the Cygwin source tree. Using the gitweb interface, the commit display of profiler.cc shows: authorMark Geisert 2021-07-15 21:49:55

Re: [PATCH] Cygwin: Fix __cpuset_zero_s prototype

2023-09-09 Thread Mark Geisert
Mark Geisert wrote, and then wrote again: Corinna Vinschen wrote: On Sep  7 22:36, Mark Geisert wrote: Add a missing "void" to the prototype for __cpuset_zero_s(). Reported-by: Marco Mason Addresses: https://cygwin.com/pipermail/cygwin/2023-September/254423.html Signed-off-by: Ma

Re: [PATCH] Cygwin: Fix __cpuset_zero_s prototype

2023-09-09 Thread Mark Geisert
Corinna Vinschen wrote: On Sep 7 22:36, Mark Geisert wrote: Add a missing "void" to the prototype for __cpuset_zero_s(). Reported-by: Marco Mason Addresses: https://cygwin.com/pipermail/cygwin/2023-September/254423.html Signed-off-by: Mark Geisert Fixes: c6cfc99648d6 (Cygwin: sy

[PATCH] Cygwin: Add relnote to 3.4.10 release file

2023-09-09 Thread Mark Geisert
Document the most recent update to include/sys/cpuset.h. --- winsup/cygwin/release/3.4.10 | 5 + 1 file changed, 5 insertions(+) create mode 100644 winsup/cygwin/release/3.4.10 diff --git a/winsup/cygwin/release/3.4.10 b/winsup/cygwin/release/3.4.10 new file mode 100644 index

[PATCH] Cygwin: Fix __cpuset_zero_s prototype

2023-09-07 Thread Mark Geisert
Add a missing "void" to the prototype for __cpuset_zero_s(). Reported-by: Marco Mason Addresses: https://cygwin.com/pipermail/cygwin/2023-September/254423.html Signed-off-by: Mark Geisert Fixes: c6cfc99648d6 (Cygwin: sys/cpuset.h: add cpuset-specific external functions) --- win

[PATCH] Cygwin: Update release/3.4.8 for latest commit

2023-07-12 Thread Mark Geisert
--- winsup/cygwin/release/3.4.8 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/release/3.4.8 b/winsup/cygwin/release/3.4.8 index d1e34ce3c..3113be8cb 100644 --- a/winsup/cygwin/release/3.4.8 +++ b/winsup/cygwin/release/3.4.8 @@ -3,3 +3,6 @@ Bug Fixes - Make safe for c89

Re: Where should relnote updates for Cygwin DLL patches be going?

2023-07-11 Thread Mark Geisert
Hi Corinna, Corinna Vinschen wrote: On Jul 11 01:05, Mark Geisert wrote: AIUI for cygwin-3_4-branch they currently go to release/3.4.8. For the main|master branch they currently go where? release/3.5.0 An entry there is only necessary if it doesn't get picked for 3.4 anyway. Ah

Where should relnote updates for Cygwin DLL patches be going?

2023-07-11 Thread Mark Geisert
AIUI for cygwin-3_4-branch they currently go to release/3.4.8. For the main|master branch they currently go where? I hope to get it right the first time ;-). Thank you, ..mark

[PATCH v2] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-09 Thread Mark Geisert
uly/253927.html Fixes: 9cc910dd33a5 (Cygwin: Make safe for c89 compilations) Signed-off-by: Mark Geisert --- winsup/cygwin/include/sys/cpuset.h | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/include/sys/cpuset.h b/winsup/cygwin/include/sys/cpus

Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-09 Thread Mark Geisert
Hi all, Brian Inglis wrote: On 2023-07-08 15:53, Mark Geisert wrote: Mark Geisert wrote: I got tripped up by misspelling and not being able to link clang{,++} programs on my test system.  I checked the .o files with objdump: Clang and clang++ both support __builtin_popcountl, but they emit

Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-08 Thread Mark Geisert
Mark Geisert wrote: [... blah blah ...] I got tripped up by misspelling and not being able to link clang{,++} programs on my test system. I checked the .o files with objdump: Clang and clang++ both support __builtin_popcountl, but they emit code for the Hackers Delight algorithm rather than

Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-08 Thread Mark Geisert
Brian Inglis wrote: On 2023-07-07 12:54, Brian Inglis wrote: On 2023-07-07 03:44, Corinna Vinschen wrote: Hi Mark, On Jul  7 00:41, Mark Geisert wrote: The current version of cannot be compiled by Clang due to the use of __builtin* functions.  Their presence here was a dubious optimization

Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-07 Thread Mark Geisert
Hi Corinna, Corinna Vinschen wrote: On Jul 7 00:41, Mark Geisert wrote: The current version of cannot be compiled by Clang due to the use of __builtin* functions. Their presence here was a dubious optimization anyway, so their usage has been converted to standard library functions

[PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-07 Thread Mark Geisert
fe for c89 compilations) Signed-off-by: Mark Geisert --- winsup/cygwin/include/sys/cpuset.h | 28 +++- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/winsup/cygwin/include/sys/cpuset.h b/winsup/cygwin/include/sys/cpuset.h index 0c95134ff..f76e788d5 100644 --- a/win

Re: [PATCH v2] Cygwin: Make safe for c89 compilations

2023-07-04 Thread Mark Geisert
Corinna Vinschen wrote: On Jul 4 16:33, Corinna Vinschen wrote: On Jul 3 17:51, Mark Geisert wrote: Four modifications to include/sys/cpuset.h: * Change C++-style comments to C-style also supported by C++ * Change "inline" to "__inline" on code lines * Add "#includ

[PATCH v2] Cygwin: Make safe for c89 compilations

2023-07-03 Thread Mark Geisert
bd99ec ("Cygwin: Fix type mismatch on sys/cpuset.h") Signed-off-by: Mark Geisert --- winsup/cygwin/include/sys/cpuset.h | 49 -- winsup/cygwin/release/3.4.7| 3 ++ 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/winsup/cygwin/include/sys/cp

Re: [PATCH] Cygwin: Make safe for c89 compilations

2023-07-03 Thread Mark Geisert
Hi Corinna, Corinna Vinschen wrote: On Jul 3 02:27, Mark Geisert wrote: Brian Inglis wrote: On 2023-07-03 00:17, Mark Geisert wrote: Three modifications to include/sys/cpuset.h: * Change C++-style comments to C-style also supported by C++ * Change "inline" to "__inline

Re: [PATCH] Cygwin: Make safe for c89 compilations

2023-07-03 Thread Mark Geisert
Hi Brian, Brian Inglis wrote: On 2023-07-03 00:17, Mark Geisert wrote: Three modifications to include/sys/cpuset.h: * Change C++-style comments to C-style also supported by C++ * Change "inline" to "__inline" on code lines * Don't declare loop variables on for-loop

[PATCH] Cygwin: Make safe for c89 compilations

2023-07-03 Thread Mark Geisert
Three modifications to include/sys/cpuset.h: * Change C++-style comments to C-style also supported by C++ * Change "inline" to "__inline" on code lines * Don't declare loop variables on for-loop init clauses Tested by first reproducing the reported issue with home-grown test programs by compiling

Re: [PATCH v2] Cygwin: Fix type mismatch on sys/cpuset.h

2023-07-03 Thread Mark Geisert
Mark Geisert wrote: [...] Thanks for the report and investigations.  I'll address this shortly. A candidate patch for 3.4.7 is incoming. If it passes muster I'll fire off a patch for 3.3.6. I don't know why I'm using military terminology. Independence Day soon in the US, I guess. Cheers

Re: [PATCH v2] Cygwin: Fix type mismatch on sys/cpuset.h

2023-07-02 Thread Mark Geisert
Hi all, Brian Inglis wrote: On 2023-07-01 08:20, Jon Turney wrote: On 14/03/2023 08:56, Mark Geisert wrote: Addresses https://cygwin.com/pipermail/cygwin/2023-March/253220.html Take the opportunity to follow FreeBSD's and Linux's lead in recasting macro inline code as calls to static inline

[PATCH v2] Cygwin: Fix type mismatch on sys/cpuset.h

2023-03-14 Thread Mark Geisert
Addresses https://cygwin.com/pipermail/cygwin/2023-March/253220.html Take the opportunity to follow FreeBSD's and Linux's lead in recasting macro inline code as calls to static inline functions. This allows the macros to be type-safe. In addition, added a lower bound check to the functions that

[PATCH] Cygwin: Fix type mismatch on sys/cpuset.h -- relnote 3.4.6

2023-03-11 Thread Mark Geisert
--- winsup/cygwin/release/3.4.6 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/release/3.4.6 b/winsup/cygwin/release/3.4.6 index ccc168a95..ed124ed37 100644 --- a/winsup/cygwin/release/3.4.6 +++ b/winsup/cygwin/release/3.4.6 @@ -12,3 +12,6 @@ Addresses:

[PATCH] Cygwin: Fix type mismatch on sys/cpuset.h

2023-03-10 Thread Mark Geisert
Addresses https://cygwin.com/pipermail/cygwin/2023-March/253220.html Take the opportunity to follow FreeBSD's and Linux's lead in recasting macro inline code as calls to static inline functions. This allows the macros to be type-safe. In addition, added a lower bound check to the functions that

Re: type mismatch on cpuset.h

2023-03-07 Thread Mark Geisert
[Redirected here from the main mailing list...] Hi Corinna, Corinna Vinschen via Cygwin wrote: Hi Mark, On Mar 6 07:57, Marco Atzeri via Cygwin wrote: Hi, building latest gdal I noticed a type mismatch, that forced me to build with "-fpermissive" on /usr/include/sys/cpuset.h #define

[PATCH] Cygwin: Have gmondump support ssp-generated gmon.out

2022-06-08 Thread Mark Geisert
Cygwin tool ssp generates gmon.out files with different address resolution than other tools do. Two address bytes per bucket rather than the usual four address bytes. Gprof can deal with the difference but gmondump can't because the latter's gmon.out header validation fails. - Remove the

[PATCH] Cygwin: Fix "0x0x" in gmondump and ssp man pages

2022-04-21 Thread Mark Geisert
A recent patch fixed gmondump to stop printing "0x0x" as an address prefix. It turns out the Cygwin User's Guide and the gmondump and ssp man pages (all from utils.xml) have examples of the same error. --- winsup/cygwin/release/3.3.5 | 2 +- winsup/doc/utils.xml| 4 ++-- 2 files

Re: [PATCH] Cygwin: Fix gmondump formatting goofs

2022-03-16 Thread Mark Geisert
Corinna Vinschen wrote: On Mar 14 17:47, Mark Geisert wrote: The rewrite of %X to %p was malhandled. Fix that/them. This should probably go into 3.3 as well. Care to write a matching entry for the release/3.3.5 file? Done, under separate patch https://cygwin.com/pipermail/cygwin-patches

[PATCH] Cygwin: document recent gmondump formatting fix

2022-03-16 Thread Mark Geisert
--- winsup/cygwin/release/3.3.5 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/release/3.3.5 b/winsup/cygwin/release/3.3.5 index 752d65703..d2a7f772a 100644 --- a/winsup/cygwin/release/3.3.5 +++ b/winsup/cygwin/release/3.3.5 @@ -40,3 +40,6 @@ Bug Fixes - Fix a problem that

[PATCH] Cygwin: Fix gmondump formatting goofs

2022-03-14 Thread Mark Geisert
The rewrite of %X to %p was malhandled. Fix that/them. --- winsup/utils/gmondump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winsup/utils/gmondump.c b/winsup/utils/gmondump.c index ec9db0598..2d29e826d 100644 --- a/winsup/utils/gmondump.c +++

Re: [PATCH v2] Cygwin: clipboard: Fix a bug in read().

2021-12-08 Thread Mark Geisert
Takashi Yano wrote: [...] I think the following patch makes the intent clearer. What do you think? From d0aee9af225384a24ac6301f987ce2e94f262500 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Wed, 8 Dec 2021 17:06:03 +0900 Subject: [PATCH] Cygwin: clipboard: Make intent of the code

Re: [PATCH v2] Cygwin: clipboard: Fix a bug in read().

2021-12-07 Thread Mark Geisert
Brian Inglis wrote: On 2021-12-07 13:18, Thomas Wolff wrote: Am 07.12.2021 um 15:23 schrieb Corinna Vinschen: On Dec  7 23:00, Takashi Yano wrote: - Fix a bug in fhandler_dev_clipboard::read() that the second read    fails with 'Bad address'. Addresses:   

[PATCH v2] Cygwin: Make native clipboard layout same for 32- and 64-bit

2021-10-25 Thread Mark Geisert
This patch unifies the layout of the clipboard descriptor cygcb_t for 32- and 64-bit Cygwin. It allows correct copy/paste between the two environments without corruption of user's copied data and without access violations due to interpreting that data as a size field. The definitions of

Re: [PATCH] Cygwin: Make native clipboard layout same for 32- and 64-bit

2021-10-23 Thread Mark Geisert
Ken Brown wrote: On 10/23/2021 1:35 AM, Mark Geisert wrote: Corinna Vinschen wrote: Just to close this up prior to the 3.3.0 release... Given we never actually strived for 32<->64 bit interoperability, it's hard to argue why this should be different for the clipboard stuff. Running 32

Re: [PATCH] Cygwin: Make native clipboard layout same for 32- and 64-bit

2021-10-22 Thread Mark Geisert
Hi all, Corinna Vinschen wrote: On Oct 11 08:11, Ken Brown wrote: On 10/11/2021 2:13 AM, Mark Geisert wrote: It's just that after submitting the patch I realized that, if we really are going to support both Cygwin archs (x86_64 and i686), there is still the issue of different cygcb_t layouts

Re: [PATCH] Cygwin: Make native clipboard layout same for 32- and 64-bit

2021-10-11 Thread Mark Geisert
Ken Brown wrote: On 10/9/2021 10:29 AM, Jon Turney wrote: [...] On 10/8/2021 5:52 AM, Takashi Yano wrote: [...] Thanks all for the comments; much appreciated. They'll be factored into v2 in one form or another. I pronounced my original patch "bad" not because of any problem with code

Re: [PATCH] Cygwin: Make native clipboard layout same for 32- and 64-bit

2021-10-06 Thread Mark Geisert
Mark Geisert wrote: This allows correct copy and pasting between the two Cygwin flavors. [...] Eh, that's a bad patch. Don't apply. It's OK for concept review. v2 forthcoming. Thanks, ..mark

[PATCH] Cygwin: Make native clipboard layout same for 32- and 64-bit

2021-10-06 Thread Mark Geisert
This allows correct copy and pasting between the two Cygwin flavors. What's done is to overlay the differing timespec formats via a union within the control structure cygcb_t. Then conversion between the two formats is done on the 32-bit side only. The cygutils package has two programs, putclip

[PATCH] Cygwin: Make gmondump conform to its doc + adjust doc

2021-08-02 Thread Mark Geisert
The doc for gmondump says 1 or more FILENAME are expected, but 0 is handled. That's an oversight. Make invocation with 0 FILENAMEs print a one-line help message. Reword the beginning of profiler's description doc to clarify target's child processes are run but only optionally profiled. ---

[PATCH] Cygwin: More profiler format + small issue fixes

2021-08-02 Thread Mark Geisert
Make sure to cast to ulong all DWORD values displayed with format "%lu". More instances are fixed here than in either my earlier unused patch or Corinna's patch. I decided to use typedef..ulong for more compact code. Address jturney's reported small issues: - Remove explicit external ref for

[PATCH] Cygwin: fix format warnings in profiler.cc

2021-07-21 Thread Mark Geisert
Use new typedef to normalize pids for printing on both 32- and 64-bit Cygwin. --- winsup/utils/profiler.cc | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/winsup/utils/profiler.cc b/winsup/utils/profiler.cc index d1a01c3a2..152bf1cca 100644 ---

[PATCH 3/3] Cygwin: updates to wire in profiler, gmondump

2021-07-15 Thread Mark Geisert
These are updates to wire into the build tree the new tools profiler and gmondump, and to supply documentation for the tools. The documentation for profiler and ssp now mention each other but do not discuss their similarities or differences. That will be handled in a future update to the

[PATCH 2/3] Cygwin: New tool: gmondump

2021-07-15 Thread Mark Geisert
/gmondump.c @@ -0,0 +1,255 @@ +/* +gmondump.c +Displays summary info about given profile data file(s). + +Written by Mark Geisert . + +This file is part of Cygwin. + +This software is a copyrighted work licensed under the terms of the +Cygwin license. Please consult the file

[PATCH 1/3] Cygwin: New tool: profiler

2021-07-15 Thread Mark Geisert
e mode 100644 index 0..d1a01c3a2 --- /dev/null +++ b/winsup/utils/profiler.cc @@ -0,0 +1,1109 @@ +/* +profiler.cc +Periodically samples IP of a process and its DLLs; writes gprof data files. + +Written by Mark Geisert , who admits to +copying pretty liberally from strace.cc.

[PATCH] Cygwin: Zero out gmon header before use

2021-06-23 Thread Mark Geisert
Tools that process gmon.out files can be confused by gmon header fields with garbage in them due to lack of initialization. Repair that. --- winsup/cygwin/gmon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/gmon.c b/winsup/cygwin/gmon.c index b31842cd9..8b1c449c4 100644 ---

Re: [PATCH] Cygwin: New tool: cygmon

2021-06-17 Thread Mark Geisert
Hi Jon, I appreciate your review. I will fold the suggestions from your short email plus this longer email into a v2 patch fairly soon. Jon Turney wrote: On 12/06/2021 07:46, Mark Geisert wrote: diff --git a/winsup/utils/cygmon.cc b/winsup/utils/cygmon.cc new file mode 100644 index

Re: [PATCH] Cygwin: New tool: cygmon

2021-06-15 Thread Mark Geisert
Hi Jon, Jon Turney wrote: On 12/06/2021 07:46, Mark Geisert wrote: This tool is a sampling profiler of Cygwin programs with their DLLs. Presently its development is managed at https://github.com/mgeisert/cygmon. Documentation of cygmon has been added to the usual doc/utils.xml file. Nice

[PATCH] Cygwin: New tool: cygmon

2021-06-12 Thread Mark Geisert
ff --git a/winsup/utils/cygmon.cc b/winsup/utils/cygmon.cc new file mode 100644 index 0..9156b27d7 --- /dev/null +++ b/winsup/utils/cygmon.cc @@ -0,0 +1,1240 @@ +/* +cygmon.cc +Periodically samples IP of a process and its DLLs; writes gprof data files. + +Written by Mark Geisert ,

Re: [PATCH v2] Cygwin: Have tmpfile(3) use O_TMPFILE

2021-02-12 Thread Mark Geisert
Corinna Vinschen via Cygwin-patches wrote: [...] The patch was missing the EXPORT_ALIAS for tmpfile64, as outlined in https://cygwin.com/pipermail/cygwin-developers/2021-February/012039.html I added this to the patch and pushed it. Oof, I missed that on the v2 patch. Thanks for catching it!

[PATCH v2] Cygwin: Have tmpfile(3) use O_TMPFILE

2021-02-10 Thread Mark Geisert
Per discussion on cygwin-developers, a Cygwin tmpfile(3) implementation has been added to syscalls.cc. This overrides the one supplied by newlib. Then the open(2) flag O_TMPFILE was added to the open call that tmpfile internally makes. This v2 patch removes O_CREAT from open() call as O_TMPFILE

Re: [PATCH] Cygwin: Have tmpfile(3) use O_TMPFILE

2021-02-10 Thread Mark Geisert
Hi Corinna, Corinna Vinschen via Cygwin-patches wrote: Hi Mark, On Feb 9 02:50, Mark Geisert wrote: Per discussion on cygwin-developers, a Cygwin tmpfile(3) implementation has been added to syscalls.cc. This overrides the one supplied by newlib. Then the open(2) flag O_TMPFILE was added

[PATCH] Cygwin: Have tmpfile(3) use O_TMPFILE

2021-02-09 Thread Mark Geisert
Per discussion on cygwin-developers, a Cygwin tmpfile(3) implementation has been added to syscalls.cc. This overrides the one supplied by newlib. Then the open(2) flag O_TMPFILE was added to the open call that tmpfile internally makes. --- winsup/cygwin/release/3.2.0 | 4

Re: [PATCH] Cygwin: Interim malloc speedup

2021-01-17 Thread Mark Geisert
Hi Corinna, Happy New Year back at you! I'm very glad to see you posting again! Corinna Vinschen via Cygwin-patches wrote: Hi Mark, Happy New Year! On Dec 21 20:53, Mark Geisert wrote: Replaces function-level lock with data-level lock provided by existing dlmalloc. Sets up to enable

Re: [PATCH] Cygwin: Interim malloc speedup -- addendum

2020-12-24 Thread Mark Geisert
I could easily provide an updated patch without the MSPACES stuff, given that that aspect is not really functional at this point. Just let me know. ..mark

[PATCH] Cygwin: Interim malloc speedup

2020-12-21 Thread Mark Geisert
Replaces function-level lock with data-level lock provided by existing dlmalloc. Sets up to enable dlmalloc's MSPACES, but does not yet enable them due to visible but uninvestigated issues. Single-thread applications may or may not see a performance gain, depending on how heavily it uses the

[PATCH] Cygwin: Allow to set SO_PEERCRED zero (v2)

2020-12-07 Thread Mark Geisert
The existing code errors as EINVAL any attempt to set a value for SO_PEERCRED via setsockopt() on an AF_UNIX/AF_LOCAL socket. But to enable the workaround set_no_getpeereid behavior for Python one has to be able to set SO_PEERCRED to zero. Ergo, this patch. Python has no way to specify a NULL

[PATCH] Cygwin: Allow to set SO_PEERCRED zero

2020-12-06 Thread Mark Geisert
The existing code errors as EINVAL any attempt to set a value for SO_PEERCRED via setsockopt() on an AF_UNIX/AF_LOCAL socket. But to enable the workaround set_no_getpeereid behavior for Python one has to be able to set SO_PEERCRED to zero. Ergo, this patch. Python has no way to specify a NULL

[PATCH] Cygwin: Launch cygmagic with bash, not sh

2020-12-06 Thread Mark Geisert
On some systems /bin/sh is not /bin/bash and cygmagic has bash-isms in it. So even though cygmagic has a /bin/bash shebang, it also needs to be launched with bash from within Makefile.in. --- winsup/cygwin/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] Cygwin: Speed up mkimport

2020-11-27 Thread Mark Geisert
Jon Turney wrote: On 26/11/2020 09:56, Mark Geisert wrote: @@ -86,8 +94,18 @@ for my $f (keys %text) {   if (!$text{$f}) {   unlink $f;   } else { -    system $objcopy, '-R', '.text', $f and exit 1; -    system $objcopy, '-R', '.bss', '-R', '.data', "t-$f"

Re: [PATCH] Cygwin: Speed up mkimport

2020-11-27 Thread Mark Geisert
Achim Gratz wrote: Mark Geisert writes: + # Do two objcopy calls at once to avoid one system() call overhead + system '(', $objcopy, '-R', '.text', $f, ')', '||', + $objcopy, '-R', '.bss', '-R', '.data', "t-$f" and exit 1; That doesn't do what

Re: [PATCH] Cygwin: Speed up mkimport

2020-11-26 Thread Mark Geisert
Previously, Mark Geisert wrote: Cut mkimport elapsed time in half by forking each iteration of the two time-consuming loops within. Only do this if more than one CPU is present. In the second loop, combine the two 'objdump' calls into one

[PATCH] Cygwin: Speed up mkimport

2020-11-26 Thread Mark Geisert
Cut mkimport elapsed time in half by forking each iteration of the two time-consuming loops within. Only do this if more than one CPU is present. In the second loop, combine the two 'objdump' calls into one system() invocation to avoid a system() invocation per iteration. ---

Re: [PATCH v2 0/6] Some AF_UNIX fixes

2020-10-14 Thread Mark Geisert
Ken Brown via Cygwin-patches wrote: Are you aware of any test suite that I could run?  I've been using examples from Kerrisk's book, because that's what I read to learn the basics of sockets.  But those are just examples and are not meant to be comprehensive. In ye olden days I used to use

Re: [PATCH] Cygwin: malloc tune-up

2020-08-25 Thread Mark Geisert
Hi Corinna, Well, this patch turned out to be half-baked. Locking is working correctly because USE_LOCKS was set to 1 for malloc.cc's compilation. The torture test I run validated that. OTOH as you said, MSPACES was set 1 for malloc.cc but 0 for malloc_wrapper.cc. So this patch yields a

[PATCH] Cygwin: malloc tune-up

2020-08-23 Thread Mark Geisert
1. Replace global malloc lock with finer-grained internal locks. 2. Enable MSPACES, i.e. thread-specific memory pools. Porting and testing of several dlmalloc-related malloc implementations (ptmalloc, ptmalloc2, ptmalloc3, nedalloc) shows that they are no faster than the current dlmalloc used by

Re: Cygwin 3.1.6

2020-07-06 Thread Mark Geisert
Corinna Vinschen wrote: Hi guys, Do you have anything in the loop which should go into 3.1.6? Nothing from me, thanks. ..mark

Re: [PATCH 1/3 v3] Cygwin: tzcode resync: basics

2020-06-09 Thread Mark Geisert
Hi Brian, On Tue, 9 Jun 2020, Brian Inglis wrote: On 2020-05-26 02:27, Corinna Vinschen wrote: On May 26 00:09, Mark Geisert wrote: Corinna Vinschen wrote: On May 22 02:32, Mark Geisert wrote: On May 25 14:06, Corinna Vinschen wrote: Hi folks, The tzcode package needs updated to get

Re: [PATCH 1/3 v3] Cygwin: tzcode resync: basics

2020-05-26 Thread Mark Geisert
Hi Corinna, Corinna Vinschen wrote: Hi Mark, On May 22 02:32, Mark Geisert wrote: On May 25 14:06, Corinna Vinschen wrote: Modifies winsup/cygwin/Makefile.in to build localtime.o from items in new winsup/cygwin/tzcode subdirectory. Compiler option "-fpermissive" is used to accep

[PATCH 1/3 v3] Cygwin: tzcode resync: basics

2020-05-22 Thread Mark Geisert
Modifies winsup/cygwin/Makefile.in to build localtime.o from items in new winsup/cygwin/tzcode subdirectory. Compiler option "-fpermissive" is used to accept warnings about missing casts on the return values of malloc() calls. This patch also removes existing localtime.cc and tz_posixrules.h

[PATCH 3/3 v3] Cygwin: tzcode resync: details

2020-05-22 Thread Mark Geisert
@@ +/* + How the code in this directory is supposed to work... + 2020/05/22 Mark Geisert + + localtime.cc is the Cygwin-specific module that is compiled into + the Cygwin DLL when the latter is built. It's just a wrapper that + #defines a bunch of stuff then #includes localtime.c

[PATCH 2/3 v3] Cygwin: tzcode resync: imports

2020-05-22 Thread Mark Geisert
Import most recent NetBSD localtime.c, private.h, and tzfile.h. An empty namespace.h suffices for Cygwin. --- winsup/cygwin/tzcode/localtime.c | 2493 ++ winsup/cygwin/tzcode/namespace.h |0 winsup/cygwin/tzcode/private.h | 795 ++

[PATCH 0/3 v3] Cygwin: tzcode resync

2020-05-22 Thread Mark Geisert
This is v3 of this patch set incorporating review comments on v2. I've minimized the size of the localtime.c.patch file by beefing up #defines in the wrapper localtime.cc. I believe I've addressed all comments. This patch set has been tested on both 64- and 32-bit Cygwin. The initial shell

[PATCH 2/3] Cygwin: tzcode resync v2: imports

2020-05-18 Thread Mark Geisert
Import most recent NetBSD localtime.c, private.h, and tzfile.h. --- winsup/cygwin/tzcode/localtime.c | 2493 ++ winsup/cygwin/tzcode/private.h | 795 ++ winsup/cygwin/tzcode/tzfile.h| 174 +++ 3 files changed, 3462 insertions(+) create mode 100644

[PATCH 0/3] Cygwin: tzcode resync v2

2020-05-18 Thread Mark Geisert
This is a reorganization of the previous patch contents to cut down on extraneous material. It seems to be complete and could thus be applied to a copy of the newlib-cygwin tree successfully for testing or review. Methods of testing can be discussed by reply to this post, or on

[PATCH 3/3] Cygwin: tzcode resync v2: details

2020-05-18 Thread Mark Geisert
the code in this directory is supposed to work... + 2020/05/13 Mark Geisert + + localtime.cc is the Cygwin-specific module that is compiled into + the Cygwin DLL when the latter is built. It's just a wrapper that + #defines a bunch of stuff then #includes localtime.c

[PATCH 1/3] Cygwin: tzcode resync v2: basics

2020-05-18 Thread Mark Geisert
Modifies winsup/cygwin/Makefile.in to build localtime.o from items in new winsup/cygwin/tzcode subdirectory. Removes existing localtime.cc and tz_posixrules.h from winsup/cygwin as they are superseded by the following patches. --- winsup/cygwin/Makefile.in | 12 +-

Re [Cygwin PATCH */9] tzcode resync -- for discussion only

2020-05-13 Thread Mark Geisert
I'm not absolutely sure yet but I think this patch set isn't complete. What's been posted is OK for discussion (on cygwin-developers?) but would need to be augmented if you're going to apply as-is. I had a git commit/revert mishap and these are recovered file versions. I belatedly discovered

[Cygwin PATCH 6/9] tzcode resync: namespace.h

2020-05-13 Thread Mark Geisert
Empty file not including current NetBSD namespace.h because Cygwin doesn't implement that functionality. This allows compilation that avoids an error due to a missing include file. --- winsup/cygwin/tzcode/namespace.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644

[Cygwin PATCH 8/9] tzcode resync: tzfile.h

2020-05-13 Thread Mark Geisert
Imported NetBSD tzfile.h, current as of 2020/05/13, version 1.10. --- winsup/cygwin/tzcode/tzfile.h | 174 ++ 1 file changed, 174 insertions(+) create mode 100644 winsup/cygwin/tzcode/tzfile.h diff --git a/winsup/cygwin/tzcode/tzfile.h

[Cygwin PATCH 9/9] tzcode resync: tz_posixrules.h

2020-05-13 Thread Mark Geisert
Internal copy of file /usr/share/zoneinfo/posixrules generated from the Cygwin tzdata 2020a-1 package. Current as of 2020/05/13. --- winsup/cygwin/tzcode/tz_posixrules.h | 231 +++ 1 file changed, 231 insertions(+) create mode 100644 winsup/cygwin/tzcode/tz_posixrules.h

[Cygwin PATCH 3/9] tzcode resync: localtime.cc

2020-05-13 Thread Mark Geisert
Cygwin's wrapper around NetBSD's localtime.c. --- winsup/cygwin/tzcode/localtime.cc | 162 ++ 1 file changed, 162 insertions(+) create mode 100644 winsup/cygwin/tzcode/localtime.cc diff --git a/winsup/cygwin/tzcode/localtime.cc b/winsup/cygwin/tzcode/localtime.cc

[Cygwin PATCH 1/9] tzcode resync: Makefile.in

2020-05-13 Thread Mark Geisert
Establish cygwin subdirectory tzcode to hold updates to imported NetBSD files. --- winsup/cygwin/Makefile.in | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index f273ba793..69aa2277e 100644 ---

[Cygwin PATCH 4/9] tzcode resync: localtime.c.patched

2020-05-13 Thread Mark Geisert
Patched copy of NetBSD's localtime.c to hold changes that could not be accomplished in the wrapper file localtime.cc. It is this file that compilation of localtime.cc includes. --- winsup/cygwin/tzcode/localtime.c.patched | 2509 ++ 1 file changed, 2509 insertions(+) create

[Cygwin PATCH 5/9] tzcode resync: localtime.c

2020-05-13 Thread Mark Geisert
Imported NetBSD localtime.c, current as of 2020/05/13, version 1.122. --- winsup/cygwin/tzcode/localtime.c | 2493 ++ 1 file changed, 2493 insertions(+) create mode 100644 winsup/cygwin/tzcode/localtime.c diff --git a/winsup/cygwin/tzcode/localtime.c

[Cygwin PATCH 2/9] tzcode resync: README

2020-05-13 Thread Mark Geisert
/winsup/cygwin/tzcode/README @@ -0,0 +1,37 @@ +/* + How the code in this directory is supposed to work... + 2020/05/13 Mark Geisert + + localtime.cc is the Cygwin-specific module that is compiled into + the Cygwin DLL when the latter is built. It's just a wrapper

[Cygwin PATCH 7/9] tzcode resync: private.h

2020-05-13 Thread Mark Geisert
Imported NetBSD private.h, current as of 2020/05/13, version 1.55. --- winsup/cygwin/tzcode/private.h | 795 + 1 file changed, 795 insertions(+) create mode 100644 winsup/cygwin/tzcode/private.h diff --git a/winsup/cygwin/tzcode/private.h

[PATCH] Cygwin: Add missing Linux #define of CPU_SETSIZE

2019-12-22 Thread Mark Geisert
Though our implementation of cpu sets doesn't need it, software from Linux environments expects this definition to be present. It's documented on the Linux CPU_SET(3) man page but was left out due to oversight. Addresses https://cygwin.com/ml/cygwin/2019-12/msg00248.html ---

[PATCH] Cygwin: Raise dumpstack frame limit to 32

2019-11-07 Thread Mark Geisert
Create a #define for the limit and raise it from 16 to 32. --- winsup/cygwin/exceptions.cc | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 132fea427..3e7d7275c 100644 --- a/winsup/cygwin/exceptions.cc +++

[PATCH] Cygwin: Doc change to note stackdump limit patch

2019-11-07 Thread Mark Geisert
--- winsup/cygwin/release/3.1.0 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/release/3.1.0 b/winsup/cygwin/release/3.1.0 index 1b9d23615..345dd62a5 100644 --- a/winsup/cygwin/release/3.1.0 +++ b/winsup/cygwin/release/3.1.0 @@ -35,6 +35,9 @@ What changed: - Improve

[PATCH] Cygwin: ldd: Try harder to get dll names

2019-08-15 Thread Mark Geisert
Borrow a trick from strace to lessen occurrences of "??? => ???" in ldd output. Specifically, if the module name isn't found in the usual place in the mapped image, use the file handle we have to look up the name. --- winsup/utils/Makefile.in | 2 +- winsup/utils/ldd.cc | 44

Re: [PATCH v2] Cygwin: Implement CPU_SET(3) macros

2019-08-04 Thread Mark Geisert
Sorry for the repetition... On Sun, 4 Aug 2019, Mark Geisert wrote: This patch supplies an implementation of the CPU_SET(3) processor affinity macros as documented on the relevant Linux man page. There is a different implementation of cpusets under libc/sys/RTEMS that has FreeBSD compatibility

[PATCH v2] Cygwin: Implement CPU_SET(3) macros

2019-08-04 Thread Mark Geisert
This patch supplies an implementation of the CPU_SET(3) processor affinity macros as documented on the relevant Linux man page. There is a different implementation of cpusets under libc/sys/RTEMS that has FreeBSD compatibility and is built on top of FreeBSD bitsets. This implementation can be

Re: [PATCH] Cygwin: Implement CPU_SET(3) macros

2019-07-30 Thread Mark Geisert
On Fri, 26 Jul 2019, Corinna Vinschen wrote: On Jul 25 14:15, Mark Geisert wrote: Corinna Vinschen wrote: Hi Mark, On Jul 1 01:55, Mark Geisert wrote: Corinna Vinschen wrote: On Jun 30 15:59, Mark Geisert wrote: This patch supplies an implementation of the CPU_SET(3) processor affinity

Re: [PATCH] Cygwin: Implement CPU_SET(3) macros

2019-07-25 Thread Mark Geisert
Corinna Vinschen wrote: Hi Mark, On Jul 1 01:55, Mark Geisert wrote: Corinna Vinschen wrote: On Jun 30 15:59, Mark Geisert wrote: This patch supplies an implementation of the CPU_SET(3) processor affinity macros as documented on the relevant Linux man page. --- winsup/cygwin/include/sys

Re: [PATCH] Cygwin: Implement CPU_SET(3) macros

2019-07-01 Thread Mark Geisert
Corinna Vinschen wrote: Hi Mark, On Jun 30 15:59, Mark Geisert wrote: This patch supplies an implementation of the CPU_SET(3) processor affinity macros as documented on the relevant Linux man page. --- winsup/cygwin/include/sys/cpuset.h | 62 +++--- winsup/cygwin

[PATCH] Cygwin: Implement CPU_SET(3) macros

2019-06-30 Thread Mark Geisert
This patch supplies an implementation of the CPU_SET(3) processor affinity macros as documented on the relevant Linux man page. --- winsup/cygwin/include/sys/cpuset.h | 62 +++--- winsup/cygwin/sched.cc | 8 ++-- 2 files changed, 60 insertions(+), 10

  1   2   >