httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@hyperreal.org
Subject cvs commit: apache-apr/include apr_portable.h
Date Fri, 02 Jul 1999 19:09:30 GMT
rbb         99/07/02 12:09:29

  Modified:    apr/file_io/win32 dir.c file_io.def open.c
               apr/include apr_win.h
               apr/lib  apr_pools.c
               apr/locks/win32 locks.c locks.def
               apr/network_io/win32 network_io.def sockets.c
               apr/threadproc/win32 proc.c thread.c threadpriv.c
                        threadproc.def threadproc.h
               apr/time/win32 time.c time.def
               include  apr_portable.h
  Log:
  Brings the portable APR routines to Windows.  These allow a programmer to convert from
  APR types to platform specific types in a portable manner.
  
  Revision  Changes    Path
  1.2       +5 -0      apache-apr/apr/file_io/win32/dir.c
  
  Index: dir.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/file_io/win32/dir.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- dir.c	1999/06/03 19:43:43	1.1
  +++ dir.c	1999/07/02 19:09:15	1.2
  @@ -71,6 +71,7 @@
   #include "fileio.h"
   #include "apr_file_io.h"
   #include "apr_lib.h"
  +#include "apr_portable.h"
   
   ap_status_t dir_cleanup(void *thedir)
   {
  @@ -208,3 +209,7 @@
       return APR_SUCCESS;
   }
   
  +ap_os_dir_t *ap_get_os_dir(struct dir_t *dir)
  +{
  +    return &(dir->dirhand);
  +}
  \ No newline at end of file
  
  
  
  1.4       +2 -1      apache-apr/apr/file_io/win32/file_io.def
  
  Index: file_io.def
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/file_io/win32/file_io.def,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- file_io.def	1999/06/23 15:00:06	1.3
  +++ file_io.def	1999/07/02 19:09:15	1.4
  @@ -31,5 +31,6 @@
   	ap_seek   @24
       ap_get_filedata   @25
       ap_set_filedata   @26
  -
  +    ap_get_os_file   @27
  +    ap_get_os_dir   @28
   	
  
  
  
  1.3       +5 -0      apache-apr/apr/file_io/win32/open.c
  
  Index: open.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/file_io/win32/open.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- open.c	1999/06/07 13:21:41	1.2
  +++ open.c	1999/07/02 19:09:15	1.3
  @@ -59,6 +59,7 @@
   #include "apr_file_io.h"
   #include "apr_general.h"
   #include "apr_lib.h"
  +#include "apr_portable.h"
   #include <errno.h>
   #include <string.h>
   #include <sys/stat.h>
  @@ -167,3 +168,7 @@
       }
   }
   
  +ap_os_file_t *ap_get_os_file(struct file_t *file)
  +{
  +    return &(file->filehand);
  +}
  
  
  
  1.7       +2 -1      apache-apr/apr/include/apr_win.h
  
  Index: apr_win.h
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/include/apr_win.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- apr_win.h	1999/06/30 19:45:36	1.6
  +++ apr_win.h	1999/07/02 19:09:16	1.7
  @@ -57,7 +57,8 @@
   
   #ifndef APR_WIN_H
   #define APR_WIN_H
  -
  +/*#define WIN32_LEAN_AND_MEAN*/
  +#include <winsock2.h>
   #include <windows.h>
   #include <sys\types.h>
   #include <stdio.h>
  
  
  
  1.8       +2 -0      apache-apr/apr/lib/apr_pools.c
  
  Index: apr_pools.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/lib/apr_pools.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- apr_pools.c	1999/06/07 19:27:35	1.7
  +++ apr_pools.c	1999/07/02 19:09:16	1.8
  @@ -72,6 +72,8 @@
   #include "apr_pools.h"
   #include "apr_lib.h"
   #include "misc.h"
  +#include <stdlib.h>
  +#include <malloc.h>
   
   /*
    * Debugging support: Define this to enable code which helps detect re-use
  
  
  
  1.3       +7 -0      apache-apr/apr/locks/win32/locks.c
  
  Index: locks.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/locks/win32/locks.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- locks.c	1999/06/23 15:00:07	1.2
  +++ locks.c	1999/07/02 19:09:17	1.3
  @@ -56,6 +56,7 @@
   #include "apr_general.h"
   #include "apr_lib.h"
   #include "locks.h"
  +#include "apr_portable.h"
   
   ap_status_t ap_create_lock(ap_context_t *cont, ap_locktype_e type, char *fname, struct
lock_t **lock)
   {
  @@ -152,3 +153,9 @@
           return APR_ENOLOCK;
       }
   }
  +
  +ap_os_lock_t *ap_get_os_lock(struct lock_t *lock)
  +{
  +    return &(lock->mutex);
  +}
  +
  
  
  
  1.3       +1 -0      apache-apr/apr/locks/win32/locks.def
  
  Index: locks.def
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/locks/win32/locks.def,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- locks.def	1999/06/23 15:00:07	1.2
  +++ locks.def	1999/07/02 19:09:17	1.3
  @@ -12,3 +12,4 @@
       ap_child_init_lock   @5
       ap_get_lockdata   @6
       ap_set_lockdata   @7
  +    ap_get_os_lock   @8
  \ No newline at end of file
  
  
  
  1.3       +2 -1      apache-apr/apr/network_io/win32/network_io.def
  
  Index: network_io.def
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/network_io/win32/network_io.def,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- network_io.def	1999/06/23 15:00:09	1.2
  +++ network_io.def	1999/07/02 19:09:20	1.3
  @@ -25,4 +25,5 @@
       ap_get_socketdata   @18
       ap_set_socketdata   @19
       ap_get_polldata   @20
  -    ap_set_polldata   @21
  \ No newline at end of file
  +    ap_set_polldata   @21
  +    ap_get_os_sock   @22
  \ No newline at end of file
  
  
  
  1.4       +5 -0      apache-apr/apr/network_io/win32/sockets.c
  
  Index: sockets.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/network_io/win32/sockets.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- sockets.c	1999/06/23 15:00:09	1.3
  +++ sockets.c	1999/07/02 19:09:22	1.4
  @@ -57,6 +57,7 @@
   #include "apr_network_io.h"
   #include "apr_general.h"
   #include "apr_lib.h"
  +#include "apr_portable.h"
   #include <string.h>
   #include <winsock2.h>
   #include <windows.h>
  @@ -263,3 +264,7 @@
       }
   }
   
  +ap_os_sock_t *ap_get_os_sock(struct socket_t *sock)
  +{
  +    return &(sock->sock);
  +}
  \ No newline at end of file
  
  
  
  1.6       +6 -0      apache-apr/apr/threadproc/win32/proc.c
  
  Index: proc.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/threadproc/win32/proc.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- proc.c	1999/06/29 15:52:13	1.5
  +++ proc.c	1999/07/02 19:09:25	1.6
  @@ -60,6 +60,8 @@
   #include "apr_file_io.h"
   #include "apr_general.h"
   #include "apr_lib.h"
  +#include "apr_portable.h"
  +#include <stdlib.h>
   #include <signal.h>
   #include <string.h>
   #include <process.h>
  @@ -358,3 +360,7 @@
       }
   }
   
  +ap_os_proc_t *ap_get_os_proc(struct proc_t *process)
  +{
  +    return &(process->pi);
  +}
  \ No newline at end of file
  
  
  
  1.4       +7 -2      apache-apr/apr/threadproc/win32/thread.c
  
  Index: thread.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/threadproc/win32/thread.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- thread.c	1999/06/23 15:00:10	1.3
  +++ thread.c	1999/07/02 19:09:26	1.4
  @@ -52,12 +52,12 @@
    * project, please see <http://www.apache.org/>.
    *
    */
  -
  +#include "apr_win.h"
   #include "threadproc.h"
   #include "apr_thread_proc.h"
   #include "apr_general.h"
   #include "apr_lib.h"
  -#include "apr_win.h"
  +#include "apr_portable.h"
   #include <process.h>
   
   
  @@ -176,6 +176,11 @@
           data = NULL;
           return APR_ENOTHREAD;
       }
  +}
  +
  +ap_os_thread_t *ap_get_os_thread(ap_thread_t *thd)
  +{
  +    return &(thd->td);
   }
   
   
  
  
  
  1.3       +6 -0      apache-apr/apr/threadproc/win32/threadpriv.c
  
  Index: threadpriv.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/threadproc/win32/threadpriv.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- threadpriv.c	1999/06/23 15:00:10	1.2
  +++ threadpriv.c	1999/07/02 19:09:26	1.3
  @@ -57,6 +57,7 @@
   #include "apr_thread_proc.h"
   #include "apr_general.h"
   #include "apr_errno.h"
  +#include "apr_portable.h"
   
   ap_status_t ap_create_thread_private(ap_context_t *cont, void (*dest)(void *),
                                        struct threadkey_t **key)
  @@ -110,3 +111,8 @@
           return APR_ENOTHDKEY;
       }
   }
  +
  +ap_os_threadkey_t *ap_get_os_threadkey(ap_key_t *key)
  +{
  +    return &(key->key);
  +}
  \ No newline at end of file
  
  
  
  1.3       +3 -0      apache-apr/apr/threadproc/win32/threadproc.def
  
  Index: threadproc.def
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/threadproc/win32/threadproc.def,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- threadproc.def	1999/06/23 15:00:10	1.2
  +++ threadproc.def	1999/07/02 19:09:26	1.3
  @@ -34,3 +34,6 @@
       ap_set_threadkeydata    @27
       ap_get_procdata    @28
       ap_set_procdata    @29
  +    ap_get_os_proc   @30
  +    ap_get_os_thread   @31
  +    ap_get_os_threadkey   @32
  
  
  
  1.2       +2 -2      apache-apr/apr/threadproc/win32/threadproc.h
  
  Index: threadproc.h
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/threadproc/win32/threadproc.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- threadproc.h	1999/06/08 15:38:11	1.1
  +++ threadproc.h	1999/07/02 19:09:27	1.2
  @@ -52,10 +52,10 @@
    * project, please see <http://www.apache.org/>.
    *
    */
  -
  -#include <windows.h>
  +#include "apr_win.h"
   #include "apr_thread_proc.h"
   #include "apr_file_io.h"
  +#include <windows.h>
   
   #ifndef THREAD_PROC_H
   #define THREAD_PROC_H
  
  
  
  1.2       +8 -0      apache-apr/apr/time/win32/time.c
  
  Index: time.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/time/win32/time.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- time.c	1999/06/17 18:56:22	1.1
  +++ time.c	1999/07/02 19:09:28	1.2
  @@ -57,6 +57,7 @@
   #include "apr_time.h"
   #include "apr_general.h"
   #include "apr_lib.h"
  +#include "apr_portable.h"
   #include <time.h>
   #include <errno.h>
   #include <string.h>
  @@ -110,3 +111,10 @@
       return APR_SUCCESS;
   }
   
  +ap_os_time_t *ap_get_os_time(ap_time_t *atime)
  +{
  +    if (atime->explodedtime == NULL) {
  +        ap_implode_time(atime);
  +    }
  +    return atime->explodedtime;
  +}
  \ No newline at end of file
  
  
  
  1.3       +2 -1      apache-apr/apr/time/win32/time.def
  
  Index: time.def
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/time/win32/time.def,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- time.def	1999/06/23 15:00:12	1.2
  +++ time.def	1999/07/02 19:09:28	1.3
  @@ -25,4 +25,5 @@
       ap_set_year   @18
       ap_set_wday   @19
       ap_get_timedata   @20
  -    ap_set_timedata   @21
  \ No newline at end of file
  +    ap_set_timedata   @21
  +    ap_get_os_time   @22
  \ No newline at end of file
  
  
  
  1.2       +16 -16    apache-apr/include/apr_portable.h
  
  Index: apr_portable.h
  ===================================================================
  RCS file: /home/cvs/apache-apr/include/apr_portable.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr_portable.h	1999/07/02 17:46:45	1.1
  +++ apr_portable.h	1999/07/02 19:09:29	1.2
  @@ -74,14 +74,14 @@
   
   #ifdef WIN32
   /* The primitives for Windows types */
  -typedef HANDLE           ap_os_file_t;
  -typedef HANDLE           ap_os_dir_t;
  -typedef HANDLE           ap_os_sock_t;
  -typedef HANDLE           ap_os_lock_t;
  -typedef HANDLE           ap_os_thread_t;
  -typedef HANDLE           ap_os_proc_t;
  -typedef DWORD            ap_os_threadkey_t; 
  -typedef SYSTEMTIME       ap_os_time_t;
  +typedef HANDLE                ap_os_file_t;
  +typedef HANDLE                ap_os_dir_t;
  +typedef SOCKET                ap_os_sock_t;
  +typedef HANDLE                ap_os_lock_t;
  +typedef HANDLE                ap_os_thread_t;
  +typedef PROCESS_INFORMATION   ap_os_proc_t;
  +typedef DWORD                 ap_os_threadkey_t; 
  +typedef SYSTEMTIME            ap_os_time_t;
   #else
   /* Any other OS should go above this one.  This is the lowest common
    * denominator typedefs for  all UNIX-like systems.  :)
  @@ -117,14 +117,14 @@
   #endif
   };
   
  -typedef int              ap_os_file_t;
  -typedef DIR              ap_os_dir_t;
  -typedef int              ap_os_sock_t;
  -typedef struct os_lock_t ap_os_lock_t;
  -typedef pthread_t        ap_os_thread_t;
  -typedef pid_t            ap_os_proc_t;
  -typedef pthread_key_t    ap_os_threadkey_t;
  -typedef time_t           ap_os_time_t;
  +typedef int                   ap_os_file_t;
  +typedef DIR                   ap_os_dir_t;
  +typedef int                   ap_os_sock_t;
  +typedef struct os_lock_t      ap_os_lock_t;
  +typedef pthread_t             ap_os_thread_t;
  +typedef pid_t                 ap_os_proc_t;
  +typedef pthread_key_t         ap_os_threadkey_t;
  +typedef time_t                ap_os_time_t;
   #endif
   
   ap_os_file_t        *ap_get_os_file(ap_file_t *);
  
  
  

Mime
View raw message