gstein 01/06/01 02:59:36
Modified: include apr_getopt.h
Log:
GCC's -Wshadow option complains about "optarg" shadowing another definition.
This has started showing up with the recent POSIX/BSD/whatever preprocessor
defines for the R/W lock stuff.
Name the argument something else to shut up GCC.
Revision Changes Path
1.33 +8 -7 apr/include/apr_getopt.h
Index: apr_getopt.h
===================================================================
RCS file: /home/cvs/apr/include/apr_getopt.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -u -r1.32 -r1.33
--- apr_getopt.h 2001/02/16 04:15:44 1.32
+++ apr_getopt.h 2001/06/01 09:59:36 1.33
@@ -126,8 +126,8 @@
* @param opts A string of characters that are acceptable options to the
* program. Characters followed by ":" are required to have
an
* option associated
- * @param optch The next option character parsed
- * @param optarg The argument following the option character:
+ * @param option_ch The next option character parsed
+ * @param option_arg The argument following the option character:
* @return There are four potential status values on exit. They are:
* <PRE>
* APR_EOF -- No more options to parse
@@ -138,7 +138,7 @@
* @deffunc apr_status_t apr_getopt(apr_getopt_t *os, const char *opts, char
*optch, const char **optarg)
*/
APR_DECLARE(apr_status_t) apr_getopt(apr_getopt_t *os, const char *opts,
- char *optch, const char **optarg);
+ char *option_ch, const char
**option_arg);
/**
* Parse the options initialized by apr_getopt_init(), accepting long
@@ -149,9 +149,9 @@
* can be initialized with { "name", optch, has_args }.
has_args
* is nonzero if the option requires an argument. A structure
* with an optch value of 0 terminates the list.
- * @param optch Receives the value of "optch" from the apr_getopt_option_t
- * structure corresponding to the next option matched.
- * @param optarg Receives the argument following the option, if any.
+ * @param option_ch Receives the value of "optch" from the
apr_getopt_option_t
+ * structure corresponding to the next option matched.
+ * @param option_arg Receives the argument following the option, if any.
* @return There are four potential status values on exit. They are:
* <PRE>
* APR_EOF -- No more options to parse
@@ -168,7 +168,8 @@
*/
APR_DECLARE(apr_status_t) apr_getopt_long(apr_getopt_t *os,
const apr_getopt_option_t *opts,
- int *optch, const char **optarg);
+ int *option_ch,
+ const char **option_arg);
#ifdef __cplusplus
}