$OpenBSD: patch-share_args_all_opt_c,v 1.2 2017/05/02 18:18:38 espie Exp $
Index: share/args/all_opt.c
--- share/args/all_opt.c.orig
+++ share/args/all_opt.c
@@ -34,7 +34,7 @@
 static int addinst(struct ao_opt *opt, int nparam, char **params);
 static int countparam(OPT *aod, struct ao_opt *opt, char **argv);
 static int mutexchk(struct ao_opt *opt);
-static int strtonum(char *str, int *pnum);
+static int ao_strtonum(char *str, int *pnum);
 static struct ao_opt *findopt(OPT *desc, char *optstr);
 
 
@@ -481,7 +481,7 @@ ao_parse(OPT *aod, int *pcmdc, char **cmdv)
 /*
  * If a number, assume '#' option.
  */
-		else if (strtonum(++str, &num) == 0) {
+		else if (ao_strtonum(++str, &num) == 0) {
 
 			popt = findopt(aod, "#");
 			if ((popt == 0) || (mutexchk(popt))) {
@@ -650,7 +650,7 @@ findopt(OPT *desc, char *optstr)
 }
 
 /*
- *	strtonum
+ *	ao_strtonum
  *
  *	Function:	- convert string to number if possible
  *			- handles decimal/octal/hexadecimal
@@ -660,7 +660,7 @@ findopt(OPT *desc, char *optstr)
  *	Returns:	- 0 or LAMERROR
  */
 static int
-strtonum(char *str, int *pnum)
+ao_strtonum(char *str, int *pnum)
 {
 	char		*endstr;		/* end of parsed string */
 
@@ -720,7 +720,7 @@ countparam(OPT *aod, struct ao_opt *opt, char **argv)
 
 		if (strcmp(string, "--") == 0) break;
 
-		if ((strtonum(string + 1, &num) == 0) &&
+		if ((ao_strtonum(string + 1, &num) == 0) &&
 				(findopt(aod, "#") != 0)) break;
 
 		if (findopt(aod, string + 1)) break;
@@ -799,7 +799,7 @@ addinst(struct ao_opt *opt, int nparam, char **params)
 	for (; nparam > 0; --nparam, ++params, parmbuf += size) {
 
 		if (fl_int) {
-			if (strtonum(*params, &num)) {
+			if (ao_strtonum(*params, &num)) {
 				errno = EUSAGE;
 				return(LAMERROR);
 			}
