tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: 64-bit masks



> > 1. What is the correct (portable?) way of specifying 64-bit constants?
> > 
> > If I need a 64-bit constant set to all 1s, will the following work on all  
> > systems
> > 
> > unit64_t num = 0xffffffffffffffffULL;
> 
> I would use ~0ULL.

BTW, UINT64_MAX is in <machine/int_limits.h>,
though it doesn't imply bitmask ops.

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index