pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/29152: pkgfind patch for linux and openbsd
The following reply was made to PR pkg/29152; it has been noted by GNATS.
From: "Julio M. Merino Vidal" <jmmv84%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost, peter%pointless.nl@localhost
Cc: pkg-manager%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
pkgsrc-bugs%netbsd.org@localhost
Subject: Re: pkg/29152: pkgfind patch for linux and openbsd
Date: Sat, 29 Jan 2005 22:09:50 +0100
On Sat, 2005-01-29 at 16:41 +0000, pancake%phreaker.net@localhost wrote:
>
> +#if __linux__ || __OpenBSD__
> +char *name=NULL;
> +char *getprogname()
> +{
> + return name;
> +}
> +void setprogname(char *progname)
> +{
> + name=progname;
> +}
> +#endif
> +
> int
> main(int argc, char *argv[])
> {
[I'm mailing the software author directly too]
This is wrong, because many other systems will still fail. You'd have
to add a configure script, which I think is not worth the effort.
The program should simply be changed to not use getprogname nor
setprogname at all. This is _trivial_ to do (simply removing the
last getprogname() call), and I don't know why the original code uses
them (because it's hardcoding the program name anyway) -- well, being
NetBSD friendly was probably the reason ;)
(Besides, your patch does not respect the current style in the code.)
--
Julio M. Merino Vidal <jmmv84%gmail.com@localhost>
http://www.livejournal.com/users/jmmv/
The NetBSD Project - http://www.NetBSD.org/
Home |
Main Index |
Thread Index |
Old Index