problem with detzcode on machines w/64 bit longs

Tom Peterson (USG) tomp at zk3.dec.com
Fri Mar 10 15:02:30 UTC 1995


How about this?

	result = 0;
	for (i = 0; i < 4; ++i)
		result = (result << 8) | (codep[i] & 0xff);
	return((result >> 31) ? (result | (~0L << 32)) : result);

This works on our Alpha's.

- Tom



More information about the tz mailing list