Subject: Re: pkg/29152: pkgfind patch for linux and openbsd
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: pkgsrc-bugs
Date: 01/29/2005 21:13:01
The following reply was made to PR pkg/29152; it has been noted by GNATS.

From: "Julio M. Merino Vidal" <jmmv84@gmail.com>
To: gnats-bugs@netbsd.org, peter@pointless.nl
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org,
	pkgsrc-bugs@netbsd.org
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 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>
 http://www.livejournal.com/users/jmmv/
 The NetBSD Project - http://www.NetBSD.org/