On Sun, Jun 27, 2004 at 01:00:19AM +0200, Martin Blapp wrote: > Dag-Erling Sm?rgrav has reported that the following patch > is neccessary for dhclient to work on platforms with a 64-bit time_t. i've heard this before and it confused me, because: ~/proj/isc/DHCP/work.freebsd/client:33$ gdb dhclient (gdb) print sizeof(time_t) $1 = 8 and the client never acted up on this amd64 machine. now that i see the host byte order frobs, this suddenly makes much more sense to me. > - convert_num (cfile, (unsigned char *)timep, val, 10, 32); > + convert_num (cfile, (unsigned char *)&num, val, 10, 32); > /* Unswap the number - convert_num returns stuff in NBO. */ > - *timep = ntohl (*timep); /* XXX */ > + *timep = ntohl (num); i haven't thought about this much yet, but i think the best thing may be to detect host time size, rather than enforce 32-bit times. but this probably has many deeper, darker ramnifications, not the least of which is convert_num itself. -- David W. Hankins "If you don't do it right the first time, Operations Engineer you'll just have to do it again." Internet Systems Consortium, Inc. -- Jack T. Hankins -- Attached file included as plaintext by Ecartis -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQFA4DwrcXeLeWu2vmoRAgFzAJ9MPI1DmRDAJpRhZ+RU18HzvWRwrQCeMFRf /g78DzhgZfKsCXoBw9WJ+4o= =lHLP -----END PGP SIGNATURE-----