pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/libnbcompat/files Always declare optreset.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ec1dc3cb73fb
branches:  trunk
changeset: 557375:ec1dc3cb73fb
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue Apr 14 17:34:41 2009 +0000

description:
Always declare optreset.

XXX optreset should be removed here, it can't be used correctly with a
GNU getopt_long implementation without touching the environment.

diffstat:

 pkgtools/libnbcompat/files/getopt_long.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (32 lines):

diff -r aa364eb75b18 -r ec1dc3cb73fb pkgtools/libnbcompat/files/getopt_long.c
--- a/pkgtools/libnbcompat/files/getopt_long.c  Tue Apr 14 12:42:55 2009 +0000
+++ b/pkgtools/libnbcompat/files/getopt_long.c  Tue Apr 14 17:34:41 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getopt_long.c,v 1.10 2009/03/22 22:33:13 joerg Exp $   */
+/*     $NetBSD: getopt_long.c,v 1.11 2009/04/14 17:34:41 joerg Exp $   */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include <nbcompat.h>
 #include <nbcompat/cdefs.h>
-__RCSID("$NetBSD: getopt_long.c,v 1.10 2009/03/22 22:33:13 joerg Exp $");
+__RCSID("$NetBSD: getopt_long.c,v 1.11 2009/04/14 17:34:41 joerg Exp $");
 
 #if 0
 #include "namespace.h"
@@ -66,10 +66,10 @@
 int    opterr = 1;             /* if error message should be printed */
 int    optind = 1;             /* index into parent argv vector */
 int    optopt = '?';           /* character checked for validity */
+char    *optarg;               /* argument associated with option */
+#endif
+#if !HAVE_DECL_OPTRESET
 int    optreset;               /* reset getopt */
-char    *optarg;               /* argument associated with option */
-#elif HAVE_NBTOOL_CONFIG_H && !HAVE_DECL_OPTRESET
-int optreset;
 #endif
 
 #if 0



Home | Main Index | Thread Index | Old Index