pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/libgetopt Nitpick from Roland Illig <roland.illi...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5aa19a3636b6
branches:  trunk
changeset: 490453:5aa19a3636b6
user:      tv <tv%pkgsrc.org@localhost>
date:      Thu Mar 10 21:15:09 2005 +0000

description:
Nitpick from Roland Illig <roland.illig%gmx.de@localhost>: Use "progname" rather
than "__progname" (just in case), and set it also in getopt_long(3).

diffstat:

 devel/libgetopt/Makefile            |   8 ++++----
 devel/libgetopt/files/getopt_long.c |  12 +++++++-----
 2 files changed, 11 insertions(+), 9 deletions(-)

diffs (78 lines):

diff -r 2741c45afc0a -r 5aa19a3636b6 devel/libgetopt/Makefile
--- a/devel/libgetopt/Makefile  Thu Mar 10 19:43:25 2005 +0000
+++ b/devel/libgetopt/Makefile  Thu Mar 10 21:15:09 2005 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.18 2005/03/10 19:19:46 tv Exp $
+# $NetBSD: Makefile,v 1.19 2005/03/10 21:15:09 tv Exp $
 #
 
-DISTNAME=      libgetopt-1.4
+DISTNAME=      libgetopt-1.4.1
 CATEGORIES=    pkgtools sysutils
 MASTER_SITES=  # empty
 DISTFILES=     # empty
@@ -15,7 +15,7 @@
 .include "../../mk/bsd.prefs.mk"
 
 .if exists(/usr/include/getopt.h) && empty(LOWER_OPSYS:Mirix5*)
-PKG_SKIP_REASON= "${PKGNAME} is part of your ${OPSYS} distribution"
+#PKG_SKIP_REASON= "${PKGNAME} is part of your ${OPSYS} distribution"
 .endif
 
 .if ${OPSYS} == "SunOS"
@@ -30,7 +30,7 @@
 
 do-build:
        cd ${WRKSRC} && ${LIBTOOL} --mode=compile ${COMPILE.c} getopt_long.c
-       cd ${WRKSRC} && ${LIBTOOL} --mode=link ${LINK.c} -o libgetopt.la getopt_long.lo -version-info 5:0:4 -rpath ${PREFIX}/lib
+       cd ${WRKSRC} && ${LIBTOOL} --mode=link ${LINK.c} -o libgetopt.la getopt_long.lo -version-info 5:1:4 -rpath ${PREFIX}/lib
 
 do-install:
        ${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/libgetopt.la ${PREFIX}/lib/
diff -r 2741c45afc0a -r 5aa19a3636b6 devel/libgetopt/files/getopt_long.c
--- a/devel/libgetopt/files/getopt_long.c       Thu Mar 10 19:43:25 2005 +0000
+++ b/devel/libgetopt/files/getopt_long.c       Thu Mar 10 21:15:09 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getopt_long.c,v 1.1 2005/03/10 19:19:47 tv Exp $       */
+/*     $NetBSD: getopt_long.c,v 1.2 2005/03/10 21:15:09 tv Exp $       */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -98,7 +98,7 @@
 static const char illoptchar[] = "illegal option -- %c";
 static const char illoptstring[] = "illegal option -- %s";
 
-static const char *__progname;
+static const char *progname;
 
 
 /* Replacement for warnx(3) for systems without it. */
@@ -106,8 +106,8 @@
        va_list ap;
 
        va_start(ap, fmt);
-       if (__progname)
-               (void) fprintf(stderr, "%s: ", __progname);
+       if (progname)
+               (void) fprintf(stderr, "%s: ", progname);
        if (fmt)
                (void) vfprintf(stderr, fmt, ap);
        (void) fprintf(stderr, "\n");
@@ -333,7 +333,7 @@
 {
        int retval;
 
-       __progname = nargv[0];
+       progname = nargv[0];
 
        if ((retval = getopt_internal(nargc, nargv, options)) == -2) {
                ++optind;
@@ -372,6 +372,8 @@
        _DIAGASSERT(long_options != NULL);
        /* idx may be NULL */
 
+       progname = nargv[0];
+
        if ((retval = getopt_internal(nargc, nargv, options)) == -2) {
                char *current_argv, *has_equal;
                size_t current_argv_len;



Home | Main Index | Thread Index | Old Index