This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: PATCH: Use unsigned long int in __bswap_64 for __WORDSIZE == 64


On Thu, Oct 11, 2012 at 10:15 AM, Roland McGrath <roland@hack.frob.com> wrote:
>> 2012-10-09  H.J. Lu  <hongjiu.lu@intel.com>
>>
>>       * sysdeps/x86/bits/byteswap.h [__WORDSIZE == 64](__bswap_64):
>>       Use unsigned long int for GCC >= 4.2.
>
> This should look like:
>
>         * sysdeps/x86/bits/byteswap.h [__GNUC_PREREQ (4, 2)]
>         [__WORDSIZE == 64] (__bswap_64): New implementation, uses
>         'unsigned long int' rather than 'unsigned long long int'
>         in argument and return types.
>
> It's still my preference to define a macro for the type and just
> change all the appearances of either 'unsigned long long' or
> 'unsigned long' in this file to use that macro.
>

I don't think it is worth the complexity since there is a check
for __WORDSIZE already.


-- 
H.J.


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