Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Feb 2003 19:24:49 -0800 (PST)
From:      Nate Lawson <njl@FreeBSD.org>
To:        current@freebsd.org, hackers@freebsd.org
Subject:   64 bit endian routines
Message-ID:  <200302280324.h1S3OndV078007@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
First, the simple question:  what's the simplest cross-platform way of
implementing scsi_ulto4b and scsi_4btoul (/sys/cam/scsi/scsi_all.h) for
64 bit values.  GEOM (/sys/geom/geom_enc.c) implements it via a 64 bit
cast in g_enc_le8.  Is this the best current way?

Second, anyone done work on unifying our various byte ordering macros?
Besides htonl and ntohl, there are scsi_*ul*, g_enc_*, openssl/aes_locl.h,
machine/endian.h, arpa/nameser.h, and I'm sure there are others.  Perhaps
the best thing is to add macros similar to geom_enc_* to machine/endian.h.
Any ideas?

Thanks,
Nate

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302280324.h1S3OndV078007>