You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jw...@apache.org on 2001/06/27 21:40:56 UTC

cvs commit: apr/include/arch/win32 fileio.h

jwoolley    01/06/27 12:40:55

  Modified:    .        CHANGES
               file_io/unix fileacc.c filedup.c open.c
               file_io/win32 filedup.c open.c
               include  apr.h.in apr.hw apr_file_io.h
               include/arch/unix fileio.h
               include/arch/win32 fileio.h
  Log:
  *) Add apr_file_flags_get() which returns the flags that were originally
     passed in to apr_file_open().
  
  *) Added APR_HAS_XTHREAD_FILES macro that indicates whether or not the
     platform handles files opened in APR_XTHREAD mode natively.  Currently
     only Win32 has such native support.
  
  Revision  Changes    Path
  1.116     +7 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.115
  retrieving revision 1.116
  diff -u -d -u -r1.115 -r1.116
  --- CHANGES	2001/06/22 17:53:49	1.115
  +++ CHANGES	2001/06/27 19:40:29	1.116
  @@ -1,5 +1,12 @@
   Changes with APR b1  
   
  +  *) Add apr_file_flags_get() which returns the flags that were originally
  +     passed in to apr_file_open().  [Cliff Woolley]
  +
  +  *) Added APR_HAS_XTHREAD_FILES macro that indicates whether or not the
  +     platform handles files opened in APR_XTHREAD mode natively.  Currently
  +     only Win32 has such native support.  [Cliff Woolley]
  +
     *) Fix gmt offset handling on Solaris.  Apache log messages now show
        local time again. PR #7902 [Taketo Kabe <ka...@sra-tohoku.co.jp>]
   
  
  
  
  1.49      +5 -0      apr/file_io/unix/fileacc.c
  
  Index: fileacc.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/unix/fileacc.c,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -d -u -r1.48 -r1.49
  --- fileacc.c	2001/02/16 04:15:37	1.48
  +++ fileacc.c	2001/06/27 19:40:33	1.49
  @@ -64,6 +64,11 @@
       return APR_SUCCESS;
   }
   
  +APR_DECLARE(apr_int32_t) apr_file_flags_get(apr_file_t *f)
  +{
  +    return f->flags;
  +}
  +
   #if !defined(OS2) && !defined(WIN32)
   mode_t apr_unix_perms2mode(apr_fileperms_t perms)
   {
  
  
  
  1.30      +1 -0      apr/file_io/unix/filedup.c
  
  Index: filedup.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/unix/filedup.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -d -u -r1.29 -r1.30
  --- filedup.c	2001/02/16 04:15:37	1.29
  +++ filedup.c	2001/06/27 19:40:34	1.30
  @@ -86,6 +86,7 @@
           (*new_file)->buffer = apr_palloc(p, APR_FILE_BUFSIZE);
       }
       (*new_file)->blocking = old_file->blocking; /* this is the way dup() works */
  +    (*new_file)->flags = old_file->flags;
       apr_pool_cleanup_register((*new_file)->cntxt, (void *)(*new_file), apr_unix_file_cleanup,
                           apr_pool_cleanup_null);
       return APR_SUCCESS;
  
  
  
  1.77      +1 -1      apr/file_io/unix/open.c
  
  Index: open.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/unix/open.c,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -d -u -r1.76 -r1.77
  --- open.c	2001/06/07 14:32:15	1.76
  +++ open.c	2001/06/27 19:40:34	1.77
  @@ -90,7 +90,7 @@
   
       (*new) = (apr_file_t *)apr_pcalloc(cont, sizeof(apr_file_t));
       (*new)->cntxt = cont;
  -    (*new)->oflags = oflags;
  +    (*new)->flags = flag;
       (*new)->filedes = -1;
   
       if ((flag & APR_READ) && (flag & APR_WRITE)) {
  
  
  
  1.32      +1 -0      apr/file_io/win32/filedup.c
  
  Index: filedup.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/win32/filedup.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -d -u -r1.31 -r1.32
  --- filedup.c	2001/02/16 04:15:39	1.31
  +++ filedup.c	2001/06/27 19:40:39	1.32
  @@ -103,6 +103,7 @@
               return APR_ENOTIMPL;
       }
   
  +    (*new_file)->flags = old_file->flags;
       (*new_file)->cntxt = old_file->cntxt;
       (*new_file)->fname = apr_pstrdup(old_file->cntxt, old_file->fname);
       (*new_file)->append = old_file->append;
  
  
  
  1.77      +1 -0      apr/file_io/win32/open.c
  
  Index: open.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/win32/open.c,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -d -u -r1.76 -r1.77
  --- open.c	2001/06/07 14:32:21	1.76
  +++ open.c	2001/06/27 19:40:41	1.77
  @@ -259,6 +259,7 @@
       (*new)->cntxt = cont;
       (*new)->filehand = handle;
       (*new)->fname = apr_pstrdup(cont, fname);
  +    (*new)->flags = flag;
   
       if (flag & APR_APPEND) {
           (*new)->append = 1;
  
  
  
  1.86      +1 -0      apr/include/apr.h.in
  
  Index: apr.h.in
  ===================================================================
  RCS file: /home/cvs/apr/include/apr.h.in,v
  retrieving revision 1.85
  retrieving revision 1.86
  diff -u -d -u -r1.85 -r1.86
  --- apr.h.in	2001/06/26 15:07:25	1.85
  +++ apr.h.in	2001/06/27 19:40:44	1.86
  @@ -134,6 +134,7 @@
   #define APR_HAS_UNICODE_FS        0
   #define APR_HAS_USER              1
   #define APR_HAS_LARGE_FILES       0
  +#define APR_HAS_XTHREAD_FILES     0
   
   /* This macro tells APR that it is safe to make a file masquerade as a 
    * socket.  This is necessary, because some platforms support poll'ing
  
  
  
  1.71      +1 -0      apr/include/apr.hw
  
  Index: apr.hw
  ===================================================================
  RCS file: /home/cvs/apr/include/apr.hw,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -d -u -r1.70 -r1.71
  --- apr.hw	2001/06/26 15:07:26	1.70
  +++ apr.hw	2001/06/27 19:40:45	1.71
  @@ -210,6 +210,7 @@
   #define APR_HAS_UNICODE_FS        1
   #define APR_HAS_USER              1
   #define APR_HAS_LARGE_FILES       1
  +#define APR_HAS_XTHREAD_FILES     1
   
   /* Not all platforms have a real INADDR_NONE.  This macro replaces INADDR_NONE
    * on all platforms.
  
  
  
  1.103     +13 -0     apr/include/apr_file_io.h
  
  Index: apr_file_io.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_file_io.h,v
  retrieving revision 1.102
  retrieving revision 1.103
  diff -u -d -u -r1.102 -r1.103
  --- apr_file_io.h	2001/05/31 00:11:12	1.102
  +++ apr_file_io.h	2001/06/27 19:40:46	1.103
  @@ -136,6 +136,11 @@
    *           APR_BUFFERED         buffer the data.  Default is non-buffered
    *           APR_EXCL             return error if APR_CREATE and file exists
    *           APR_DELONCLOSE       delete the file after closing.
  + *           APR_XTHREAD          Platform dependent tag to open the file
  + *                                for use across multiple threads
  + *           APR_SHARELOCK        Platform dependent support for higher
  + *                                level locked read/write access to support
  + *                                writes across process/machines
    * </PRE>
    * @param perm Access permissions for file.
    * @param cont The pool to use.
  @@ -548,6 +553,14 @@
    * @param offset The offset to truncate to.
    */
   APR_DECLARE(apr_status_t) apr_file_trunc(apr_file_t *fp, apr_off_t offset);
  +
  +/**
  + * Retrieve the flags that were passed into apr_file_open()
  + * when the file was opened.
  + * @return apr_int32_t the flags
  + * @deffunc apr_int32_t apr_file_flags_get(apr_file_t *f)
  + */
  +APR_DECLARE(apr_int32_t) apr_file_flags_get(apr_file_t *f);
   
   /**
    * Get the pool used by the file.
  
  
  
  1.35      +1 -1      apr/include/arch/unix/fileio.h
  
  Index: fileio.h
  ===================================================================
  RCS file: /home/cvs/apr/include/arch/unix/fileio.h,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -d -u -r1.34 -r1.35
  --- fileio.h	2001/05/13 10:50:04	1.34
  +++ fileio.h	2001/06/27 19:40:50	1.35
  @@ -122,7 +122,7 @@
       apr_pool_t *cntxt;
       int filedes;
       char *fname;
  -    int oflags;
  +    apr_int32_t flags;
       int eof_hit;
       int pipe;
       apr_interval_time_t timeout;
  
  
  
  1.54      +1 -0      apr/include/arch/win32/fileio.h
  
  Index: fileio.h
  ===================================================================
  RCS file: /home/cvs/apr/include/arch/win32/fileio.h,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -d -u -r1.53 -r1.54
  --- fileio.h	2001/06/06 16:05:16	1.53
  +++ fileio.h	2001/06/27 19:40:53	1.54
  @@ -172,6 +172,7 @@
       BOOLEAN pipe;              // Is this a pipe of a file?
       OVERLAPPED *pOverlapped;
       apr_interval_time_t timeout;
  +    apr_int32_t flags;
   
       /* File specific info */
       apr_finfo_t *finfo;