Subject: Re: pkg/29152: pkgfind patch for linux and openbsd
To: Peter Postma <peter@pointless.nl>
From: Jan Schaumann <jschauma@netmeister.org>
List: pkgsrc-bugs
Date: 01/30/2005 11:48:56
--wRtZRu2mMGBZ6YQ7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Peter Postma <peter@pointless.nl> wrote:
=20
> [Added jschauma to cc]
>=20
> jschauma@ recently added set/getprogname() to make it more portable.
> But if these functions aren't available outside NetBSD then I don't see
> how it would be more portable.
Through use of libnbcompat, which we provide for all supported OS.
>=20
> I see a few ways of fixing this:
> 1) get rid of set/getprogname and hardcode it in the usage, as jmmv sugge=
sted.
> 2) revert the set/getprogname changes and use extern char *__progname aga=
in.
> (but will this work everywhere? e.g. IRIX?)
> 3) add libnbcompat to systems that don't have set/getprogname.
>=20
> Personally, I would prefer 2) and then 1).
I don't see a problem with (3): the systems that need it, would likely
have libnbcompat installed anyway.
However, the program is small enough so that eliminating the need of
these might be more practical. Plus, it's your program, so it's your
call. :-)
> I've attached a diff that attempts to make it more portable, I would
> appreciate if you could test it on a non-NetBSD system.
IRIX needs limits.h for PATH_MAX, and it doesn't seem to know
__progname.
-Jan
--=20
Life," said Marvin, "don't talk to me about life."
--wRtZRu2mMGBZ6YQ7
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
iD8DBQFB/Q/4fFtkr68iakwRAlCRAJ4n03b/gMcvWjFtJYXLorsAcPW0mACcDrk0
pGqL2hsVT9O1XXkwIzbD/Ug=
=XRHy
-----END PGP SIGNATURE-----
--wRtZRu2mMGBZ6YQ7--