You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@locus.apache.org on 2000/03/24 06:03:22 UTC

cvs commit: apache-2.0/src/os/win32 os.h

stoddard    00/03/23 21:03:22

  Modified:    src/modules/mpm/winnt winnt.c
               src/os/win32 os.h
  Log:
  Do a bit of Win32 specific garbage collecting. Most of os.h (of not all
  of it) should go away eventually, merged into APR. Seems useful to delete
  the obvious garbage first.
  
  Revision  Changes    Path
  1.44      +2 -21     apache-2.0/src/modules/mpm/winnt/winnt.c
  
  Index: winnt.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/winnt/winnt.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- winnt.c	2000/03/24 04:45:27	1.43
  +++ winnt.c	2000/03/24 05:03:22	1.44
  @@ -118,25 +118,6 @@
    * or thrown out entirely...
    */
   
  -static int
  -map_rv(int rv)
  -{
  -    switch(rv)
  -    {
  -    case WAIT_OBJECT_0:
  -    case WAIT_ABANDONED:
  -        return(MULTI_OK);
  -    case WAIT_TIMEOUT:
  -        return(MULTI_TIMEOUT);
  -    case WAIT_FAILED:
  -        return(MULTI_ERR);
  -    default:
  -        ap_assert(0);
  -    }
  -
  -    ap_assert(0);
  -    return(0);
  -}
   
   typedef void semaphore;
   typedef void event;
  @@ -147,13 +128,13 @@
       return(CreateSemaphore(NULL, initial, 1000000, NULL));
   }
   
  -static int acquire_semaphore(semaphore *semaphore_id)
  +static void acquire_semaphore(semaphore *semaphore_id)
   {
       int rv;
       
       rv = WaitForSingleObject(semaphore_id, INFINITE);
       
  -    return(map_rv(rv));
  +    return;
   }
   
   static int release_semaphore(semaphore *semaphore_id)
  
  
  
  1.18      +2 -23     apache-2.0/src/os/win32/os.h
  
  Index: os.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/os/win32/os.h,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- os.h	2000/03/22 11:36:51	1.17
  +++ os.h	2000/03/24 05:03:22	1.18
  @@ -139,11 +139,6 @@
   #define S_ISDIR(m) (((m) & S_IFDIR) == S_IFDIR)
   #endif
   
  -#if 0
  -#ifndef S_ISREG
  -#define S_ISREG(m)      (((m)&(S_IFREG)) == (S_IFREG))
  -#endif
  -#endif
   
   #define STDIN_FILENO  0
   #define STDOUT_FILENO 1
  @@ -163,13 +158,6 @@
     return file[0] == '/' || file[1] == ':';
   }
   
  -#define _spawnv(mode,cmdname,argv)	    os_spawnv(mode,cmdname,argv)
  -#define spawnv(mode,cmdname,argv)	    os_spawnv(mode,cmdname,argv)
  -#define _spawnve(mode,cmdname,argv,envp)    os_spawnve(mode,cmdname,argv,envp)
  -#define spawnve(mode,cmdname,argv,envp)	    os_spawnve(mode,cmdname,argv,envp)
  -#define _spawnle			    os_spawnle
  -#define spawnle				    os_spawnle
  -
   /* OS-dependent filename routines in util_win32.c */
   API_EXPORT(char *) ap_os_canonical_filename(ap_context_t *p, const char *file);
   API_EXPORT(char *) ap_os_case_canonical_filename(ap_context_t *pPool, const char *szFile);
  @@ -179,7 +167,9 @@
   
   /* Abstractions for dealing with shared object files (DLLs on Win32).
    * These are used by mod_so.c
  + * ToDo: This need to be migrated to APR
    */
  +
   #define ap_os_dso_handle_t  HINSTANCE
   #define ap_os_dso_init()
   #define ap_os_dso_load(l)   LoadLibraryEx(l, NULL, LOAD_WITH_ALTERED_SEARCH_PATH)
  @@ -190,19 +180,8 @@
   /* Other ap_os_ routines not used by this platform */
   #define ap_os_kill(pid, sig)                kill(pid, sig)
   
  -/* Moved from multithread.h. Axe this stuff when APR comes online... */
  -
  -#define MULTI_OK (0)
  -#define MULTI_TIMEOUT (1)
  -#define MULTI_ERR (2)
  -
   typedef void thread;
   typedef void event;
   
  -thread *create_thread(void (thread_fn) (void *thread_arg), void *thread_arg);
  -int kill_thread(thread *thread_id);
  -int await_thread(thread *thread_id, int sec_to_wait);
  -void exit_thread(int status);
  -void free_thread(thread *thread_id);
   
   #endif   /* ! APACHE_OS_H */