]> granicus.if.org Git - apache/commitdiff
Clean up the getopt stuff a bit. Basically, I am removing the #define's,
authorRyan Bloom <rbb@apache.org>
Mon, 22 Nov 1999 14:52:17 +0000 (14:52 +0000)
committerRyan Bloom <rbb@apache.org>
Mon, 22 Nov 1999 14:52:17 +0000 (14:52 +0000)
and changing the names in the getopt.c file so that we are sure there is
no namespace collision between regular getopt's, and APR's getopt.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84143 13f79535-47bb-0310-9956-ffa450edef68

server/main.c

index 70ba9161c51b419e58c6c06d4258ba1d3e7aaae2..99ed728903406320bfe8b1e7bfda983f557f443b 100644 (file)
@@ -265,8 +265,6 @@ static void usage(process_rec *process)
 
 ap_context_t *g_pHookPool;
 
-API_VAR_IMPORT char *optarg;
-
 #ifdef WIN32
 API_EXPORT_NONSTD(int) apache_main(int argc, char *argv[])
 #else
@@ -303,17 +301,17 @@ API_EXPORT_NONSTD(int)        main(int argc, char *argv[])
         switch (c) {
        case 'c':
            new = (char **)ap_push_array(ap_server_post_read_config);
-           *new = ap_pstrdup(pcommands, optarg);
+           *new = ap_pstrdup(pcommands, ap_optarg);
            break;
        case 'C':
            new = (char **)ap_push_array(ap_server_pre_read_config);
-           *new = ap_pstrdup(pcommands, optarg);
+           *new = ap_pstrdup(pcommands, ap_optarg);
            break;
        case 'd':
-           def_server_root = optarg;
+           def_server_root = ap_optarg;
            break;
        case 'f':
-           confname = optarg;
+           confname = ap_optarg;
            break;
        case 'v':
            printf("Server version: %s\n", ap_get_server_version());