]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: Make <sys/cpuset.h> safe for c89 compilations
authorMark Geisert <mark@maxrnd.com>
Tue, 4 Jul 2023 00:51:41 +0000 (17:51 -0700)
committerCorinna Vinschen <corinna@vinschen.de>
Tue, 4 Jul 2023 14:42:45 +0000 (16:42 +0200)
commit025aec73180044dd56dc0c5723f6e365debf1f85
treef826e121147718b086046dbc72d908abe03684d8
parentfcaa1c496768f0781fe7515852ff7dc3bda67e78
Cygwin: Make <sys/cpuset.h> safe for c89 compilations

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 "#include <sys/cdefs.h>" to make sure __inline is defined
* Don't declare loop variables on for-loop init clauses

Tested by first reproducing the reported issue with home-grown test
programs by compiling with gcc option "-std=c89", then compiling again
using the modified <sys/cpuset.h>. Other "-std=" options tested too.

Addresses: https://cygwin.com/pipermail/cygwin-patches/2023q3/012308.html
Fixes: 315e5fbd99ec ("Cygwin: Fix type mismatch on sys/cpuset.h")
Signed-off-by: Mark Geisert <mark@maxrnd.com>
winsup/cygwin/include/sys/cpuset.h
winsup/cygwin/release/3.4.7
This page took 0.036024 seconds and 5 git commands to generate.