From: Guenter Knauf Date: Wed, 6 Oct 2010 10:05:22 +0000 (+0000) Subject: Renamed optarg -> opt_arg to avoid name clashes with system-own optarg; X-Git-Tag: 2.3.9~348 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39a167fb32bed6458fa20055c61fd71a523165b2;p=thirdparty%2Fapache%2Fhttpd.git Renamed optarg -> opt_arg to avoid name clashes with system-own optarg; removed leftover from IDE build times. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1004962 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/ab.c b/support/ab.c index 75af00a7356..75c514680fd 100644 --- a/support/ab.c +++ b/support/ab.c @@ -2014,7 +2014,7 @@ int main(int argc, const char * const argv[]) char tmp[1024]; apr_status_t status; apr_getopt_t *opt; - const char *optarg; + const char *opt_arg; char c; #ifdef USE_SSL AB_SSL_METHOD_CONST SSL_METHOD *meth = SSLv23_client_method(); @@ -2056,10 +2056,10 @@ int main(int argc, const char * const argv[]) #ifdef USE_SSL "Z:f:" #endif - ,&c, &optarg)) == APR_SUCCESS) { + ,&c, &opt_arg)) == APR_SUCCESS) { switch (c) { case 'n': - requests = atoi(optarg); + requests = atoi(opt_arg); if (requests <= 0) { err("Invalid number of requests\n"); } @@ -2071,10 +2071,10 @@ int main(int argc, const char * const argv[]) heartbeatres = 0; break; case 'c': - concurrency = atoi(optarg); + concurrency = atoi(opt_arg); break; case 'b': - windowsize = atoi(optarg); + windowsize = atoi(opt_arg); break; case 'i': if (method != NO_METH) @@ -2082,13 +2082,13 @@ int main(int argc, const char * const argv[]) method = HEAD; break; case 'g': - gnuplot = strdup(optarg); + gnuplot = strdup(opt_arg); break; case 'd': percentile = 0; break; case 'e': - csvperc = strdup(optarg); + csvperc = strdup(opt_arg); break; case 'S': confidence = 0; @@ -2096,7 +2096,7 @@ int main(int argc, const char * const argv[]) case 'p': if (method != NO_METH) err("Cannot mix POST with other methods\n"); - if ((status = open_postfile(optarg)) != APR_SUCCESS) { + if ((status = open_postfile(opt_arg)) != APR_SUCCESS) { exit(1); } method = POST; @@ -2105,7 +2105,7 @@ int main(int argc, const char * const argv[]) case 'u': if (method != NO_METH) err("Cannot mix PUT with other methods\n"); - if ((status = open_postfile(optarg)) != APR_SUCCESS) { + if ((status = open_postfile(opt_arg)) != APR_SUCCESS) { exit(1); } method = PUT; @@ -2115,30 +2115,30 @@ int main(int argc, const char * const argv[]) recverrok = 1; break; case 'v': - verbosity = atoi(optarg); + verbosity = atoi(opt_arg); break; case 't': - tlimit = atoi(optarg); + tlimit = atoi(opt_arg); requests = MAX_REQUESTS; /* need to size data array on * something */ break; case 'T': - strcpy(content_type, optarg); + strcpy(content_type, opt_arg); break; case 'C': - cookie = apr_pstrcat(cntxt, "Cookie: ", optarg, "\r\n", NULL); + cookie = apr_pstrcat(cntxt, "Cookie: ", opt_arg, "\r\n", NULL); break; case 'A': /* * assume username passwd already to be in colon separated form. * Ready to be uu-encoded. */ - while (apr_isspace(*optarg)) - optarg++; - if (apr_base64_encode_len(strlen(optarg)) > sizeof(tmp)) { + while (apr_isspace(*opt_arg)) + opt_arg++; + if (apr_base64_encode_len(strlen(opt_arg)) > sizeof(tmp)) { err("Authentication credentials too long\n"); } - l = apr_base64_encode(tmp, optarg, strlen(optarg)); + l = apr_base64_encode(tmp, opt_arg, strlen(opt_arg)); tmp[l] = '\0'; auth = apr_pstrcat(cntxt, auth, "Authorization: Basic ", tmp, @@ -2148,27 +2148,27 @@ int main(int argc, const char * const argv[]) /* * assume username passwd already to be in colon separated form. */ - while (apr_isspace(*optarg)) - optarg++; - if (apr_base64_encode_len(strlen(optarg)) > sizeof(tmp)) { + while (apr_isspace(*opt_arg)) + opt_arg++; + if (apr_base64_encode_len(strlen(opt_arg)) > sizeof(tmp)) { err("Proxy credentials too long\n"); } - l = apr_base64_encode(tmp, optarg, strlen(optarg)); + l = apr_base64_encode(tmp, opt_arg, strlen(opt_arg)); tmp[l] = '\0'; auth = apr_pstrcat(cntxt, auth, "Proxy-Authorization: Basic ", tmp, "\r\n", NULL); break; case 'H': - hdrs = apr_pstrcat(cntxt, hdrs, optarg, "\r\n", NULL); + hdrs = apr_pstrcat(cntxt, hdrs, opt_arg, "\r\n", NULL); /* * allow override of some of the common headers that ab adds */ - if (strncasecmp(optarg, "Host:", 5) == 0) { + if (strncasecmp(opt_arg, "Host:", 5) == 0) { opt_host = 1; - } else if (strncasecmp(optarg, "Accept:", 7) == 0) { + } else if (strncasecmp(opt_arg, "Accept:", 7) == 0) { opt_accept = 1; - } else if (strncasecmp(optarg, "User-Agent:", 11) == 0) { + } else if (strncasecmp(opt_arg, "User-Agent:", 11) == 0) { opt_useragent = 1; } break; @@ -2181,7 +2181,7 @@ int main(int argc, const char * const argv[]) */ case 'x': use_html = 1; - tablestring = optarg; + tablestring = opt_arg; break; case 'X': { @@ -2189,22 +2189,22 @@ int main(int argc, const char * const argv[]) /* * assume proxy-name[:port] */ - if ((p = strchr(optarg, ':'))) { + if ((p = strchr(opt_arg, ':'))) { *p = '\0'; p++; proxyport = atoi(p); } - strcpy(proxyhost, optarg); + strcpy(proxyhost, opt_arg); isproxy = 1; } break; case 'y': use_html = 1; - trstring = optarg; + trstring = opt_arg; break; case 'z': use_html = 1; - tdstring = optarg; + tdstring = opt_arg; break; case 'h': usage(argv[0]); @@ -2214,16 +2214,16 @@ int main(int argc, const char * const argv[]) return 0; #ifdef USE_SSL case 'Z': - ssl_cipher = strdup(optarg); + ssl_cipher = strdup(opt_arg); break; case 'f': - if (strncasecmp(optarg, "ALL", 3) == 0) { + if (strncasecmp(opt_arg, "ALL", 3) == 0) { meth = SSLv23_client_method(); - } else if (strncasecmp(optarg, "SSL2", 4) == 0) { + } else if (strncasecmp(opt_arg, "SSL2", 4) == 0) { meth = SSLv2_client_method(); - } else if (strncasecmp(optarg, "SSL3", 4) == 0) { + } else if (strncasecmp(opt_arg, "SSL3", 4) == 0) { meth = SSLv3_client_method(); - } else if (strncasecmp(optarg, "TLS1", 4) == 0) { + } else if (strncasecmp(opt_arg, "TLS1", 4) == 0) { meth = TLSv1_client_method(); } break; diff --git a/support/httxt2dbm.c b/support/httxt2dbm.c index efe493af55c..8792f944b9d 100644 --- a/support/httxt2dbm.c +++ b/support/httxt2dbm.c @@ -178,7 +178,7 @@ int main(int argc, const char *const argv[]) apr_pool_t *pool; apr_status_t rv = APR_SUCCESS; apr_getopt_t *opt; - const char *optarg; + const char *opt_arg; char ch; apr_file_t *infile; apr_dbm_t *outdbm; @@ -213,7 +213,7 @@ int main(int argc, const char *const argv[]) return 1; } - while ((rv = apr_getopt(opt, "vf::i::o::", &ch, &optarg)) == APR_SUCCESS) { + while ((rv = apr_getopt(opt, "vf::i::o::", &ch, &opt_arg)) == APR_SUCCESS) { switch (ch) { case 'v': if (verbose) { @@ -229,7 +229,7 @@ int main(int argc, const char *const argv[]) usage(); return 1; } - format = apr_pstrdup(pool, optarg); + format = apr_pstrdup(pool, opt_arg); break; case 'i': if (input) { @@ -237,7 +237,7 @@ int main(int argc, const char *const argv[]) usage(); return 1; } - input = apr_pstrdup(pool, optarg); + input = apr_pstrdup(pool, opt_arg); break; case 'o': if (output) { @@ -245,7 +245,7 @@ int main(int argc, const char *const argv[]) usage(); return 1; } - output = apr_pstrdup(pool, optarg); + output = apr_pstrdup(pool, opt_arg); break; } } diff --git a/support/rotatelogs.c b/support/rotatelogs.c index ecd5bed3eae..213005cc4c7 100644 --- a/support/rotatelogs.c +++ b/support/rotatelogs.c @@ -433,7 +433,7 @@ int main (int argc, const char * const argv[]) apr_getopt_t *opt; apr_status_t rv; char c; - const char *optarg; + const char *opt_arg; const char *err = NULL; apr_app_initialize(&argc, &argv, NULL); @@ -457,13 +457,13 @@ int main (int argc, const char * const argv[]) apr_pool_create(&status.pool, NULL); apr_getopt_init(&opt, status.pool, argc, argv); - while ((rv = apr_getopt(opt, "lL:ftv", &c, &optarg)) == APR_SUCCESS) { + while ((rv = apr_getopt(opt, "lL:ftv", &c, &opt_arg)) == APR_SUCCESS) { switch (c) { case 'l': config.use_localtime = 1; break; case 'L': - config.linkfile = optarg; + config.linkfile = opt_arg; break; case 'f': config.force_open = 1; diff --git a/support/utilitiesnw.def b/support/utilitiesnw.def deleted file mode 100644 index 426b8c96be7..00000000000 --- a/support/utilitiesnw.def +++ /dev/null @@ -1,3 +0,0 @@ -MODULE APRLIB.NLM -MODULE LIBC.NLM -