Subject: Re: endianness-agnostic getpwent()
To: None <itojun@iijlab.net>
From: Jaromír Dolecek <dolecek@ibis.cz>
List: tech-userlevel
Date: 11/10/2000 21:19:10
itojun@iijlab.net wrote:
> >On 09-Nov-00 Jaromir Dolecek wrote:
> >> Log Message:
> >> Call pwd_mkdb with proper flag, so that it creates database in same
> >> endianness as compile target. This is primarily for cross compiles.
> >> Hopefully this method (looking into
> >> ${DESTDIR}/usr/include/machine/endian_machdep.h) is okay.
> >The method looks OK to me.. I would have liked to see it use ${PWD_MKDB}
> >instead of calling pwd_mkdb directly however...

True.

> 	does it really work for wide variety of architectures?  there are
> 	architectures where machine/endian_machdep.h has #include statement

OK, an option here is to put the endian flag in etc/etc.*/Makefile.inc

> 	only (like mips family).  not sure what we should do... is there
> 	any chance to put endian indication into pwd.db and make password
> 	library bi-endian?

This would not be too hard if dbopen()/DB would provide a way to find
out the endiannes of the database.

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>      http://www.ics.muni.cz/~dolecek/
@@@@  Wanna a real operating system ? Go and get NetBSD, damn!  @@@@