Re: cmocka under x86-64-w64-mingw32
- Subject: Re: cmocka under x86-64-w64-mingw32
- From: Lukas Slebodnik <lslebodn@xxxxxxxxxx>
- Reply-to: cmocka@xxxxxxxxxxxxxx
- Date: Wed, 5 Aug 2015 07:29:23 +0200
- To: Dejan Črnila <dejan.crnila@xxxxxxxxxxxx>
- Cc: cmocka@xxxxxxxxxxxxxx
On (05/08/15 06:59), Dejan Črnila wrote:
>I'm trying to use cmocka under 64 bit mingw compiler. However it silently
>I have tracked down the issue to these lines in cmocka.h
># if __WORDSIZE == 64
># define LargestIntegralType unsigned long int
># define LargestIntegralType unsigned long long int
>shouldn't be the other way around?
I don't think so.
You can try with sizeof operator.
sizeof(unsigned long int) << should return 4 on 32 bit architecture
and it should return 8 on 64 bit architecture
It's not guaranted by C standard but it works on linux platforms.
What is a sizeof(unsigned long int) under 64 bit mingw compiler?
Is macro __WORDSIZE defined?