At 09:47 AM 21/10/2002 -0400, Tom Lane wrote:
>Well, the main problem with that is there's no such symbol as
>__BYTE_ORDER ...
What about just:
int i = 256;
then checking the first byte? This should give me the endianness, and makes
a non-destructive write (not sure it it's important). Currently the
commonly used code does not rely on off_t arithmetic, so if possible I'd
like to avoid shift. Does that sound reasonable? Or overly cautious?
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 0500 83 82 82 | ___________ |
Http://www.rhyme.com.au | / \| | --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/