httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@hyperreal.org
Subject cvs commit: apache-2.0/src/lib/apr/file_io/win32 fileacc.c open.c
Date Wed, 22 Sep 1999 17:53:19 GMT
stoddard    99/09/22 10:53:18

  Modified:    src/lib/apr/file_io/win32 fileacc.c open.c
  Log:
  Get file_io compiling on Win32. Fix some indenting
  
  Revision  Changes    Path
  1.2       +5 -4      apache-2.0/src/lib/apr/file_io/win32/fileacc.c
  
  Index: fileacc.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/win32/fileacc.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- fileacc.c	1999/08/17 15:59:36	1.1
  +++ fileacc.c	1999/09/22 17:53:17	1.2
  @@ -163,10 +163,10 @@
       }
   }
   
  -ap_status_t ap_get_filedata(struct file_t *file, void *data)
  +ap_status_t ap_get_filedata(struct file_t *file, char *key, void *data)
   {    
       if (file != NULL) {
  -        return ap_get_userdata(file->cntxt, &data);
  +        return ap_get_userdata(file->cntxt, key, &data);
       }
       else {
           data = NULL;
  @@ -174,10 +174,11 @@
       }
   }
                      
  -ap_status_t ap_set_filedata(struct file_t *file, void *data)
  +ap_status_t ap_set_filedata(struct file_t *file, void *data, char *key,
  +                            ap_status_t (*cleanup) (void *))
   {    
       if (file != NULL) {
  -        return ap_set_userdata(file->cntxt, data);
  +        return ap_set_userdata(file->cntxt, data, key, cleanup);
       }
       else {
           data = NULL;
  
  
  
  1.2       +12 -12    apache-2.0/src/lib/apr/file_io/win32/open.c
  
  Index: open.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/win32/open.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- open.c	1999/08/17 15:59:37	1.1
  +++ open.c	1999/09/22 17:53:18	1.2
  @@ -77,17 +77,17 @@
       }
   }
   
  -ap_status_t ap_open(ap_context_t *cont, char *fname, ap_int32_t flag, ap_fileperms_t perm,
  +ap_status_t ap_open(ap_context_t *cont, const char *fname, ap_int32_t flag, ap_fileperms_t
perm,
   					struct file_t **dafile)
   {
       DWORD oflags = 0;
  -	DWORD createflags = 0;
  +    DWORD createflags = 0;
       DWORD theerror;
       /*mode_t mode = get_fileperms(perm);*/
   
       (*dafile) = (struct file_t *)ap_palloc(cont, sizeof(struct file_t));
   
  -	(*dafile)->cntxt = cont;
  +    (*dafile)->cntxt = cont;
   
       if (flag & APR_READ) {
           oflags |= GENERIC_READ;
  @@ -105,14 +105,14 @@
       }
       (*dafile)->fname = strdup(fname);
   
  -	(*dafile)->demonfname = canonical_filename((*dafile)->cntxt, fname);
  -	(*dafile)->lowerdemonfname = strlwr((*dafile)->demonfname);
  +    (*dafile)->demonfname = canonical_filename((*dafile)->cntxt, fname);
  +    (*dafile)->lowerdemonfname = strlwr((*dafile)->demonfname);
       
       createflags = OPEN_ALWAYS;     
       if (flag & APR_CREATE) {
           if (flag & APR_EXCL) {
  -			createflags = CREATE_NEW;
  -		}
  +            createflags = CREATE_NEW;
  +        }
       }
       if ((flag & APR_EXCL) && !(flag & APR_CREATE)) {
           (*dafile)->filehand = INVALID_HANDLE_VALUE;
  @@ -122,16 +122,16 @@
       if (flag & APR_APPEND) {
           (*dafile)->append = 1;
       }
  -	else {
  -		(*dafile)->append = 0;
  -	}
  +    else {
  +        (*dafile)->append = 0;
  +    }
   
       if (flag & APR_TRUNCATE) {
           createflags = TRUNCATE_EXISTING;
       }
    
       (*dafile)->filehand = CreateFile(fname, oflags, FILE_SHARE_READ | FILE_SHARE_WRITE
| FILE_SHARE_DELETE,
  -						   NULL, createflags, FILE_ATTRIBUTE_NORMAL, 0);
  +                                     NULL, createflags, FILE_ATTRIBUTE_NORMAL, 0);
   
       if ((*dafile)->filehand == INVALID_HANDLE_VALUE) {
           theerror = GetLastError();
  @@ -143,7 +143,7 @@
   
   ap_status_t ap_close(struct file_t *file)
   {
  -	ap_status_t stat;
  +    ap_status_t stat;
       if ((stat = file_cleanup(file)) == APR_SUCCESS) {
           ap_kill_cleanup(file->cntxt, file, file_cleanup);
           return APR_SUCCESS;
  
  
  

Mime
View raw message