Subject: htonl and longs
To: None <port-alpha@netbsd.org>
From: Simon Burge <simonb@netbsd.org>
List: port-alpha
Date: 06/18/1999 15:20:34
Hi 64-bit peoples,

I'm looking at making the fortune data files byte-order and word-size
independant, and came across the following in fortune's .dat convertor:

	simonpc:games/fortune/strfile 32> grep str_version *
	strfile.c:      Tbl.str_version = VERSION;
	strfile.c:      Tbl.str_version = htonl(Tbl.str_version);
	strfile.h:      unsigned long   str_version;            /* version number */

Given that htonl is defined to work on the equivalent of u_int32_t's and
unsigned longs are 64 bits, and I right in assuming that the behaviour
of this bit of code is bogus at best?

Simon.