cvs commit: apache-apr/include apr_errno.h

1999-02-22 Thread rbb
rbb 99/02/22 05:00:51

  Added:   include  apr_errno.h
  Log:
  This file has APR specific errno values.
  
  Revision  ChangesPath
  1.1  apache-apr/include/apr_errno.h
  
  Index: apr_errno.h
  ===
  #define ENOSTAT 4001
  
  
  


cvs commit: apache-apr/include apr_errno.h

1999-02-22 Thread rbb
rbb 99/02/22 08:43:53

  Modified:include  apr_errno.h
  Log:
  Changes to allow for APRStatus types.  The last word from new-httpd was to use
  errno-like return codes.
  
  Revision  ChangesPath
  1.3   +7 -0  apache-apr/include/apr_errno.h
  
  Index: apr_errno.h
  ===
  RCS file: /home/cvs/apache-apr/include/apr_errno.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- apr_errno.h   1999/02/22 15:51:47 1.2
  +++ apr_errno.h   1999/02/22 16:43:52 1.3
  @@ -53,8 +53,15 @@
*
*/
   
  +#include 
  +
   #ifndef APR_ERRNO_H
   #define APR_ERRNO_H
  +
  +/* If this definition of APRStatus changes, then we can remove this, but 
right
  +   now, the decision was to use an errno-like implementation.
  +*/
  +#define APRStatus int
   
   #define ENOSTAT 4001
   
  
  
  


cvs commit: apache-apr/include apr_errno.h apr_file_io.h

1999-02-23 Thread rbb
rbb 99/02/23 07:28:32

  Modified:include  apr_errno.h apr_file_io.h
  Log:
  Include apr_close prototype, and defines needed for it.
  
  Revision  ChangesPath
  1.4   +3 -0  apache-apr/include/apr_errno.h
  
  Index: apr_errno.h
  ===
  RCS file: /home/cvs/apache-apr/include/apr_errno.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- apr_errno.h   1999/02/22 16:43:52 1.3
  +++ apr_errno.h   1999/02/23 15:28:31 1.4
  @@ -63,6 +63,9 @@
   */
   #define APRStatus int
   
  +#define APR_SUCCESS 1
  +#define APR_FAILURE -1 
  +
   #define ENOSTAT 4001
   
   #endif  /* ! APR_ERRNO_H */
  
  
  
  1.3   +1 -1  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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- apr_file_io.h 1999/02/22 16:31:02 1.2
  +++ apr_file_io.h 1999/02/23 15:28:32 1.3
  @@ -90,5 +90,5 @@
   
   /*   Function definitions */
   APRFile *apr_open(char *fname, int flag, mode_t mode);
  -
  +APRStatus apr_close(APRFile file);
   #endif  /* ! APR_FILE_IO_H */
  
  
  


cvs commit: apache-apr/include apr_errno.h apr_file_io.h

1999-05-24 Thread rbb
rbb 99/05/24 10:28:19

  Modified:apr/file_io/unix dir.c fileacc.c filedup.c filestat.c open.c
pipe.c readwrite.c seek.c
   apr/test testfile.c
   include  apr_errno.h apr_file_io.h
  Log:
  All file functions now return a status value, and those status values are
  defined in apr_errno.h in a platform independant way.  The test program for
  file functions has also been updated.
  
  Revision  ChangesPath
  1.10  +43 -35apache-apr/apr/file_io/unix/dir.c
  
  Index: dir.c
  ===
  RCS file: /home/cvs/apache-apr/apr/file_io/unix/dir.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- dir.c 1999/05/24 02:03:59 1.9
  +++ dir.c 1999/05/24 17:28:15 1.10
  @@ -68,11 +68,11 @@
   return APR_SUCCESS;
   }
   else {
  -return APR_FAILURE;
  +return errno;
   }
   } 
   
  -struct dir_t *ap_opendir(ap_context_t *cont, const char *dirname)
  +ap_status_t ap_opendir(ap_context_t *cont, const char *dirname, struct dir_t 
**new)
   {
   struct dir_t *thedir = (struct dir_t *)ap_palloc(cont->pool, 
sizeof(struct dir_t));
   
  @@ -83,28 +83,32 @@
   
   if (thedir->dirstruct == NULL) {
   thedir->dirstruct = NULL;
  -return NULL;
  +*new = thedir;
  +return errno;
   }
   else {
   ap_register_cleanup(thedir->cntxt->pool, (void *)thedir, 
dir_cleanup, NULL);
  -return thedir;
  +*new = thedir;
  +return APR_SUCCESS;
   }
   }
   
   ap_status_t ap_closedir(struct dir_t *thedir)
   {
  -if (dir_cleanup(thedir) == APR_SUCCESS) {
  +ap_status_t rv;
  +
  +if ((rv = dir_cleanup(thedir)) == APR_SUCCESS) {
   ap_kill_cleanup(thedir->cntxt->pool, thedir, dir_cleanup);
   return APR_SUCCESS;
   }
  -return APR_FAILURE;
  +return rv;
   }
   
   ap_status_t ap_readdir(struct dir_t *thedir)
   {
   thedir->entry = readdir(thedir->dirstruct);
   if (thedir->entry == NULL) {
  -return APR_FAILURE;
  +return errno;
   }
   return APR_SUCCESS;
   }
  @@ -122,7 +126,7 @@
   return APR_SUCCESS;
   }
   else {
  -return APR_FAILURE;
  +return errno;
   }
   }
   
  @@ -132,86 +136,90 @@
   return APR_SUCCESS;
   }
   else {
  -return APR_FAILURE;
  +return errno;
   }
   }
   
  -ap_ssize_t ap_dir_entry_size(struct dir_t *thedir)
  +ap_status_t ap_dir_entry_size(struct dir_t *thedir, ap_ssize_t *size)
   {
   struct stat filestat;
   char *fname = NULL;
   
   if (thedir->entry == NULL) {
  -errno = ENOFILE;
  -return -1;
  +*size = -1;
  +return APR_ENOFILE;
   }
   fname = ap_pstrcat(thedir->cntxt->pool, thedir->dirname, "/", 
  thedir->entry->d_name, NULL);
   if (stat(fname, &filestat) == -1) {
  -errno = ENOSTAT;
  -return -1;
  +*size = -1;
  +return APR_ENOSTAT;
   }
   
  -return filestat.st_size;
  +*size = filestat.st_size;
  +return APR_SUCCESS;
   }
   
  -time_t ap_dir_entry_mtime(struct dir_t *thedir)
  +ap_status_t ap_dir_entry_mtime(struct dir_t *thedir, time_t *time)
   {
   struct stat filestat;
   char *fname = NULL;
   
   if (thedir->entry == NULL) {
  -errno = ENOFILE;
  -return -1;
  +*time = -1;
  +return APR_ENOFILE;
   }
   
   fname = ap_pstrcat(thedir->cntxt->pool, thedir->dirname, "/", 
  thedir->entry->d_name, NULL);
   if (stat(fname, &filestat) == -1) {
  -errno = ENOSTAT;
  -return -1;
  +*time = -1;
  +return APR_ENOSTAT;
   }
   
  -return filestat.st_mtime;
  +*time = filestat.st_mtime;
  +return APR_SUCCESS;
   }

  -ap_filetype_e ap_dir_entry_ftype(struct dir_t *thedir)
  +ap_status_t ap_dir_entry_ftype(struct dir_t *thedir, ap_filetype_e *type)
   {
   struct stat filestat;
   char *fname = NULL;
   
   if (thedir->entry == NULL) {
  -errno = ENOFILE;
  -return -1;
  +*type = APR_REG;
  +return APR_ENOFILE;
   }
   
   fname = ap_pstrcat(thedir->cntxt->pool, thedir->dirname, "/", 
  thedir->entry->d_name, NULL);
   if (stat(fname, &filestat) == -1) {
  -errno = ENOSTAT;
  -return -1;
  +*type = APR_REG;
  +return APR_ENOSTAT;
   }
   
   if (S_ISREG(filestat.st_mode))
  -return APR_REG;
  +*type = APR_REG;
   if (S_ISDIR(filestat.st_mode))
  -return APR_DIR;
  +*type = APR_DIR;
   if (S_ISCHR(filestat.st_mode))
  -return APR_CHR;
  +*type = APR_CHR;
   if (S_ISBLK(filestat.st_mode))
 

cvs commit: apache-apr/include apr_errno.h apr_lock.h

1999-05-24 Thread rbb
rbb 99/05/24 11:16:52

  Modified:apr/locks/unix crossproc.c intraproc.c locks.c
   apr/test testthread.c
   include  apr_errno.h apr_lock.h
  Log:
  Locking functions now all return status codes.  Also updated test function
  appropriately.
  
  Revision  ChangesPath
  1.6   +47 -37apache-apr/apr/locks/unix/crossproc.c
  
  Index: crossproc.c
  ===
  RCS file: /home/cvs/apache-apr/apr/locks/unix/crossproc.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- crossproc.c   1999/05/24 02:04:03 1.5
  +++ crossproc.c   1999/05/24 18:16:34 1.6
  @@ -79,12 +79,12 @@
   
   if (new->interproc < 0) {
   lock_cleanup(new);
  -return APR_FAILURE;
  +return errno;
   }
   ick.val = 1;
  -if (senctl(new->interproc, 0, SETVAL, ick) < 0) {
  +if (semctl(new->interproc, 0, SETVAL, ick) < 0) {
   lock_cleanup(new);
  -return APR_FAILURE;
  +return errno;
   }
   /* pre-initialize these */
   new->op_on.sem_num = 0;
  @@ -103,7 +103,7 @@
   {
   new->curr_locked == 1;
   if (semop(lock->interproc, &lock->op_on, 1) < 0) {
  -return(APR_FAILURE);
  +return errno;
   }
   return APR_SUCCESS;
   }
  @@ -111,7 +111,7 @@
   ap_status_t unlock_inter(struct lock_t *lock)
   {
   if (semop(lock->interproc, &lock->op_off, 1) < 0) {
  -return(APR_FAILURE);
  +return errno;
   }
   new->curr_locked == 0;
   return APR_SUCCESS;
  @@ -119,11 +119,13 @@
   
   ap_status_t destroy_inter_lock(struct lock_t *lock)
   {
  -if (lock_cleanup(lock) == APR_SUCCESS) {
  +ap_status_t stat;
  +
  +if ((stat = lock_cleanup(lock)) == APR_SUCCESS) {
   ap_kill_cleanup(lock->cntxt->pool, lock, lock_cleanup);
   return APR_SUCCESS;
   }
  -return APR_FAILURE;
  +return stat;
   }
   #elif defined (USE_PROC_PTHREAD_SERIALIZE)  
   
  @@ -131,10 +133,10 @@
   {
   if (lock->curr_locked == 1) {
   if (pthread_mutex_unlock(lock->interproc)) {
  -return APR_FAILURE;
  +return errno;
   } 
   if (munmap((caddr_t)lock->interproc, sizeof(pthread_mutex_t))){
  -return APR_FAILURE;
  +return errno;
   }
   }
   return APR_SUCCESS;
  @@ -142,39 +144,40 @@
   
   ap_status_t create_inter_lock(struct lock_t *new)
   {
  +ap_status_t stat;
   int fd;
   pthread_mutexattr_t mattr;
   
   fd = open("/dev/zero", O_RDWR);
   if (fd < 0) {
  -return APR_FAILURE;
  +return errno;
   }
   
   new->interproc = (pthread_mutex_t *)mmap((caddr_t) 0, 
 sizeof(pthread_mutex_t), 
 PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 
   if (new->interproc = (void *) (caddr_t) -1) {
  -return APR_FAILURE;
  +return errno;
   }
   close(fd);
  -if ((errno = pthread_mutexattr_init(&mattr))) {
  +if ((stat = pthread_mutexattr_init(&mattr))) {
   lock_cleanup(new);
  -return APR_FAILURE;
  +return stat;
   }
  -if ((errno = pthread_mutexattr_setpshared(&mattr, 
  +if ((stat = pthread_mutexattr_setpshared(&mattr, 
 PTHREAD_PROCESS_SHARED))) {
   lock_cleanup(new);
  -return APR_FAILURE;
  +return stat;
   }
   
  -if ((errno = pthread_mutex_init(new->interproc, &mattr))) {
  +if ((stat = pthread_mutex_init(new->interproc, &mattr))) {
   lock_cleanup(new);
  -return APR_FAILURE;
  +return stat;
   }
   
  -if ((errno = pthread_mutex_destroy(&mattr))) {
  +if ((stat = pthread_mutex_destroy(&mattr))) {
   lock_cleanup(new);
  -return APR_FAILURE;
  +return stat;
   }
   
   new->curr_locked == 0;
  @@ -184,17 +187,20 @@
   
   ap_status_t lock_inter(struct lock_t *lock)
   {
  +ap_status_t stat;
   new->curr_locked == 1;
  -if (errno = pthread_mutex_lock(lock->interproc)) {
  -return(APR_FAILURE);
  +if (stat = pthread_mutex_lock(lock->interproc)) {
  +return stat;
   }
   return APR_SUCCESS;
   }
   
   ap_status_t unlock_inter(struct lock_t *lock)
   {
  -if (errno = pthread_mutex_unlock(lock->interproc)) {
  -return(APR_FAILURE);
  +ap_status_t stat;
  +
  +if (stat = pthread_mutex_unlock(lock->interproc)) {
  +returno stat;
   }
   new->curr_locked == 0;
   return APR_SUCCESS;
  @@ -202,11 +208,12 @@
   
   ap_status_t destroy_inter_lock(struct lock_t *lock)
   {
  -if (lock_cleanup(lock) == APR_SUCCESS) {
  +ap_status_t stat;
  +if ((stat = lock_cleanup(lock)) == APR_SUCCESS) {
   ap_kill_cleanup(lock->cntxt->pool, lock, lock_cleanup);

cvs commit: apache-apr/include apr_errno.h apr_file_io.h

1999-05-25 Thread rbb
rbb 99/05/24 20:14:20

  Modified:apr/file_io/unix dir.c fileacc.c filedup.c open.c pipe.c
readwrite.c
   apr/misc/unix start.c
   apr/test testfile.c testthread.c
   include  apr_errno.h apr_file_io.h
  Log:
  Tracked down a heap corruption finally.
  
  Revision  ChangesPath
  1.11  +10 -14apache-apr/apr/file_io/unix/dir.c
  
  Index: dir.c
  ===
  RCS file: /home/cvs/apache-apr/apr/file_io/unix/dir.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- dir.c 1999/05/24 17:28:15 1.10
  +++ dir.c 1999/05/25 03:14:14 1.11
  @@ -74,21 +74,19 @@
   
   ap_status_t ap_opendir(ap_context_t *cont, const char *dirname, struct dir_t 
**new)
   {
  -struct dir_t *thedir = (struct dir_t *)ap_palloc(cont->pool, 
sizeof(struct dir_t));
  +(*new) = (struct dir_t *)ap_palloc(cont->pool, sizeof(struct dir_t));
   
  -thedir->cntxt = cont;
  -thedir->dirname = strdup(dirname);
  -thedir->dirstruct = opendir(dirname);
  -thedir->entry = NULL;
  -
  -if (thedir->dirstruct == NULL) {
  -thedir->dirstruct = NULL;
  -*new = thedir;
  +(*new)->cntxt = cont;
  +(*new)->dirname = strdup(dirname);
  +(*new)->dirstruct = opendir(dirname);
  +(*new)->entry = NULL;
  +
  +if ((*new)->dirstruct == NULL) {
  +(*new)->dirstruct = NULL;
   return errno;
   }
   else {
  -ap_register_cleanup(thedir->cntxt->pool, (void *)thedir, 
dir_cleanup, NULL);
  -*new = thedir;
  +ap_register_cleanup((*new)->cntxt->pool, (void *)(*new), 
dir_cleanup, NULL);
   return APR_SUCCESS;
   }
   }
  @@ -217,9 +215,7 @@
   
   ap_status_t ap_get_dir_filename(struct dir_t *thedir, char **new)
   {
  -char *name = (char *)ap_palloc(thedir->cntxt->pool, 
strlen(thedir->entry->d_name));
  -name = ap_pstrdup(thedir->cntxt->pool, thedir->entry->d_name);
  -*new = name;
  +(*new) = ap_pstrdup(thedir->cntxt->pool, thedir->entry->d_name);
   return APR_SUCCESS;
   }
   
  
  
  
  1.10  +2 -1  apache-apr/apr/file_io/unix/fileacc.c
  
  Index: fileacc.c
  ===
  RCS file: /home/cvs/apache-apr/apr/file_io/unix/fileacc.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- fileacc.c 1999/05/24 17:28:15 1.9
  +++ fileacc.c 1999/05/25 03:14:14 1.10
  @@ -56,6 +56,7 @@
   #include "fileio.h"
   #include "apr_file_io.h"
   #include "apr_general.h"
  +#include "apr_lib.h"
   #include 
   #include 
   #include 
  @@ -65,7 +66,7 @@
   ap_status_t ap_get_filename(struct file_t *thefile, char **new)
   {
   if (thefile != NULL) {
  -*new = thefile->fname;
  +*new = ap_pstrdup(thefile->cntxt->pool, thefile->fname);
   return APR_SUCCESS;
   }
   else {
  
  
  
  1.13  +17 -17apache-apr/apr/file_io/unix/filedup.c
  
  Index: filedup.c
  ===
  RCS file: /home/cvs/apache-apr/apr/file_io/unix/filedup.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- filedup.c 1999/05/24 17:28:16 1.12
  +++ filedup.c 1999/05/25 03:14:14 1.13
  @@ -56,29 +56,29 @@
   #include "fileio.h"
   #include "apr_file_io.h"
   #include "apr_general.h"
  +#include "apr_lib.h"
   #include 
   
  -ap_status_t ap_dupfile(struct file_t *old_file, struct file_t **new)
  +ap_status_t ap_dupfile(struct file_t *old_file, struct file_t **new_file)
   {
  -struct file_t *new_file = (struct file_t 
*)ap_palloc(old_file->cntxt->pool,
  +(*new_file) = (struct file_t *)ap_palloc(old_file->cntxt->pool,
  sizeof(struct file_t));
   
  -if (new_file == NULL) {
  -*new = NULL;
  +if ((*new_file) == NULL) {
   return APR_ENOMEM;
  -} 
  -old_file->filedes = dup(new_file->filedes); 
  -old_file->fname = strdup(new_file->fname);
  -old_file->buffered = new_file->buffered;
  -old_file->protection = new_file->protection;
  -old_file->user = new_file->user;
  -old_file->group = new_file->group;
  -old_file->size = new_file->size;
  -old_file->atime = new_file->atime;
  -old_file->mtime = new_file->mtime;
  -old_file->ctime = new_file->ctime;
  -ap_register_cleanup(old_file->cntxt->pool, (void *)new_file, 
file_cleanup, NULL);
  -*new = new_file;
  +}
  +(*new_file)->cntxt = old_file->cntxt; 
  +(*new_file)->filedes = dup(old_file->filedes); 
  +(*new_file)->fname = ap_pstrdup(old_file->cntxt->pool, old_file->fname);
  +(*new_file)->buffered = old_file->buffered;
  +(*new_file)->protection = old_file->protection;
  +(*new_file)->user = old_file->user;
  +(*new_file)->group = old_file->g

cvs commit: apache-apr/include apr_errno.h apr_file_io.h apr_general.h

1999-02-23 Thread rbb
rbb 99/02/23 13:23:46

  Modified:include  apr_errno.h apr_file_io.h apr_general.h
  Log:
  The rest of the changes to make apr names conform to the style we have 
selected.
  Also abstracts out the rest of the types for apr_open and apr_close.
  
  Revision  ChangesPath
  1.5   +1 -1  apache-apr/include/apr_errno.h
  
  Index: apr_errno.h
  ===
  RCS file: /home/cvs/apache-apr/include/apr_errno.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- apr_errno.h   1999/02/23 15:28:31 1.4
  +++ apr_errno.h   1999/02/23 21:23:45 1.5
  @@ -61,7 +61,7 @@
   /* If this definition of APRStatus changes, then we can remove this, but 
right
  now, the decision was to use an errno-like implementation.
   */
  -#define APRStatus int
  +typedef int apr_status_t;
   
   #define APR_SUCCESS 1
   #define APR_FAILURE -1 
  
  
  
  1.4   +7 -4  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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- apr_file_io.h 1999/02/23 15:28:32 1.3
  +++ apr_file_io.h 1999/02/23 21:23:45 1.4
  @@ -75,7 +75,7 @@
exists. */
   #define APR_NONBLOCK 256  /* Don't block when reading or writing */
   
  -typedef struct APRFile {
  +typedef struct apr_file_t {
   int filedes;
   char * fname;
   int buffered;
  @@ -86,9 +86,12 @@
   time_t atime;
   time_t mtime;
   time_t ctime;
  -} APRFile;
  +} apr_file_t;
   
  +typedef mode_t apr_fileperms_t;
  +
   /*   Function definitions */
  -APRFile *apr_open(char *fname, int flag, mode_t mode);
  -APRStatus apr_close(APRFile file);
  +apr_file_t *apr_open(char *fname, apr_int32_t flag, apr_fileperms_t mode);
  +apr_status_t apr_close(apr_file_t file);
   #endif  /* ! APR_FILE_IO_H */
  +
  
  
  
  1.3   +2 -0  apache-apr/include/apr_general.h
  
  Index: apr_general.h
  ===
  RCS file: /home/cvs/apache-apr/include/apr_general.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- apr_general.h 1999/02/22 15:51:48 1.2
  +++ apr_general.h 1999/02/23 21:23:45 1.3
  @@ -59,4 +59,6 @@
   #define TRUE 1
   #define FALSE 0
   
  +typedef int apr_int32_t;
  +
   #endif  /* ! APR_GENERAL_H */
  
  
  


cvs commit: apache-apr/include apr_errno.h apr_file_io.h apr_general.h apr_network_io.h apr_thread_proc.h

1999-05-10 Thread rbb
rbb 99/05/10 09:58:19

  Modified:include  apr_errno.h apr_file_io.h apr_general.h
apr_network_io.h apr_thread_proc.h
  Log:
  My cvs extract got messed up, so these changes weren't put in before.  I'm 
going
  to check it again.
  
  Revision  ChangesPath
  1.7   +1 -1  apache-apr/include/apr_errno.h
  
  Index: apr_errno.h
  ===
  RCS file: /home/cvs/apache-apr/include/apr_errno.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- apr_errno.h   1999/04/29 20:20:38 1.6
  +++ apr_errno.h   1999/05/10 16:58:17 1.7
  @@ -61,7 +61,7 @@
   /* If this definition of APRStatus changes, then we can remove this, but 
right
  now, the decision was to use an errno-like implementation.
   */
  -typedef int apr_status_t;
  +typedef int ap_status_t;
   
   #define APR_SUCCESS 1
   #define APR_FAILURE -1 
  
  
  
  1.21  +30 -30apache-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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- apr_file_io.h 1999/04/30 18:38:57 1.20
  +++ apr_file_io.h 1999/05/10 16:58:17 1.21
  @@ -67,7 +67,7 @@
   #include "apr_errno.h"
   
   
  -/* Flags for apr_open */
  +/* Flags for ap_open */
   #define APR_READ 1   /* Open the file for reading */
   #define APR_WRITE2   /* Open the file for writing */
   #define APR_CREATE   4   /* Create the file if not there */
  @@ -78,7 +78,7 @@
   #define APR_EXCL 128 /* Open should fail if APR_CREATE and file
exists. */
   
  -/* flags for apr_seek */
  +/* flags for ap_seek */
   #define APR_SET SEEK_SET
   #define APR_CUR SEEK_CUR
   #define APR_END SEEK_END
  @@ -97,40 +97,40 @@
   #define APR_WEXECUTE  WEXECUTE
   
   /* should be same as whence type in lseek, POSIZ defines this as int */
  -typedef apr_int32_t   apr_seek_where_t;
  +typedef ap_int32_t   ap_seek_where_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;
  +typedef struct file_t ap_file_t;
  +typedef struct dir_t  ap_dir_t;
  +typedef fileperms_t   ap_fileperms_t;
  +typedef dirent_t  ap_dirent_t;
  +typedef iovec_t   ap_iovec_t;
   
   /*   Function definitions */
  -apr_file_t *apr_open(apr_context_t *, char *, apr_int32_t, apr_fileperms_t);
  -apr_status_t apr_close(apr_context_t *, apr_file_t *);
  -apr_status_t apr_remove_file(apr_context_t *, char *);
  -
  -apr_ssize_t apr_read(apr_context_t *, apr_file_t *, void *, apr_ssize_t);
  -apr_ssize_t apr_write(apr_context_t *, apr_file_t *, void *, apr_ssize_t);
  -apr_ssize_t apr_writev(apr_context_t *, apr_file_t *, const apr_iovec_t *, 
apr_ssize_t);
  -
  -apr_file_t *apr_dupfile(apr_context_t *, apr_file_t *);
  -apr_status_t apr_getfileinfo(apr_context_t *, char *, apr_file_t *);
  -apr_status_t apr_updatefileinfo(apr_context_t *, apr_file_t *);
  -apr_off_t apr_seek(apr_context_t *, apr_file_t *, apr_off_t, 
apr_seek_where_t);
  -
  -apr_dir_t *apr_opendir(apr_context_t *, const char *);
  -apr_status_t apr_closedir(apr_context_t *, apr_dir_t *);
  -apr_dirent_t *apr_readdir(apr_context_t *, apr_dir_t *);
  -apr_status_t apr_rewinddir(apr_context_t *, apr_dir_t *);
  -apr_status_t apr_make_dir(apr_context_t *, const char *, apr_fileperms_t);
  -apr_status_t apr_remove_dir(apr_context_t *, const char *);
  +ap_file_t *ap_open(ap_context_t *, char *, ap_int32_t, ap_fileperms_t);
  +ap_status_t ap_close(ap_context_t *, ap_file_t *);
  +ap_status_t ap_remove_file(ap_context_t *, char *);
  +
  +ap_ssize_t ap_read(ap_context_t *, ap_file_t *, void *, ap_ssize_t);
  +ap_ssize_t ap_write(ap_context_t *, ap_file_t *, void *, ap_ssize_t);
  +ap_ssize_t ap_writev(ap_context_t *, ap_file_t *, const ap_iovec_t *, 
ap_ssize_t);
  +
  +ap_file_t *ap_dupfile(ap_context_t *, ap_file_t *);
  +ap_status_t ap_getfileinfo(ap_context_t *, char *, ap_file_t *);
  +ap_status_t ap_updatefileinfo(ap_context_t *, ap_file_t *);
  +ap_off_t ap_seek(ap_context_t *, ap_file_t *, ap_off_t, ap_seek_where_t);
  +
  +ap_dir_t *ap_opendir(ap_context_t *, const char *);
  +ap_status_t ap_closedir(ap_context_t *, ap_dir_t *);
  +ap_dirent_t *ap_readdir(ap_context_t *, ap_dir_t *);
  +ap_status_t ap_rewinddir(ap_context_t *, ap_dir_t *);
  +ap_status_t ap_make_dir(ap_context_t *, const char *, ap_fileperms_t);
  +ap_status_t ap_remove_dir(ap_context_t *, const char *);
   
  -apr_status_t apr_create_pipe(apr_context_t *, apr_file_t *, apr_file_t *);
  -char *apr_create_namedpipe(apr_context_t *, char *, apr_fileperms_t);
  +ap_status_t ap_c