Subject: Re: nsswitch / nsdispatch(3) cleanup ...
To: Hubert Feyrer <hubert@feyrer.de>
From: Luke Mewburn <lukem@NetBSD.org>
List: tech-userlevel
Date: 09/27/2004 20:52:39
--6Vw0j8UKbyX0bfpA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Sep 27, 2004 at 11:50:36AM +0200, Hubert Feyrer wrote:
  | On Mon, 27 Sep 2004, Luke Mewburn wrote:
  | >I intend to use the following convention within each method:
  | >   1.	void *retval is a pointer to the actual return
  | >	value for the external function.
  | >	The method should set this as necessary.
  | >   2.	`va_list ap' has the same layout as the external
  | >	function's calling convention.
  |=20
  | Just curious: Is there something similar in=20
  | FreeBSD/Linux/Solaris/whatever, and does it use the same conventions/AP=
I?

FreeBSD's nsswitch is derived from NetBSD's.  As far as I can tell,
there isn't any particular "standarized" va_list usage in back-end
methods; the usage of nsdispatch(3) is ad-hoc just like NetBSD's
currently does.

Linux uses glibc.  FreeBSD apparently has a shim that allows you
to use Linux glibc libnss_* modules, although I haven't examined
that closely, as to whether that's a binary ABI or a source API
compatibility shim.


FWIW: from examining samba's libnss_winbind.so (dynamic nsswitch
plugin), it appears that the various supported platforms -- HP-UX,
Irix, Solaris, Linux and FreeBSD -- all have different APIs for
the nsswitch backends.

--6Vw0j8UKbyX0bfpA
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iD8DBQFBV/D3pBhtmn8zJHIRAvAfAJ47VcYNucUmOCDgNxbsd4Qug/G48QCgjwkl
fFuwNXA8M4fUhw3UFF2ncbo=
=mlAh
-----END PGP SIGNATURE-----

--6Vw0j8UKbyX0bfpA--