At 09:50 PM 20/10/2002 -0400, Bruce Momjian wrote:
>Well, I think Tom was going to try it on his HPUX machine.
It might be good if someone who knows a little more than me about
endianness etc has a look at the patch - specifically this bit of code:
#if __BYTE_ORDER == __LITTLE_ENDIAN for (off = 0 ; off < sizeof(off_t) ; off++) {
#else for (off = sizeof(off_t) -1 ; off >= 0 ; off--) {
#endif i = *(char*)(ptr+off); (*AH->WriteBytePtr) (AH, i); }
It is *intended* to write the data such that the least significant byte
is written first to the file, but the dump Giles put on his FTP site
is not correct - it's written msb->lsb.
There seem to be two possibilities (a) I am an idiot and there is something
wrong with the code above that I can not see, or (b) the test:
#if __BYTE_ORDER == __LITTLE_ENDIAN
is not the right thing to do. Any insights would be appreciated.
----------------------------------------------------------------
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 |/