Date: Wed, 3 Apr 2002 14:38:31 -0800 From: "David O'Brien" <obrien@FreeBSD.org> To: Marcel Moolenaar <marcel@xcllnt.net> Cc: arch@FreeBSD.org Subject: Re: Please review: endian invariant kernel dump headers Message-ID: <20020403143831.A92066@dragon.nuxi.com> In-Reply-To: <20020403034208.GA929@dhcp01.pn.xcllnt.net>; from marcel@xcllnt.net on Tue, Apr 02, 2002 at 07:42:08PM -0800 References: <20020403034208.GA929@dhcp01.pn.xcllnt.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 02, 2002 at 07:42:08PM -0800, Marcel Moolenaar wrote: > +#include <machine/endian.h> > + > +#if BYTE_ORDER == LITTLE_ENDIAN > +#define dtoh32(x) __bswap32(x) > +#define dtoh64(x) __bswap64(x) > +#define htod32(x) __bswap32(x) > +#define htod64(x) __bswap64(x) > +#else > +#define dtoh32(x) x > +#define dtoh64(x) x > +#define htod32(x) x > +#define htod64(x) x > +#endif Why can't you just use __bswap64 directly, or some other wrappers. I am seeing this part in more and more source files with the macros taking on serveral spellings. Lets please standardize this. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020403143831.A92066>