[PATCH 2/6] Use INLINE_SYSCALL_ERROR_RETURN_VALUE

H.J. Lu hjl.tools@gmail.com
Tue Oct 13 15:57:00 GMT 2015


On Tue, Oct 13, 2015 at 7:52 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Oct 13, 2015 at 7:14 AM, Andreas Schwab <schwab@suse.de> wrote:
>> "H.J. Lu" <hjl.tools@gmail.com> writes:
>>
>>> On Tue, Oct 13, 2015 at 6:58 AM, Florian Weimer <fweimer@redhat.com> wrote:
>>>> On 10/13/2015 03:56 PM, H.J. Lu wrote:
>>>>
>>>>> It looks (ptrdiff_t) isn't needed.
>>>>
>>>> It's not needed on x86_64, but we don't know if there will be
>>>> architectures which will eventually need it (or already do).  The
>>>> existing code had -1L, so I assumed it was better to play it safe and
>>>> mirror that.
>>>
>>> Yes, the cast is also needed on x86-64 if __syscall_error is used:
>>>
>>> [hjl@gnu-tools-1 tmp]$ cat x.c
>>> #include <stddef.h>
>>>
>>> extern int __syscall_error (void);
>>
>> __syscall_error returns long on x86_64.
>>
>
> In this case, (ptrdiff_t) isn't need.
>

Here is the updated patch.  There is no code change in libc.so on
x86-64.  OK for master?

Thanks.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Use-INLINE_SYSCALL_ERROR_RETURN_VALUE.patch
Type: text/x-patch
Size: 24639 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20151013/428881bd/attachment.bin>


More information about the Libc-alpha mailing list