[PATCH v2] Cygwin: Make gcc-specific code in <sys/cpuset.h> compiler-agnostic
Corinna Vinschen
corinna-cygwin@cygwin.com
Mon Jul 10 08:43:11 GMT 2023
On Jul 9 00:59, Mark Geisert wrote:
> The current version of <sys/cpuset.h> cannot be compiled by Clang due to
> the use of builtin versions of malloc, free, and memset. Their presence
> here was a dubious optimization anyway, so their usage has been
> converted to standard library functions.
>
> The use of __builtin_popcountl remains because Clang implements it just
> like gcc does. If/when some other compiler (Rust? Go?) runs into this
> issue we can deal with specialized handling then.
>
> The "#include <sys/cdefs>" here to define __inline can be removed since
> both of the new includes sub-include it.
>
> Addresses: https://cygwin.com/pipermail/cygwin/2023-July/253927.html
> Fixes: 9cc910dd33a5 (Cygwin: Make <sys/cpuset.h> safe for c89 compilations)
> Signed-off-by: Mark Geisert <mark@maxrnd.com>
>
> ---
> winsup/cygwin/include/sys/cpuset.h | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
Pushed.
Thanks,
Corinna
More information about the Cygwin-patches
mailing list