[PATCH 3/7] leek: if lseek syscall is not available, use lseek64 even for !LFS
Vineet Gupta
Vineet.Gupta1 at synopsys.com
Wed Mar 13 08:34:29 UTC 2013
On Tuesday 12 March 2013 08:39 PM, Markos Chandras wrote:
> On 11 March 2013 13:21, Vineet Gupta <Vineet.Gupta1 at synopsys.com> wrote:
>> + __off64_t result;
>> + __off_t high = 0;
>> + return INLINE_SYSCALL(llseek, 5, fd,
>> + __LONG_LONG_PAIR(high, offset),
>> + &result, whence) ?: result;
>> +#endif
>> +/* No need to handle __WORDSIZE == 64 as such a kernel won't define __NR_llseek */
>> }
>> #else
>> # include <errno.h>
>> --
> That looks ok but I see no reason to define 'high' to be 0. Couldn't
> you pass '0' directly to INLINE_SYSCALL?
I could - but this is more readable - any reasonable compiler will do the constant
propagation anyways.
-Vineet
More information about the uClibc
mailing list