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

1999-06-03 Thread rbb
rbb 99/06/03 12:44:04

  Modified:apr/include apr_win.h
   apr/lib  lib.def
   apr/test testfile.c
   include  apr_errno.h apr_file_io.h apr_general.h
  Added:   apr/file_io/win32 dir.c file_io.def file_io.dsp fileacc.c
filedup.c fileio.h filestat.c open.c pipe.c
readdir.c readdir.h readwrite.c seek.c
   apr/test testfile.dsp
  Log:
  First pass at Windows File_io stuff.  This should be enought to build and run 
the testfile
  program.  I'll check this though, and commit anything else that is needed.
  
  Revision  ChangesPath
  1.1  apache-apr/apr/file_io/win32/dir.c
  
  Index: dir.c
  ===
  /* 
   * Copyright (c) 1999 The Apache Group.  All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. All advertising materials mentioning features or use of this
   *software must display the following acknowledgment:
   *"This product includes software developed by the Apache Group
   *for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * 4. The names "Apache Server" and "Apache Group" must not be used to
   *endorse or promote products derived from this software without
   *prior written permission. For written permission, please contact
   *[EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * 6. Redistributions of any form whatsoever must retain the following
   *acknowledgment:
   *"This product includes software developed by the Apache Group
   *for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
   * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE APACHE GROUP OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
   * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
   * OF THE POSSIBILITY OF SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Group.
   * For more information on the Apache Group and the Apache HTTP server
   * project, please see .
   *
   */
  #ifdef HAVE_ERRNO_H
  #include 
  #endif
  #ifdef HAVE_STRING_H
  #include 
  #endif
  #ifdef HAVE_DIRENT_H
  #include 
  #endif
  #ifdef HAVE_SYS_STAT_H
  #include 
  #endif
  #ifdef WIN32
  #include "apr_win.h"
  #include 
  #endif
  #include "fileio.h"
  #include "apr_file_io.h"
  #include "apr_lib.h"
  
  ap_status_t dir_cleanup(void *thedir)
  {
  struct dir_t *dir = thedir;
  if (CloseHandle(dir->dirhand) == 0) {
  return APR_SUCCESS;
  }
  else {
  return errno;
  }
  } 
  
  ap_status_t ap_opendir(ap_context_t *cont, const char *dirname, struct dir_t 
**new)
  {
char * temp;
(*new) = ap_palloc(cont, sizeof(struct dir_t));
  (*new)->cntxt = cont;
(*new)->entry = NULL;
  temp = canonical_filename((*new)->cntxt, dirname);
  if (temp[strlen(temp)] == '/') {
(*new)->dirname = ap_pstrcat(cont, dirname, "*", NULL);
}
else {
  (*new)->dirname = ap_pstrcat(cont, dirname, "/*", NULL);
}
(*new)->dirhand = INVALID_HANDLE_VALUE;
ap_register_cleanup((*new)->cntxt, (void *)(*new), dir_cleanup, NULL);
  return APR_SUCCESS;
  }
  
  ap_status_t ap_closedir(struct dir_t *thedir)
  {
if (FindClose(thedir->dirhand)) {
ap_kill_cleanup(thedir->cntxt, thedir, dir_cleanup);
return APR_SUCCESS;
}
return APR_EEXIST;
  }
  
  ap

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

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_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

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

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 */