Subject: Re: endianness agnostic getpwent()
To: None <>
From: Jaromír Dolecek <>
List: tech-userlevel
Date: 11/11/2000 12:40:23 wrote:
> 	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 <>
@@@@  Wanna a real operating system ? Go and get NetBSD, damn!  @@@@