Eddie Edwards wrote:
> When compiling the Solaris AVL and zfs DMU modules on Windows I get many 
> warnings where a uintptr_t is cast to an int, and vice versa.  The actual 
> cases seem benign (e.g. AVL is doing unitptr_t & 1 -> int, which is OK) but 
> I'm worried there might be some real issues.
> 
> Just for my sanity, is "int" 32-bits wide on 64-bit Solaris as expected (i.e. 
> long >= int >= short >= char)?

The LP64 model is used not the IPL64 model so:


$ ./sizes32
sizeof(size_t)  = 4
sizeof(ssize_t) = 4
sizeof(off_t)   = 4
sizeof(boolean_t)       = 4
sizeof(uint8_t) = 1
sizeof(uint16_t)        = 2
sizeof(uint32_t)        = 4
sizeof(uint64_t)        = 8
sizeof(int8_t)  = 1
sizeof(int16_t) = 2
sizeof(int32_t) = 4
sizeof(int64_t) = 8
sizeof(unsigned char)   = 1
sizeof(char)    = 1
sizeof(char*)   = 4
sizeof(short)   = 2
sizeof(int)     = 4
sizeof(unsigned int)    = 4
sizeof(long)    = 4
sizeof(unsigned long)   = 4
sizeof(long long)       = 8
sizeof(double)  = 8
sizeof(float)   = 4
sizeof(void*)   = 4


$ ./sizes64
sizeof(size_t)  = 8
sizeof(ssize_t) = 8
sizeof(off_t)   = 8
sizeof(boolean_t)       = 4
sizeof(uint8_t) = 1
sizeof(uint16_t)        = 2
sizeof(uint32_t)        = 4
sizeof(uint64_t)        = 8
sizeof(int8_t)  = 1
sizeof(int16_t) = 2
sizeof(int32_t) = 4
sizeof(int64_t) = 8
sizeof(unsigned char)   = 1
sizeof(char)    = 1
sizeof(char*)   = 8
sizeof(short)   = 2
sizeof(int)     = 4      ### Note this int == int32_t
sizeof(unsigned int)    = 4
sizeof(long)    = 8
sizeof(unsigned long)   = 8
sizeof(long long)       = 8
sizeof(double)  = 8
sizeof(float)   = 4
sizeof(void*)   = 8



-- 
Darren J Moffat

Reply via email to