Subject: Re: CVS commit: basesrc
To: None <itojun@iijlab.net>
From: Simon Burge <simonb@wasabisystems.com>
List: source-changes
Date: 11/11/2000 00:06:18
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...
> 
> 	does it really work for wide variety of architectures?  there are
> 	architectures where machine/endian_machdep.h has #include statement
> 	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?

	thoreau:~ 6> cat /NetBSD/src/sys/arch/bebox/include/endian_machdep.h
	/*      $NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:19 mycroft Exp $       */

	#include <powerpc/endian_machdep.h>

"oops".  In these cases, it will use native byte order (ie, none
specified).  FWIW, the mips family is ok here because we have both
big- and little-endian support and the <machine/endian_machdep.h> file
defines a byte order then includes the general mips include file - it's
things like ppc and m68k that are the problem.

The proper solution is of course to move the {s,}pwd.db files to an
MI format, whilst maintaining backward compatibility somehow (for
statically compiled binaries)...

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD Sales, Support and Service:  http://www.wasabisystems.com/