Subject: Re: pkg/37078: archivers/unshield: libgetopt not referenced on Slackware Lunix 10.2
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: OBATA Akio <obache@netbsd.org>
List: pkgsrc-bugs
Date: 10/08/2007 01:15:10
The following reply was made to PR pkg/37078; it has been noted by GNATS.

From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/37078: archivers/unshield: libgetopt not referenced on Slackware Lunix 10.2
Date: Mon, 08 Oct 2007 10:12:56 +0900

 On Mon, 08 Oct 2007 08:55:00 +0900, <zeurkous@nichten.info> wrote:
 
 > diff -ur work.old/unshield-0.5/src/unshield.c work/unshield-0.5/src/un=
 shield.c
 > --- work.old/unshield-0.5/src/unshield.c        2007-10-07 18:41:42.00=
 0000000 +0000
 > +++ work/unshield-0.5/src/unshield.c    2007-10-07 18:42:27.000000000 =
 +0000
 > @@ -10,6 +10,7 @@
 >  #include <sys/types.h>
 >  #include <sys/stat.h>
 >  #include <unistd.h>
 > +#include <getopt.h>
 >  #ifdef HAVE_CONFIG_H
 >  #include "../lib/unshield_config.h"
 >  #endif
 
 Should fix patch-ab instead.
 How about using following lines as patch-ab?
 
 $NetBSD$
 
 --- src/unshield.c.orig 2005-07-08 23:08:37.000000000 +0900
 +++ src/unshield.c
 @@ -2,3 +2,5 @@
   #define _BSD_SOURCE 1
 +#iddef __GLIBC__
   #define _POSIX_C_SOURCE 2
 +#endif
   #include "../lib/libunshield.h"
 @@ -280,6 +282,6 @@ static bool extract_file(Unshield* unshi
         default:
 -        if (!isprint(*p))
 +        if (!isprint((unsigned char)*p))
             *p =3D '_';
           else if (make_lowercase)
 -          *p =3D tolower(*p);
 +          *p =3D tolower((unsigned char)*p);
           break;;
 @@ -300,6 +302,6 @@ static bool extract_file(Unshield* unshi
     {
 -    if (!isprint(*p))
 +    if (!isprint((unsigned char)*p))
         *p =3D '_';
       else if (make_lowercase)
 -      *p =3D tolower(*p);
 +      *p =3D tolower((unsigned char)*p);
     }