Subject: Re: endianness-agnostic getpwent()
To: Simon Burge <>
From: Andrew Brown <>
List: tech-userlevel
Date: 11/12/2000 15:27:27
>> This would not be too hard if dbopen()/DB would provide a way to find
>> out the endiannes of the database.
>Better solutions would be to either use network byte order all keys, or
>use ASCII keys instead of binary keys.  The problem with any solution
>is that you still need to keep native byte-order keys to support older
>statically linked programs.
>And yes, I agree that not knowing the endianness of the database is a
>bit of a pain...

my pr, my solution, and two cents.

i was particularly amused at the time to see that even files owned by
root were shown as owned by 0. exactly are uids stored in
the file?  i always thought the little and big endian byte order
representations of 0 were 0, regardless of the host endianness.

|-----< "CODE WARRIOR" >-----|             * "ah!  i see you have the internet (Andrew Brown)                that goes *ping*!"       * "information is power -- share the wealth."