[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1195fda6-4de3-09fc-8653-42655d7e2b76@gmail.com>
Date: Thu, 29 Oct 2020 12:02:44 +0100
From: Alejandro Colomar <colomar.6.4.3@...il.com>
To: "Michael Kerrisk (man-pages)" <mtk.manpages@...il.com>
Cc: linux-man@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"libc-alpha@...rceware.org" <libc-alpha@...rceware.org>
Subject: Re: [PATCH] getdents.2: Use 'ssize_t' instead of 'int'
[[ CC += linux-kernel, libc-alpha ]]
Hi Michael,
On 2020-10-29 08:13, Michael Kerrisk (man-pages) wrote:
> Hi Alex,
>
> On 10/28/20 11:11 PM, Alejandro Colomar wrote:
>> The glibc wrapper for getdents64() uses ssize_t.
>
> It also changed the types for the arguments, so those need to be
> fixed too.
I saw that, but I sent an email to glibc asking if it was a bug.
I'll hold this patch, and I'll CC this list in that other thread.
>
>> And let's use it also for getdents().
>
> I actually think we should *not* change that. So long as their is
> no wrapper, we should show pretty much what the ABI exposes. (That
> makes me think that the return type should really be long; see
> what you think about DEFINE_SYSCALL3 in the kernel sources.)
Agreed; then getdents() (and all syscalls without a wrapper)
should use 'long', as you said.
BTW: My mind explodes when I try to read through SYSCALL_DEFINEx :)
>
> And you added an include for <sys/types.h>. I'm not sure
> whether that's needed, but it should be explained in the
> commit message.
Agreed.
I should be able to check if it's needed, in ssize_t(3) :p
... Actually it's not needed (<stdio.h> already provides it).
Thanks,
Alex
Powered by blists - more mailing lists