[CRIU] [PATCH 5/9] print_hex_l: specify the size of the argument explicitly
Pavel Emelyanov
xemul at parallels.com
Thu Jan 17 04:55:40 EST 2013
On 01/17/2013 10:23 AM, Alexander Kartashov wrote:
> On 01/16/2013 09:56 PM, Pavel Emelyanov wrote:
>> On 01/16/2013 09:18 PM, Alexander Kartashov wrote:
>>> On 01/16/2013 07:33 PM, Pavel Emelyanov wrote:
>>>> This breaks log-simple's formats compatibility.
>>> Is it OK to retain the prototype but cast the argument to uint64_t?
>> No. Use
>>
>> #if BITS_PER_LONG==64
>>
>> and declare BITS_PER_LONG somewhere in the header as
>>
>> #define BITS_PER_LONG (sizeof(unsigned long) * 8)
>
> This won't work because sizeof(unsigned long) is expanded after the
> preprocessor pass.
Hm... Indeed :)
> If we want to use the macro BITS_PER_LONG we have to define its value
> explicitly
OK, let's do it.
> but in this case I don't see much difference from using the macro
> CONFIG_X86.
Because 32 bit arch is not only ARM and 64 bit arch is not on x86_64
More information about the CRIU
mailing list