Module Name:    src
Committed By:   kamil
Date:           Tue Sep  1 01:28:17 UTC 2015

Modified Files:
        src/lib/libc/stdlib: getopt_long.c

Log Message:
Constness correction for the getopt(3) function under REPLACE_GETOPT

Use the __UNCONST() macro, which is used in the other parts for the same
argument nargv, but under the !REPLACE_GETOPT namespace.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/lib/libc/stdlib/getopt_long.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/stdlib/getopt_long.c
diff -u src/lib/libc/stdlib/getopt_long.c:1.25 src/lib/libc/stdlib/getopt_long.c:1.26
--- src/lib/libc/stdlib/getopt_long.c:1.25	Fri Mar 20 14:05:54 2009
+++ src/lib/libc/stdlib/getopt_long.c	Tue Sep  1 01:28:17 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: getopt_long.c,v 1.25 2009/03/20 14:05:54 joerg Exp $	*/
+/*	$NetBSD: getopt_long.c,v 1.26 2015/09/01 01:28:17 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: getopt_long.c,v 1.25 2009/03/20 14:05:54 joerg Exp $");
+__RCSID("$NetBSD: getopt_long.c,v 1.26 2015/09/01 01:28:17 kamil Exp $");
 
 #include "namespace.h"
 
@@ -326,7 +326,7 @@ getopt(nargc, nargv, options)
 		 */
 		if (nonopt_end != -1) {
 			permute_args(nonopt_start, nonopt_end, optind,
-				       nargv);
+				       __UNCONST(nargv));
 			optind -= nonopt_end - nonopt_start;
 		}
 		nonopt_start = nonopt_end = -1;

Reply via email to