Re: [Aarch64] Fix _lseek prototype
Eric Blake <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
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. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org