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_file_io.h
Date Mon, 12 Apr 1999 17:50:44 GMT
rbb         99/04/12 10:50:44

  Modified:    include  apr_file_io.h
  Log:
  Removed all of the platform dependant definitions from the include file.
  These are now in the platform's direcotry, along with the code.  Hopefully,
  that will make it easier for other platforms to port this stuff.
  
  Revision  Changes    Path
  1.15      +24 -33    apache-apr/include/apr_file_io.h
  
  Index: apr_file_io.h
  ===================================================================
  RCS file: /home/cvs/apache-apr/include/apr_file_io.h,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- apr_file_io.h	1999/04/09 18:13:07	1.14
  +++ apr_file_io.h	1999/04/12 17:50:43	1.15
  @@ -62,9 +62,11 @@
   #include <time.h>
   #include <dirent.h>
   #include <sys/uio.h>
  +#include "fileio.h"
   #include "apr_general.h"
   #include "apr_errno.h"
   
  +
   /* Flags for apr_open */
   #define APR_READ     1           /* Open the file for reading */
   #define APR_WRITE    2           /* Open the file for writing */
  @@ -82,42 +84,26 @@
   #define APR_END SEEK_END
   
   /* Permissions flags */
  -#define APR_UREAD     S_IRUSR
  -#define APR_UWRITE    S_IWUSR
  -#define APR_UEXECUTE  S_IXUSR
  -
  -#define APR_GREAD     S_IRGRP
  -#define APR_GWRITE    S_IWGRP
  -#define APR_GEXECUTE  S_IXGRP
  -
  -#define APR_WREAD     S_IROTH
  -#define APR_WWRITE    S_IWOTH
  -#define APR_WEXECUTE  S_IXOTH
  +#define APR_UREAD     UREAD 
  +#define APR_UWRITE    UWRITE
  +#define APR_UEXECUTE  UEXECUTE
  +
  +#define APR_GREAD     GREAD
  +#define APR_GWRITE    GWRITE 
  +#define APR_GEXECUTE  GEXECUTE
  +
  +#define APR_WREAD     WREAD   
  +#define APR_WWRITE    WWRITE  
  +#define APR_WEXECUTE  WEXECUTE
   
   /* should be same as whence type in lseek, POSIZ defines this as int */
  -typedef int apr_seek_where_t;
  +typedef apr_int32_t       apr_seek_where_t;
   
  -typedef struct apr_file_t {
  -    int filedes;
  -    char * fname;
  -    int buffered;
  -    mode_t protection;
  -    uid_t user;
  -    gid_t group;
  -    off_t size;
  -    time_t atime;    
  -    time_t mtime;
  -    time_t ctime;
  -} apr_file_t;
  -
  -typedef struct apr_dir_t {
  -    char *dirname;
  -    DIR *dirstruct;
  -} apr_dir_t;
  -
  -typedef mode_t            apr_fileperms_t;
  -typedef struct dirent     apr_dirent_t;
  -typedef struct iovec      apr_iovec_t;
  +typedef struct file_t     apr_file_t;
  +typedef struct dir_t      apr_dir_t;
  +typedef fileperms_t       apr_fileperms_t;
  +typedef dirent_t          apr_dirent_t;
  +typedef iovec_t           apr_iovec_t;
   
   /*   Function definitions */
   apr_file_t *apr_open(char *, apr_int32_t, apr_fileperms_t);
  @@ -139,6 +125,11 @@
   apr_status_t apr_rewinddir(apr_dir_t *);
   apr_status_t apr_make_dir(const char *, apr_fileperms_t);
   apr_status_t apr_remove_dir(const char *);
  +
  +/*accessor and general file_io functions. */
  +apr_status_t apr_valid_file(apr_file_t *);
  +char *apr_get_filename(apr_file_t *);
  +
   
   #endif  /* ! APR_FILE_IO_H */
   
  
  
  

Mime
View raw message