httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@hyperreal.org
Subject cvs commit: apache-1.3/src/os/netware Apache.def ApacheCore.imp ApacheCoreNW.def ApacheModuleAuthAnon.def ApacheModuleCERNMeta.def ApacheModuleDigest.def ApacheModuleExpires.def ApacheModuleHeaders.def ApacheModuleInfo.def ApacheModuleProxy.def ApacheModuleRewrite.def ApacheModuleSpeling.def ApacheModuleStatus.def ApacheModuleUserTrack.def getopt.c getopt.h main_nlm.c mod_nlm.c modules.c multithread.c precomp.h test_char.h uri_delims.h os.c os.h
Date Tue, 11 Jan 2000 21:52:38 GMT
stoddard    00/01/11 13:52:34

  Modified:    src/os/netware os.c os.h
  Added:       src/os/netware Apache.def ApacheCore.imp ApacheCoreNW.def
                        ApacheModuleAuthAnon.def ApacheModuleCERNMeta.def
                        ApacheModuleDigest.def ApacheModuleExpires.def
                        ApacheModuleHeaders.def ApacheModuleInfo.def
                        ApacheModuleProxy.def ApacheModuleRewrite.def
                        ApacheModuleSpeling.def ApacheModuleStatus.def
                        ApacheModuleUserTrack.def getopt.c getopt.h
                        main_nlm.c mod_nlm.c modules.c multithread.c
                        precomp.h test_char.h uri_delims.h
  Log:
  NetWare port of Apache 1.3, part 2 of 2.
  
  Obtained from: Mike Gardiner
  
  Revision  Changes    Path
  1.2       +8 -18     apache-1.3/src/os/netware/os.c
  
  Index: os.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/netware/os.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- os.c	1999/10/28 17:57:43	1.1
  +++ os.c	2000/01/11 21:52:06	1.2
  @@ -57,78 +57,68 @@
   
   #include "ap_config.h"
   
  -
   void ap_os_dso_init(void)
   {
  -
   }
   
  -
   void *ap_os_dso_load(const char *path)
   {
       unsigned int nlmHandle;
       char *moduleName = NULL;
  -
  +    
       moduleName = strrchr(path, '/');
   
  -    if(moduleName)
  +    if (moduleName)
           moduleName++;
       
       nlmHandle = FindNLMHandle((char*)moduleName);
   
  -    if(nlmHandle == NULL) {
  -        spawnlp(P_NOWAIT | P_SPAWN_IN_CURRENT_DOMAIN, path, NULL);
  +    if (nlmHandle == NULL) {
  +        spawnlp(P_NOWAIT | P_SPAWN_IN_CURRENT_DOMAIN, path, NULL);        
           nlmHandle = FindNLMHandle((char *)moduleName);
       }
   
       return (void *)nlmHandle;
   }
   
  -
   void ap_os_dso_unload(void *handle)
   {
   	KillMe(handle);
   }
   
  -
   void *ap_os_dso_sym(void *handle, const char *symname)
   {
       return ImportSymbol((int)GetNLMHandle(), (char *)symname);
   }
   
  -
   const char *ap_os_dso_error(void)
   {
       return NULL;
   }
   
  -
   char *remove_filename(char* str)
   {
       int i, len = strlen(str);    
     
  -    for(i=len; i; i--) {
  -        if(str[i] == '\\' || str[i] == '/') {
  +    for (i=len; i; i--) {
  +        if (str[i] == '\\' || str[i] == '/') {
               str[i] = NULL;
               break;
           }
       }
  -
       return str;
   }
   
  -
   char *bslash2slash(char* str)
   {
       int i, len = strlen(str);    
     
  -    for(i=0; i<len; i++) {
  -        if(str[i] == '\\') {
  +    for (i=0; i<len; i++) {
  +        if (str[i] == '\\') {
               str[i] = '/';
               break;
           }
       }
  -    
       return str;
   }
   
  
  
  
  1.2       +2 -1      apache-1.3/src/os/netware/os.h
  
  Index: os.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/netware/os.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- os.h	1999/10/28 17:57:45	1.1
  +++ os.h	2000/01/11 21:52:07	1.2
  @@ -125,7 +125,7 @@
   
   inline int ap_os_is_path_absolute(const char *file)
   {
  -    if(strstr(file, ":/"))
  +    if (strstr(file, ":/"))
           return 1;
       else
           return 0;
  @@ -140,3 +140,4 @@
   char *remove_filename(char*);
   char *bslash2slash(char*);
   #endif /*! APACHE_OS_H*/
  +
  
  
  
  1.1                  apache-1.3/src/os/netware/Apache.def
  
  Index: Apache.def
  ===================================================================
  # NLMs Apache depends on
  
  MODULE clib.nlm
  MODULE apachec.nlm
  
  
  
  1.1                  apache-1.3/src/os/netware/ApacheCore.imp
  
  Index: ApacheCore.imp
  ===================================================================
  ap_MD5Final
  ap_MD5Init
  ap_MD5Update
  ap_acquire_mutex
  ap_add_cgi_vars
  ap_add_common_vars
  ap_add_loaded_module
  ap_add_module
  ap_add_named_module
  ap_add_per_dir_conf
  ap_add_per_url_conf
  ap_add_version_component
  ap_allow_options
  ap_allow_overrides
  ap_append_arrays
  ap_array_cat
  ap_auth_name
  ap_auth_type
  ap_basic_http_header
  ap_bclose
  ap_bcreate
  ap_bfilbuf
  ap_bfileno
  ap_bflsbuf
  ap_bflush
  ap_bgetopt
  ap_bgets
  ap_bhalfduplex
  ap_block_alarms
  ap_blookc
  ap_bnonblock
  ap_bonerror
  ap_bpushfd
  ap_bputs
  ap_bread
  ap_bsetflag
  ap_bsetopt
  ap_bskiplf
  ap_bspawn_child
  ap_bwrite
  ap_bytes_in_free_blocks
  ap_bytes_in_pool
  ap_call_exec
  ap_can_exec
  ap_cfg_closefile
  ap_cfg_getc
  ap_cfg_getline
  ap_chdir_file
  ap_check_alarm
  ap_check_cmd_context
  ap_checkmask
  ap_cleanup_for_exec
  ap_clear_module_list
  ap_clear_pool
  ap_clear_table
  ap_close_piped_log
  ap_construct_server
  ap_construct_url
  ap_content_type_tolower
  ap_copy_array
  ap_copy_array_hdr
  ap_copy_table
  ap_count_dirs
  ap_cpystrn
  ap_create_environment
  ap_create_mutex
  ap_create_per_dir_config
  ap_custom_response
  ap_default_port_for_request
  ap_default_port_for_scheme
  ap_default_type
  ap_destroy_mutex
  ap_destroy_pool
  ap_destroy_sub_req
  ap_die
  ap_discard_request_body
  ap_document_root
  ap_each_byterange
  ap_error_log2stderr
  ap_escape_html
  ap_escape_path_segment
  ap_escape_quotes
  ap_escape_shell_cmd
  ap_exists_scoreboard_image
  ap_finalize_request_protocol
  ap_find_command
  ap_find_command_in_modules
  ap_find_last_token
  ap_find_linked_module
  ap_find_module_name
  ap_find_path_info
  ap_find_token
  ap_get_basic_auth_pw
  ap_get_client_block
  ap_get_gmtoff
  ap_get_limit_req_body
  ap_get_remote_host
  ap_get_remote_logname
  ap_get_server_built
  ap_get_server_name
  ap_get_server_port
  ap_get_server_version
  ap_get_time
  ap_get_token
  ap_getparents
  ap_getword
  ap_getword_conf
  ap_getword_conf_nc
  ap_getword_nc
  ap_getword_nulls
  ap_getword_nulls_nc
  ap_getword_white
  ap_getword_white_nc
  ap_gm_timestr_822
  ap_gname2id
  ap_handle_command
  ap_hard_timeout
  ap_ht_time
  ap_ind
  ap_index_of_response
  ap_init_virtual_host
  ap_internal_redirect
  ap_internal_redirect_handler
  ap_is_directory
  ap_is_fnmatch
  ap_is_initial_req
  ap_is_matchexp
  ap_is_url
  ap_kill_cleanup
  ap_kill_cleanups_for_fd
  ap_kill_cleanups_for_socket
  ap_kill_timeout
  ap_log_assert
  ap_log_error_old
  ap_log_reason
  ap_log_unixerr
  ap_make_array
  ap_make_dirstr
  ap_make_dirstr_parent
  ap_make_dirstr_prefix
  ap_make_full_path
  ap_make_sub_pool
  ap_make_table
  ap_matches_request_vhost
  ap_md5
  ap_md5_binary
  ap_md5contextTo64
  ap_md5digest
  ap_meets_conditions
  ap_no2slash
  ap_note_auth_failure
  ap_note_basic_auth_failure
  ap_note_cleanups_for_fd
  ap_note_cleanups_for_file
  ap_note_cleanups_for_socket
  ap_note_digest_auth_failure
  ap_note_subprocess
  ap_open_mutex
  ap_open_piped_log
  ap_os_escape_path
  ap_overlap_tables
  ap_overlay_tables
  ap_palloc
  ap_parseHTTPdate
  ap_parse_hostinfo_components
  ap_parse_uri
  ap_parse_uri_components
  ap_pcalloc
  ap_pcfg_open_custom
  ap_pcfg_openfile
  ap_pclosedir
  ap_pclosef
  ap_pclosesocket
  ap_pduphostent
  ap_pfclose
  ap_pfdopen
  ap_pfopen
  ap_pgethostbyname
  ap_popendir
  ap_popenf
  ap_pregcomp
  ap_pregfree
  ap_pregsub
  ap_psignature
  ap_psocket
  ap_pstrdup
  ap_pstrndup
  ap_push_array
  ap_pvsprintf
  ap_rationalize_mtime
  ap_register_cleanup
  ap_release_mutex
  ap_remove_loaded_module
  ap_remove_module
  ap_requires
  ap_reset_timeout
  ap_rflush
  ap_rind
  ap_rputc
  ap_rputs
  ap_run_cleanup
  ap_run_sub_req
  ap_rwrite
  ap_satisfies
  ap_scan_script_header_err
  ap_scan_script_header_err_buff
  ap_scan_script_header_err_core
  ap_send_fb
  ap_send_fb_length
  ap_send_fd
  ap_send_fd_length
  ap_send_http_header
  ap_send_http_trace
  ap_send_mmap
  ap_send_size
  ap_server_root_relative
  ap_set_byterange
  ap_set_content_length
  ap_set_etag
  ap_set_keepalive
  ap_set_last_modified
  ap_setup_client_block
  ap_should_client_block
  ap_soft_timeout
  ap_some_auth_required
  ap_spawn_child
  ap_srm_command_loop
  ap_str_tolower
  ap_strcasecmp_match
  ap_strcmp_match
  ap_sub_req_lookup_file
  ap_sub_req_lookup_uri
  ap_sync_scoreboard_image
  ap_table_add
  ap_table_addn
  ap_table_get
  ap_table_merge
  ap_table_mergen
  ap_table_set
  ap_table_setn
  ap_table_unset
  ap_tm2sec
  ap_uname2id
  ap_unblock_alarms
  ap_unescape_url
  ap_unparse_uri_components
  ap_update_mtime
  ap_uudecode
  ap_uuencode
  ap_vbprintf
  ap_vformatter
  ap_vsnprintf
  regcomp
  regexec
  regfree
  access_module
  alias_module
  ap_bprintf
  ap_bvputs
  ap_day_snames
  ap_extended_status
  ap_limit_section
  ap_loaded_modules
  ap_log_error
  ap_log_printf
  ap_log_rerror
  ap_month_snames
  ap_null_cleanup
  ap_psprintf
  ap_pstrcat
  ap_restart_time
  ap_rprintf
  ap_rvputs
  ap_scoreboard_image
  ap_send_header_field
  ap_server_argv0
  ap_server_root
  ap_set_file_slot
  ap_set_flag_slot
  ap_set_string_slot
  ap_set_string_slot_lower
  ap_snprintf
  ap_suexec_enabled
  ap_table_do
  apache_main
  asis_module
  auth_module
  autoindex_module
  config_log_module
  core_module
  dir_module
  env_module
  imap_module
  includes_module
  mime_module
  negotiation_module
  setenvif_module
  so_module
  top_module
  ap_fnmatch
  ap_method_number_of
  ap_exists_config_define
  ap_single_module_configure
  ap_make_etag
  ap_array_pstrcat
  ap_find_list_item
  ap_MD5Encode
  ap_validate_password
  ap_size_list_item
  ap_get_list_item
  ap_scoreboard_fname
  ap_pid_fname
  ap_excess_requests_per_child
  ap_threads_per_child
  ap_max_requests_per_child
  ap_daemons_to_start
  ap_daemons_min_free
  ap_daemons_max_free
  ap_daemons_limit
  ap_user_name
  ap_user_id
  ap_group_id
  ap_standalone
  ap_server_confname
  ap_sub_req_method_uri
  ap_regerror
  ap_regexec
  ap_field_noparam
  ap_pbase64decode
  ap_pbase64encode
  ap_base64encode
  ap_base64encode_binary
  ap_base64encode_len
  ap_base64decode
  ap_base64decode_binary
  ap_base64decode_len
  ap_SHA1Init
  ap_SHA1Update_binary
  ap_SHA1Update
  ap_SHA1Final
  ap_sha1_base64
  ap_my_generation
  apache_main
  ap_get_virthost_addr
  ap_listeners
  ap_listenbacklog
  
  
  
  
  1.1                  apache-1.3/src/os/netware/ApacheCoreNW.def
  
  Index: ApacheCoreNW.def
  ===================================================================
  MODULE  CLIB.NLM
  MODULE  WS2_32.NLM
  IMPORT  KillMe
  EXPORT	@apachecore.imp
  
  
  
  1.1                  apache-1.3/src/os/netware/ApacheModuleAuthAnon.def
  
  Index: ApacheModuleAuthAnon.def
  ===================================================================
  EXPORT anon_auth_module
  
  
  
  
  1.1                  apache-1.3/src/os/netware/ApacheModuleCERNMeta.def
  
  Index: ApacheModuleCERNMeta.def
  ===================================================================
  EXPORT cern_meta_module
  
  
  
  1.1                  apache-1.3/src/os/netware/ApacheModuleDigest.def
  
  Index: ApacheModuleDigest.def
  ===================================================================
  EXPORT digest_module
  
  
  
  1.1                  apache-1.3/src/os/netware/ApacheModuleExpires.def
  
  Index: ApacheModuleExpires.def
  ===================================================================
  EXPORT expires_module
  
  
  
  1.1                  apache-1.3/src/os/netware/ApacheModuleHeaders.def
  
  Index: ApacheModuleHeaders.def
  ===================================================================
  EXPORT headers_module
  
  
  
  1.1                  apache-1.3/src/os/netware/ApacheModuleInfo.def
  
  Index: ApacheModuleInfo.def
  ===================================================================
  EXPORT info_module
  
  
  
  
  1.1                  apache-1.3/src/os/netware/ApacheModuleProxy.def
  
  Index: ApacheModuleProxy.def
  ===================================================================
  EXPORT proxy_module
  
  
  
  1.1                  apache-1.3/src/os/netware/ApacheModuleRewrite.def
  
  Index: ApacheModuleRewrite.def
  ===================================================================
  EXPORT rewrite_module
  
  
  
  1.1                  apache-1.3/src/os/netware/ApacheModuleSpeling.def
  
  Index: ApacheModuleSpeling.def
  ===================================================================
  EXPORT speling_module
  
  
  
  
  1.1                  apache-1.3/src/os/netware/ApacheModuleStatus.def
  
  Index: ApacheModuleStatus.def
  ===================================================================
  EXPORT status_module
  
  
  
  1.1                  apache-1.3/src/os/netware/ApacheModuleUserTrack.def
  
  Index: ApacheModuleUserTrack.def
  ===================================================================
  EXPORT usertrack_module
  
  
  
  1.1                  apache-1.3/src/os/netware/getopt.c
  
  Index: getopt.c
  ===================================================================
  #include <stdio.h>
  #include <string.h>
  #include <assert.h>
  #include <stdlib.h>
  
  #define OPTERRCOLON (1)
  #define OPTERRNF (2)
  #define OPTERRARG (3)
  
  char *optarg;
  int optind = 1;
  int opterr = 1;
  int optopt;
  
  static int
  optiserr(int argc, char * const *argv, int oint, const char *optstr,
           int optchr, int err)
  {
      if (opterr) {
          fprintf(stderr, "Error in argument %d, char %d: ", oint, optchr + 1);
  
          switch (err) {
          case OPTERRCOLON:
              fprintf(stderr, ": in flags\n");
              break;
          case OPTERRNF:
              fprintf(stderr, "option not found %c\n", argv[oint][optchr]);
              break;
          case OPTERRARG:
              fprintf(stderr, "no argument for option %c\n", argv[oint][optchr]);
              break;
          default:
              fprintf(stderr, "unknown\n");
              break;
          }
      }
      optopt = argv[oint][optchr];
      return('?');
  }
      
  int
  getopt(int argc, char* const *argv, const char *optstr)
  {
      static int optchr = 0;
      static int dash = 0; /* have already seen the - */
  
      char *cp;
  
      if (optind >= argc)
          return(EOF);
  
      if (!dash && (argv[optind][0] !=  '-'))
          return(EOF);
  
      if (!dash && (argv[optind][0] ==  '-') && !argv[optind][1]) {
          /*
           * use to specify stdin. Need to let pgm process this and
           * the following args
           */
          return(EOF);
      }
  
      if ((argv[optind][0] == '-') && (argv[optind][1] == '-')) {
          /* -- indicates end of args */
          optind++;
          return(EOF);
      }
  
      if (!dash) {
          assert((argv[optind][0] == '-') && argv[optind][1]);
          dash = 1;
          optchr = 1;
      }
  
      /* Check if the guy tries to do a -: kind of flag */
      assert(dash);
      if (argv[optind][optchr] == ':') {
          dash = 0;
          optind++;
          return(optiserr(argc, argv, optind-1, optstr, optchr, OPTERRCOLON));
      }
  
      if (!(cp = strchr(optstr, argv[optind][optchr]))) {
          int errind = optind;
          int errchr = optchr;
  
          if (!argv[optind][optchr+1]) {
              dash = 0;
              optind++;
          }
          else
              optchr++;
          return(optiserr(argc, argv, errind, optstr, errchr, OPTERRNF));
      }
  
      if (cp[1] == ':') {
          dash = 0;
          optind++;
  
          if(optind == argc)
              return(optiserr(argc, argv, optind-1, optstr, optchr, OPTERRARG));
          optarg = argv[optind++];
          return(*cp);
      } else {
          if (!argv[optind][optchr+1]) {
              dash = 0;
              optind++;
          }
          else
              optchr++;
          return(*cp);
      }
      assert(0);
      return(0);
  }
  
  #ifdef TESTGETOPT
  int main(int argc, char **argv)
  {
      int c;
      extern char *optarg;
      extern int optind;
      int aflg = 0;
      int bflg = 0;
      int errflg = 0;
      char *ofile = NULL;
  
      while ((c = getopt(argc, argv, "abo:")) != EOF)
          switch (c) {
          case 'a':
              if (bflg)
                  errflg++;
              else
                  aflg++;
              break;
          case 'b':
              if (aflg)
                  errflg++;
              else
                  bflg++;
              break;
          case 'o':
              ofile = optarg;
              (void)printf("ofile = %s\n", ofile);
              break;
          case '?':
              errflg++;
          }
  
      if (errflg) {
          (void)fprintf(stderr, "usage: cmd [-a|-b] [-o <filename>] files...\n");
          exit(2);
      }
  
      for ( ; optind < argc; optind++)
          (void)printf("%s\n", argv[optind]);
  
      return 0;
  }
  
  #endif /* TESTGETOPT */
  
  
  1.1                  apache-1.3/src/os/netware/getopt.h
  
  Index: getopt.h
  ===================================================================
  #ifndef GETOPT_H
  #define GETOPT_H
  
  extern char *optarg;
  extern int optind;
  extern int opterr;
  extern int optopt;
  int getopt(int argc, char* const *argv, const char *optstr);
  
  #endif /* GETOPT_H */
  
  
  1.1                  apache-1.3/src/os/netware/main_nlm.c
  
  Index: main_nlm.c
  ===================================================================
  /* main_NLM.c - Apache executable stub file for NetWare
   * This file's purpose in life is to load, and call the
   * "real" main function, apache_main(), located in ApacheC.nlm
   */
  int apache_main(int argc, char *argv[]);
  
  int main(int argc, char *argv[]) 
  {
      return apache_main(argc, argv);
  }
  
  
  
  1.1                  apache-1.3/src/os/netware/mod_nlm.c
  
  Index: mod_nlm.c
  ===================================================================
  /* ====================================================================
   * Copyright (c) 1995-1999 The Apache Group.  All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. All advertising materials mentioning features or use of this
   *    software must display the following acknowledgment:
   *    "This product includes software developed by the Apache Group
   *    for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * 4. The names "Apache Server" and "Apache Group" must not be used to
   *    endorse or promote products derived from this software without
   *    prior written permission. For written permission, please contact
   *    apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * 6. Redistributions of any form whatsoever must retain the following
   *    acknowledgment:
   *    "This product includes software developed by the Apache Group
   *    for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
   * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE APACHE GROUP OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
   * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
   * OF THE POSSIBILITY OF SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Group and was originally based
   * on public domain software written at the National Center for
   * Supercomputing Applications, University of Illinois, Urbana-Champaign.
   * For more information on the Apache Group and the Apache HTTP server
   * project, please see <http://www.apache.org/>.
   *
   */
  
  #include "httpd.h"
  #include "http_config.h"
  #include <nwadv.h>
  
  module MODULE_VAR_EXPORT nlm_module;
  static int been_there_done_that = 0; /* Loaded the modules yet? */
  
  char *load_module(cmd_parms *cmd, void *dummy, char *modname, char *filename)
  {
      module *modp;
      int nlmHandle;
      const char *szModuleFile = ap_server_root_relative(cmd->pool, filename);
  
      if (been_there_done_that)
          return NULL;
  
  	nlmHandle = FindNLMHandle(filename);
  
      if (nlmHandle == NULL) {
          spawnlp(P_NOWAIT, szModuleFile, NULL);
          nlmHandle = FindNLMHandle(filename);
  
          if (nlmHandle == NULL)
              return ap_pstrcat(cmd->pool, "Cannot load ", szModuleFile,
                                " into server", NULL);
      }
  
      modp = (module *) ImportSymbol(nlmHandle, modname);
  
      if (!modp)
          return ap_pstrcat(cmd->pool, "Can't find module ", modname,
                            " in file ", filename, NULL);
  	
      ap_add_module(modp);
  
      if (modp->create_server_config)
          ((void**)cmd->server->module_config)[modp->module_index] =
           (*modp->create_server_config)(cmd->pool, cmd->server);
  
      if (modp->create_dir_config)
          ((void**)cmd->server->lookup_defaults)[modp->module_index] =
           (*modp->create_dir_config)(cmd->pool, NULL);
  
      return NULL;
  }
  
  char *load_file(cmd_parms *cmd, void *dummy, char *filename)
  {
      if (been_there_done_that)
          return NULL;
  
      if (spawnlp(P_NOWAIT, ap_server_root_relative(cmd->pool, filename), NULL))
          return ap_pstrcat(cmd->pool, "Cannot load ", filename, " into server", NULL);
  
      return NULL;
  }
  
  void check_loaded_modules(server_rec *dummy, pool *p)
  {
      if (been_there_done_that)
          return;
  
      been_there_done_that = 1;
  }
  
  command_rec nlm_cmds[] = {
  { "LoadModule", load_module, NULL, RSRC_CONF, TAKE2,
    "a module name, and the name of a file to load it from"},
  { "LoadFile", load_file, NULL, RSRC_CONF, ITERATE,
    "files or libraries to link into the server at runtime"},
  { NULL }
  };
  
  module nlm_module = {
     STANDARD_MODULE_STUFF,
     check_loaded_modules,  /* initializer */
     NULL,                  /* create per-dir config */
     NULL,                  /* merge per-dir config */
     NULL,                  /* server config */
     NULL,                  /* merge server config */
     nlm_cmds,              /* command table */
     NULL,                  /* handlers */
     NULL,                  /* filename translation */
     NULL,                  /* check_user_id */
     NULL,                  /* check auth */
     NULL,                  /* check access */
     NULL,                  /* type_checker */
     NULL,                  /* logger */
     NULL                   /* header parser */
  };
  
  
  
  
  1.1                  apache-1.3/src/os/netware/modules.c
  
  Index: modules.c
  ===================================================================
  /* modules.c --- major modules compiled into Apache for NetWare.
   * Only insert an entry for a module if it must be compiled into
   * the core server
   */
  
  #include "httpd.h"
  #include "http_config.h"
  
  extern module core_module;
  extern module so_module;
  extern module mime_module;
  extern module access_module;
  extern module auth_module;
  extern module negotiation_module;
  extern module includes_module;
  extern module autoindex_module;
  extern module dir_module;
  // extern module cgi_module;
  extern module userdir_module;
  extern module alias_module;
  extern module env_module;
  extern module config_log_module;
  extern module asis_module;
  extern module imap_module;
  extern module action_module;
  extern module setenvif_module;
  
  module *ap_prelinked_modules[] = {
    &core_module,
    &so_module,
    &mime_module,
    &access_module,
    &auth_module,
    &negotiation_module,
    &includes_module,
    &autoindex_module,
    &dir_module,
  //  &cgi_module,
    &userdir_module,
    &alias_module,
    &env_module,
    &config_log_module,
    &asis_module,
    &imap_module,
    &action_module,
    &setenvif_module,
    NULL
  };
  
  module *ap_preloaded_modules[] = {
    &core_module,
    &so_module,
    &mime_module,
    &access_module,
    &auth_module,
    &negotiation_module,
    &includes_module,
    &autoindex_module,
    &dir_module,
  //  &cgi_module,
    &userdir_module,
    &alias_module,
    &env_module,
    &config_log_module,
    &asis_module,
    &imap_module,
    &action_module,
    &setenvif_module,
    NULL
  };
  
  
  
  1.1                  apache-1.3/src/os/netware/multithread.c
  
  Index: multithread.c
  ===================================================================
  
  #include "ap_config.h"
  #include "httpd.h"
  #include "http_conf_globals.h"
  #include "multithread.h"
  #include <nwsemaph.h>
  
  
  
  thread *create_thread(void (thread_fn)(void *), void *thread_arg)
  {
      int rv;
  
      rv = BeginThread(thread_fn, NULL, ap_thread_stack_size, thread_arg); 
      return((thread *)rv);
  }
  
  int kill_thread(thread *thread_id)
  {
      return(0);
  }
  
  int await_thread(thread *thread_id, int sec_to_wait)
  {
      return(0);
  }
  
  void exit_thread(int status)
  {}
  
  void free_thread(thread *thread_id)
  {}
  
  
  mutex * ap_create_mutex(char *name)
  {
      return(malloc(1));
  }
  
  mutex * ap_open_mutex(char *name)
  {
  	return((mutex*)EnterCritSec());
  }
  
  int ap_acquire_mutex(mutex *mutex_id)
  {
  	return(EnterCritSec());
  }
  
  int ap_release_mutex(mutex *mutex_id)
  {
  	return(ExitCritSec());
  }
  
  void ap_destroy_mutex(mutex *mutex_id)
  {
      free(mutex_id);
  }
  
  
  semaphore *create_semaphore(int initial)
  {
  	return((semaphore*)OpenLocalSemaphore(initial));
  }
  int acquire_semaphore(semaphore *semaphore_id)
  {
  	return(WaitOnLocalSemaphore((long)semaphore_id));
  }
  int release_semaphore(semaphore *semaphore_id)
  {
  	return(SignalLocalSemaphore((long)semaphore_id));
  }
  void destroy_semaphore(semaphore *semaphore_id)
  {
  	CloseLocalSemaphore((long)semaphore_id);
  }
  
  event *create_event(int manual, int initial, char *name)
  {
      return(NULL);
  }
  event *open_event(char *name)
  {
      return(NULL);
  }
  int acquire_event(event *event_id)
  {
      return(0);
  }
  int set_event(event *event_id)
  {
      return(0);
  }
  int reset_event(event *event_id)
  {
      return(0);
  }
  void destroy_event(event *event_id)
  {}
  
  
  
  
  
  
  1.1                  apache-1.3/src/os/netware/precomp.h
  
  Index: precomp.h
  ===================================================================
  #pragma precompile_target "precomp.mch"
  #define NETWARE
  
  #ifndef __int64
  #define __int64 long long
  #endif
  
  
  
  
  
  
  
  
  1.1                  apache-1.3/src/os/netware/test_char.h
  
  Index: test_char.h
  ===================================================================
  /* this file is automatically generated by gen_test_char, do not edit */
  #define T_ESCAPE_SHELL_CMD	(1)
  #define T_ESCAPE_PATH_SEGMENT	(2)
  #define T_OS_ESCAPE_PATH	(4)
  #define T_HTTP_TOKEN_STOP	(8)
  
  static const unsigned char test_char_table[256] = {
      0,14,14,14,14,14,14,14,14,14,15,14,14,14,14,14,14,14,14,14,
      14,14,14,14,14,14,14,14,14,14,14,14,14,0,7,6,1,6,1,1,
      9,9,1,0,8,0,0,10,0,0,0,0,0,0,0,0,0,0,8,15,
      15,8,15,15,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
      0,0,0,0,0,0,0,0,0,0,0,15,15,15,7,0,7,0,0,0,
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
      0,0,0,15,7,15,1,14,6,6,6,6,6,6,6,6,6,6,6,6,
      6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
      6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
      6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
      6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
      6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
      6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6 
  };
  
  
  
  1.1                  apache-1.3/src/os/netware/uri_delims.h
  
  Index: uri_delims.h
  ===================================================================
  /* this file is automatically generated by gen_uri_delims, do not edit */
  static const unsigned char uri_delims[256] = {
      T_NUL,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,T_HASH,0,0,0,0,
      0,0,0,0,0,0,0,T_SLASH,0,0,0,0,0,0,0,0,0,0,T_COLON,0,
      0,0,0,T_QUESTION,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 
  };
  
  
  

Mime
View raw message