This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Aarch64] Fix _lseek prototype


On Fri, 5 Oct 2018 at 16:08, Eric Blake <eblake@redhat.com> wrote:
>
> On 10/5/18 4:21 AM, Christophe Lyon wrote:
> > Here is an updated version using "off_t" instead of "int".
> > OK?
> >
>
> > -int _lseek (int, int, int);
> > +off_t _lseek (int, int, int);
>
> Per POSIX, the primary function is off_t lseek(int, off_t, int). It
> looks weird that your _lseek uses int instead of off_t offset. Is this
> code only ever used on a 32-bit platform, where off_t will never be a
> 64-bit type?  And since this is '_lseek' rather than 'lseek,' it might
> be okay to have a different signature than POSIX.  Even so, it's still
> better to use off_t consistently, rather than in 1/2 of the places where
> it is typically used.
>

OK, this new patches what was recently committed to the arm port, and
adjusts several other prototypes in the same file.

Christophe

> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.           +1-919-301-3266
> Virtualization:  qemu.org | libvirt.org

Attachment: newlib-prototypes.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]