Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Nov 2003 09:38:26 +0100
From:      Pawel Jakub Dawidek <nick@garage.freebsd.pl>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Size-independent byte order swapping functions.
Message-ID:  <20031125083825.GB511@garage.freebsd.pl>
In-Reply-To: <20031125011308.GA98148@VARK.homeunix.com>
References:  <20031124095852.GZ511@garage.freebsd.pl> <20031125011308.GA98148@VARK.homeunix.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--mMdCh5/a0q2ATNCM
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Nov 24, 2003 at 05:13:08PM -0800, David Schultz wrote:
+> On Mon, Nov 24, 2003, Pawel Jakub Dawidek wrote:
+> > If one is using strictly defined types as uint8_t, uint16_t, int32_t, =
etc.
+> > those macros are helpful IMHO, because futher value size changes does =
not
+> > affects code for byte order managing. This also does not hit perfroman=
ce,
+> > because this should be resolved at compile-time.
+>=20
+> Cool, looks useful.
+>=20
+> > I'm not sure if dedicated epanic() is the best way to implement out-of=
-range
+> > errors prevention - the more handy solution should cause compile error.
+>=20
+> See CTASSERT.

I've tried, but you can't use CTASSERT() inside (?:).

--=20
Pawel Jakub Dawidek                       pawel@dawidek.net
UNIX Systems Programmer/Administrator     http://garage.freebsd.pl
Am I Evil? Yes, I Am!                     http://cerber.sourceforge.net

--mMdCh5/a0q2ATNCM
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iQCVAwUBP8MVAT/PhmMH/Mf1AQH7nAQAhgM1xRoWwwrno8RtcHwI0tANzHWW8vGE
hKf63pMutVAyQ70q4URSMcB49WeMxXvw5q7xdCsdGVaNTP8WNhB7H6VKG0F0Z67g
zdpTn3JZ+hR/89h1vsG7HpofoarrdXVrFvTHNSjaqK7zkUpkUf/vdZxSEqy4YhbK
sGEnssVeRcw=
=xTUS
-----END PGP SIGNATURE-----

--mMdCh5/a0q2ATNCM--



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