marc        98/01/11 20:33:34

  Modified:    src/main http_main.c
  Log:
  Fix -C/-c stuff for win32 so that Apache runs.  The new options
  appear to now work properly, but I just did a basic test and my
  main objective was to make the server start without crashing.
  
  Revision  Changes    Path
  1.266     +14 -1     apachen/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
  retrieving revision 1.265
  retrieving revision 1.266
  diff -u -r1.265 -r1.266
  --- http_main.c       1998/01/11 20:25:04     1.265
  +++ http_main.c       1998/01/12 04:33:32     1.266
  @@ -4744,14 +4744,27 @@
       pconf = permanent_pool;
       ptrans = make_sub_pool(pconf);
   
  +    pcommands = make_sub_pool(NULL);
  +    server_pre_read_config  = make_array(pcommands, 1, sizeof(char *));
  +    server_post_read_config = make_array(pcommands, 1, sizeof(char *));
  +    
       server_argv0 = argv[0];
       ap_cpystrn(server_root, HTTPD_ROOT, sizeof(server_root));
       ap_cpystrn(server_confname, SERVER_CONFIG_FILE, sizeof(server_confname));
   
       setup_prelinked_modules();
   
  -    while ((c = getopt(argc, argv, "Xd:f:vVhlZ:ius")) != -1) {
  +    while ((c = getopt(argc, argv, "C:c:Xd:f:vVhlZ:ius")) != -1) {
  +        char **new;
        switch (c) {
  +     case 'c':
  +         new = (char **)push_array(server_post_read_config);
  +         *new = pstrdup(pcommands, optarg);
  +         break;
  +     case 'C':
  +         new = (char **)push_array(server_pre_read_config);
  +         *new = pstrdup(pcommands, optarg);
  +         break;
   #ifdef WIN32
        case 'Z':
            exit_event = open_event(optarg);
  
  
  

Reply via email to