From: Eric Blake <eblake@redhat.com>
To: Rich Felker <dalias@libc.org>, Florian Weimer <fweimer@redhat.com>
Cc: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>,
glibc list <libc-alpha@sourceware.org>,
linux-man@vger.kernel.org,
Adhemerval Zanella <adhemerval.zanella@linaro.org>
Subject: Re: f_owner_ex vs. POSIX
Date: Mon, 9 Sep 2019 10:15:29 -0500 [thread overview]
Message-ID: <7eaf8ea9-88a6-6531-acf4-46710b3e122b@redhat.com> (raw)
In-Reply-To: <20190903035132.GV9017@brightrain.aerifal.cx>
[-- Attachment #1.1: Type: text/plain, Size: 1424 bytes --]
On 9/2/19 10:51 PM, Rich Felker wrote:
> On Mon, Sep 02, 2019 at 03:44:53PM +0200, Florian Weimer wrote:
>> * Michael Kerrisk:
>>
>>> I do not know what the rationale was for the addition of the 'enum',
>>> and it wouldn't surprise me if there was no public discussion about
>>> it. The use of an 'enum' strikes me as a slightly odd decision (given
>>> that the kernel uses 'int') but, related to your point below, there
>>> is precedent in, for example, the use of an 'enum' for 'idtype_t' in
>>> waitid() inside glibc, while the kernel type for the argument in
>>> the underlying system call is 'int'.
>>
>> There is also the issue of -fshort-enum. Some people probably expect
>> that they can use that option and still use glibc headers.
>>
>> I do not have any inside knowledge why things are like they are.
>> Presumably we can switch the type member to int.
>
> I'm strongly in favor of switch to int. enum types are an
> ABI/compatibility nightmare and have little purpose (unlike enum
> constants which are actually useful).
I'm also in favor of 'int' (but not the 'int32_t' proposal mentioned in
note 4538). Does anyone volunteer to write up the glibc patch, while I
report back to the Austin Group that 'int' is the preferred type for
standardization?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2019-09-09 15:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-29 15:50 f_owner_ex vs. POSIX Eric Blake
2019-09-01 13:23 ` Michael Kerrisk (man-pages)
2019-09-02 13:44 ` Florian Weimer
2019-09-03 3:51 ` Rich Felker
2019-09-09 15:15 ` Eric Blake [this message]
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=7eaf8ea9-88a6-6531-acf4-46710b3e122b@redhat.com \
--to=eblake@redhat.com \
--cc=adhemerval.zanella@linaro.org \
--cc=dalias@libc.org \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.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 NNTP newsgroup(s).