Re: 64 bit endian routines

2003-02-28 Thread Marcel Moolenaar
On Fri, Feb 28, 2003 at 09:40:35AM -0800, Nate Lawson wrote: > > On Thu, Feb 27, 2003 at 08:45:44PM -0800, Nate Lawson wrote: > > Both scsi and geom implement unaligned access functions > that perform byte > ordering. I never intended to supplant > them with __bswap*(). W

Re: 64 bit endian routines

2003-02-28 Thread Nate Lawson
Date: Thu, 27 Feb 2003 21:17:13 -0800 From: Marcel Moolenaar <[EMAIL PROTECTED]> To: Nate Lawson <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: 64 bit endian routines References: <[

Re: 64 bit endian routines

2003-02-28 Thread Mike Barcroft
Nate Lawson <[EMAIL PROTECTED]> writes: > Both scsi and geom implement unaligned access functions that perform byte > ordering. I never intended to supplant them with __bswap*(). What I want > is for machine/endian.h to have functions that provide 16-64 bit endian > conversions in both aligned an

Re: 64 bit endian routines

2003-02-27 Thread Poul-Henning Kamp
In message <[EMAIL PROTECTED]>, Nate Lawson writ es: >Both scsi and geom implement unaligned access functions that perform byte >ordering. I never intended to supplant them with __bswap*(). What I want >is for machine/endian.h to have functions that provide 16-64 bit endian >conversions in both

Re: 64 bit endian routines

2003-02-27 Thread Marcel Moolenaar
On Thu, Feb 27, 2003 at 08:45:44PM -0800, Nate Lawson wrote: > > Both scsi and geom implement unaligned access functions that perform byte > ordering. I never intended to supplant them with __bswap*(). What I want > is for machine/endian.h to have functions that provide 16-64 bit endian > conver

Re: 64 bit endian routines

2003-02-27 Thread Nate Lawson
Date: Thu, 27 Feb 2003 20:18:49 -0800 From: Marcel Moolenaar <[EMAIL PROTECTED]> To: Mike Barcroft <[EMAIL PROTECTED]> Cc: Nate Lawson <[EMAIL PROTECTED]>, [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: 64 b

Re: 64 bit endian routines

2003-02-27 Thread Marcel Moolenaar
On Thu, Feb 27, 2003 at 10:30:58PM -0500, Mike Barcroft wrote: > > Most of these could probably be implemented in terms of the __bswap*() > functions in , except for vendor sources like > openssl, and htonl and ntohl which already are. I'm not sure if there > would be an advantage to moving the g

Re: 64 bit endian routines

2003-02-27 Thread Mike Barcroft
Nate Lawson <[EMAIL PROTECTED]> writes: > 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

64 bit endian routines

2003-02-27 Thread Nate Lawson
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 unifyi