diff options
author | tv <tv@pkgsrc.org> | 2005-03-10 21:15:09 +0000 |
---|---|---|
committer | tv <tv@pkgsrc.org> | 2005-03-10 21:15:09 +0000 |
commit | 64aa551fe3e16477d78a7bbdb4e9d21cc0f6144b (patch) | |
tree | 6982228768e2a56f16873c7b600aa80dacd0ccaa /devel | |
parent | aaadd782976841accef937c0f2a073c8b1580f79 (diff) | |
download | pkgsrc-64aa551fe3e16477d78a7bbdb4e9d21cc0f6144b.tar.gz |
Nitpick from Roland Illig <roland.illig@gmx.de>: Use "progname" rather
than "__progname" (just in case), and set it also in getopt_long(3).
Diffstat (limited to 'devel')
-rw-r--r-- | devel/libgetopt/Makefile | 8 | ||||
-rw-r--r-- | devel/libgetopt/files/getopt_long.c | 12 |
2 files changed, 11 insertions, 9 deletions
diff --git a/devel/libgetopt/Makefile b/devel/libgetopt/Makefile index da9d59bd242..1b5e53673e6 100644 --- a/devel/libgetopt/Makefile +++ b/devel/libgetopt/Makefile @@ -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 @@ WRKSRC= ${WRKDIR}/libgetopt .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-extract: 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 --git a/devel/libgetopt/files/getopt_long.c b/devel/libgetopt/files/getopt_long.c index e5aab00a9aa..c082821aad8 100644 --- a/devel/libgetopt/files/getopt_long.c +++ b/devel/libgetopt/files/getopt_long.c @@ -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 noarg[] = "option doesn't take an argument -- %.*s"; 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 @@ static void xwarnx(const char *fmt, ...) { 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 @@ getopt(nargc, nargv, options) { int retval; - __progname = nargv[0]; + progname = nargv[0]; if ((retval = getopt_internal(nargc, nargv, options)) == -2) { ++optind; @@ -372,6 +372,8 @@ getopt_long(nargc, nargv, options, long_options, idx) _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; |