public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@Shaw.ca>
To: cygwin-patches@cygwin.com
Subject: Re: [PATCH v2] Cygwin: Fix type mismatch on sys/cpuset.h
Date: Sat, 1 Jul 2023 09:21:01 -0600	[thread overview]
Message-ID: <8a69d717-64a0-dd79-77b1-7c95947b45ab@Shaw.ca> (raw)
In-Reply-To: <1cf85bfc-9865-e4f7-5c2e-5acc89c3e77f@dronecode.org.uk>

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 functions.  This allows the
>> macros to be type-safe.  In addition, added a lower bound check to the
>> functions that use a cpu number to avoid a potential buffer underrun on
>> a bad argument.  h/t to Corinna for the advice on recasting.
>>
>> Fixes: 362b98b49af5 ("Cygwin: Implement CPU_SET(3) macros")

> There's been a couple of reports that this leads to compilation failures when 
> this header is included in -std=c89 mode.
> Solutions are probably something like:
> * Use __inline__ rather than inline
> * Don't use initial declaration inside the for loop's init-statement
> e.g. https://github.com/tinyproxy/tinyproxy/issues/499

/usr/include/sys/cdefs.h appears to support using __inline instead of __inline__ 
or inline, and is included many places __inline is used: it appears to be 
necessary, but may not be sufficient.

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

  reply	other threads:[~2023-07-01 15:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14  8:56 Mark Geisert
2023-03-14 11:00 ` Corinna Vinschen
2023-07-01 14:20 ` Jon Turney
2023-07-01 15:21   ` Brian Inglis [this message]
2023-07-02 22:05     ` Mark Geisert
2023-07-03  6:15       ` Mark Geisert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8a69d717-64a0-dd79-77b1-7c95947b45ab@Shaw.ca \
    --to=brian.inglis@shaw.ca \
    --cc=cygwin-patches@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).