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



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