pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/42379: libtool-base fails patching, SUA6.1 patch is incompatible
The following reply was made to PR pkg/42379; it has been noted by GNATS.
From: "OBATA Akio" <obache%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: pkg/42379: libtool-base fails patching, SUA6.1 patch is
incompatible
Date: Wed, 16 Dec 2009 17:11:51 +0900
This issue came from pkgtools/libnbcompat.
On SUA 6.0, optreset is only defined in getopt.h, not in unistd.h
(optind and optarg are in both).
How about following patch and autconf&autohead?
(additionaly check optarg, it is defined in nbcompat/unistd.h conditionally).
Index: configure.ac
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/libnbcompat/files/configure.ac,v
retrieving revision 1.74
diff -u -r1.74 configure.ac
--- configure.ac 5 Jun 2009 19:58:04 -0000 1.74
+++ configure.ac 16 Dec 2009 07:57:17 -0000
@@ -142,7 +142,7 @@
[AS_HELP_STRING([--enable-bsd-getopt],
[force use of BSDish getopt implementation])])
-AC_CHECK_DECLS([optind, optreset], [:], [:], [
+AC_CHECK_DECLS([optind, optarg], [:], [:], [
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -157,6 +157,15 @@
[ AC_LIBOBJ(getopt_long)]
)
+AC_CHECK_DECLS([optreset], [:], [:], [
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+ #ifdef HAVE_GETOPT_H
+ #include <getopt.h>
+ #endif
+])
+
if test "$enable_bsd_getopt" = yes; then
if test "$ac_cv_have_decl_optreset" = no; then
AC_LIBOBJ(getopt)
Index: nbcompat/getopt.h
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/libnbcompat/files/nbcompat/getopt.h,v
retrieving revision 1.5
diff -u -r1.5 getopt.h
--- nbcompat/getopt.h 29 Apr 2008 05:46:08 -0000 1.5
+++ nbcompat/getopt.h 16 Dec 2009 07:57:17 -0000
@@ -35,6 +35,11 @@
#include <nbcompat/cdefs.h>
#include <nbcompat/unistd.h>
+#if HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+
+#if !HAVE_STRUCT_OPTION
/*
* Gnu like getopt_long() and BSD4.4 getsubopt()/optreset extensions
*/
@@ -60,5 +65,6 @@
int getopt_long (int, char * const *, const char *,
const struct option *, int *);
__END_DECLS
+#endif
#endif /* !_NBCOMPAT_GETOPT_H_ */
Home |
Main Index |
Thread Index |
Old Index