You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@locus.apache.org on 2000/06/10 02:38:58 UTC

cvs commit: apache-1.3/src/os/netware ApacheCore.imp

wrowe       00/06/09 17:38:58

  Modified:    src/main http_main.c
               src/os/netware ApacheCore.imp
  Log:
  http_main.c
      Cleanup NetWare specific thread storage data mechanism.
      Wrap Windows specifc code in apache_main() with #ifdef WIN32
      directives.
  
  apachecore.imp
      Export new init_tsd function.
  
  Submitted by Mike Gardiner
  
  Revision  Changes    Path
  1.497     +14 -6     apache-1.3/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
  retrieving revision 1.496
  retrieving revision 1.497
  diff -u -r1.496 -r1.497
  --- http_main.c	2000/06/09 18:16:07	1.496
  +++ http_main.c	2000/06/10 00:38:56	1.497
  @@ -1104,6 +1104,17 @@
       unsigned int 	alarm_expiry_time;
   } TSD;
   
  +static TSD Tsd;
  +
  +void init_tsd()
  +{    
  +    int *thread_ptr;
  +
  +    memset(&Tsd, 0, sizeof(TSD));
  +    thread_ptr = __get_thread_data_area_ptr();
  +    *thread_ptr = (int) &Tsd;
  +}
  +
   #define get_tsd            TSD* tsd = (TSD*) Thread_Data_Area;
   #define current_conn       tsd->current_conn
   #define alarms_blocked     tsd->alarms_blocked
  @@ -6598,14 +6609,9 @@
       char cwd[MAX_STRING_LEN];
   
   #ifdef NETWARE
  -    TSD Tsd;
  -    int *thread_ptr;
  -
       init_name_space();
       signal(SIGTERM, signal_handler);
  -    memset(&Tsd, 0, sizeof(TSD));
  -    thread_ptr = __get_thread_data_area_ptr();
  -    *thread_ptr = (int) &Tsd;    
  +    init_tsd();
   #else
       /* Service application
        * Configuration file in registry at:
  @@ -6754,6 +6760,7 @@
   #endif
       }       /* while  */
   
  +#ifdef WIN32
       if (!service_name && install) {
           service_name = DEFAULTSERVICENAME;
       }
  @@ -6776,6 +6783,7 @@
                        "Service \"%s\" is not installed!", service_name);
           clean_parent_exit(0);
       }
  +#endif
   
       /* ServerConfFile is found in this order:
        * (1) -f or -n
  
  
  
  1.3       +1 -0      apache-1.3/src/os/netware/ApacheCore.imp
  
  Index: ApacheCore.imp
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/netware/ApacheCore.imp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ApacheCore.imp	2000/06/01 23:42:31	1.2
  +++ ApacheCore.imp	2000/06/10 00:38:57	1.3
  @@ -345,4 +345,5 @@
   ap_listeners
   ap_listenbacklog
   clean_parent_exit
  +init_tsd