Subject: Re: endianness-agnostic getpwent()
To: Simon Burge <simonb@wasabisystems.com>
From: Andrew Brown <atatat@atatdot.net>
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 now...my two cents.

i was particularly amused at the time to see that even files owned by
root were shown as owned by 0.  so...how 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" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."