Subject: Re: endianness agnostic getpwent()
To: None <firstname.lastname@example.org>
From: Jaromír Dolecek <email@example.com>
Date: 11/11/2000 12:40:23
> is it possible for us to put a fake entry (like "*endian*"), which
> includes endian indication, into pwd.db?
> - if there's an entry, password database lookup should convert endian
> as necessary.
> - if there's no entry (= pwd_mkdb is old and library is new),
> too bad, it will be just like we are now.
> - if pwd_mkdb is newer, fake entry should be harmless.
Hmm, dbopen(3) accepts openinfo
argument, which can be used to pass access-method specific data.
We can change it so that if openinfo is specified and file already exists,
lorder (see hash(3)) of passed structure is set to byte order of the db.
Then, we would not need any special entry in the database file to find
out its endianness.
Other possible hack is to add flag R_ENDIANNESS and cause DB->get()
with flag == R_ENDIANNESS to return endianness indication.
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.ics.muni.cz/~dolecek/
@@@@ Wanna a real operating system ? Go and get NetBSD, damn! @@@@