[PATCH 4/4] Consolidate Linux truncate implementations
Adhemerval Zanella
adhemerval.zanella@linaro.org
Thu Sep 22 14:42:00 GMT 2016
On 22/09/2016 11:24, Yury Norov wrote:
>> +/* Truncate PATH to LENGTH bytes. */
>> int
>> -truncate64 (const char *path, off64_t length)
>> +__truncate64 (const char *path, off64_t length)
>> {
>> - unsigned int low = length & 0xffffffff;
>> - unsigned int high = length >> 32;
>> - int result = INLINE_SYSCALL (truncate64, 3, path,
>> - __LONG_LONG_PAIR (high, low));
>> - return result;
>> + return INLINE_SYSCALL_CALL (truncate64, path,
>> + __ALIGNMENT_ARG SYSCALL_LL64 (length));
>> }
>> +weak_alias (__truncate64, truncate64)
>> +
>> +#ifdef __OFF_T_MATCHES_OFF64_T
>> +weak_alias (__truncate64, truncate);
>> +#endif
>
> It seems you forgot weak_alias (__truncate64, __truncate);
>
I do not think it requires to add __truncate alias since glibc currently
does have internal calls to truncate.
More information about the Libc-alpha
mailing list