From 5f73996bf368e7f5d7249679c738a87873cb340d Mon Sep 17 00:00:00 2001
From: Garrett D'Amore <garrett@damore.org>
Date: Wed, 12 Sep 2018 12:14:14 -0700
Subject: fixes #720 fix for #715 still not right

The fix for #715 to address const is still not quite right.

In ISO C, the argv array is just char **. getopt() in POSIX uses
char *const[]. That part is right, but we should then not pass
const char ** in calls. Furthermore, really the optarg should also
not be constified.

This aligns us closer to getopt() and leads to the fewest problems.
This does represent a slight breaking change, but as old code should
still compile and run, we don't think we should bump the API version
for this change.  Furthermore, we don't think anyone else is actually
using this API yet.
---
 docs/man/nng_opts_parse.3supp.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'docs/man/nng_opts_parse.3supp.adoc')

diff --git a/docs/man/nng_opts_parse.3supp.adoc b/docs/man/nng_opts_parse.3supp.adoc
index 20a52109..2fbbe443 100644
--- a/docs/man/nng_opts_parse.3supp.adoc
+++ b/docs/man/nng_opts_parse.3supp.adoc
@@ -27,7 +27,7 @@ typedef struct nng_optspec {
     bool        o_arg;   // Option takes an argument if true
 } nng_optspec;
 
-int nng_opts_parse(int argc, char *const *argv, const nng_optspec *spec, int *val, const char **arg, int *idx);
+int nng_opts_parse(int argc, char *const *argv, const nng_optspec *spec, int *val, char **arg, int *idx);
 ----
 
 == DESCRIPTION
-- 
cgit v1.2.3-70-g09d2

