apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr/file_io/unix copy.c
Date Mon, 24 May 2004 10:06:38 GMT
jorton      2004/05/24 03:06:38

  Modified:    .        Tag: APR_0_9_BRANCH CHANGES configure.in
               file_io/unix Tag: APR_0_9_BRANCH copy.c
  Log:
  * configure.in: Check for fstat64.
  
  * file_io/unix/copy.c (apr_file_transfer_contents): Allow copying >2Gb
  files and their permission bits if fstat64() is available; remove
  redundant NULL-initializers.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.426.2.21 +3 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.426.2.20
  retrieving revision 1.426.2.21
  diff -d -u -r1.426.2.20 -r1.426.2.21
  --- CHANGES	21 May 2004 22:10:50 -0000	1.426.2.20
  +++ CHANGES	24 May 2004 10:06:38 -0000	1.426.2.21
  @@ -1,5 +1,8 @@
   Changes with APR 0.9.5
   
  +  *) Remove apr_file_copy()'s 2Gb file size limit on some platforms.
  +     [Joe Orton]
  +
     *) Don't assume getnameinfo() can handle IPv4-mapped IPv6 addresses
        on any platforms.
        [Jeff Trawick, Joe Orton, Colm MacCárthaigh <colm stdlib.net>]
  
  
  
  1.535.2.10 +1 -1      apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr/configure.in,v
  retrieving revision 1.535.2.9
  retrieving revision 1.535.2.10
  diff -d -u -r1.535.2.9 -r1.535.2.10
  --- configure.in	21 May 2004 22:10:50 -0000	1.535.2.9
  +++ configure.in	24 May 2004 10:06:38 -0000	1.535.2.10
  @@ -802,7 +802,7 @@
   
   dnl ----------------------------- Checks for Any required Functions
   dnl Checks for library functions. (N.B. poll is further down)
  -AC_CHECK_FUNCS(alloca calloc strcasecmp stricmp setsid isinf isnan)
  +AC_CHECK_FUNCS(alloca calloc strcasecmp stricmp setsid isinf isnan fstat64)
   AC_CHECK_FUNCS(getenv putenv setenv unsetenv)
   AC_CHECK_FUNCS(setrlimit, [ have_setrlimit="1" ], [ have_setrlimit="0" ]) 
   AC_CHECK_FUNCS(getrlimit, [ have_getrlimit="1" ], [ have_getrlimit="0" ]) 
  
  
  
  No                   revision
  No                   revision
  1.7.2.3   +12 -2     apr/file_io/unix/copy.c
  
  Index: copy.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/unix/copy.c,v
  retrieving revision 1.7.2.2
  retrieving revision 1.7.2.3
  diff -d -u -r1.7.2.2 -r1.7.2.3
  --- copy.c	13 May 2004 20:38:22 -0000	1.7.2.2
  +++ copy.c	24 May 2004 10:06:38 -0000	1.7.2.3
  @@ -22,9 +22,8 @@
                                                  apr_fileperms_t to_perms,
                                                  apr_pool_t *pool)
   {
  -    apr_file_t *s = NULL, *d = NULL;  /* init to null important for APR */
  +    apr_file_t *s, *d;
       apr_status_t status;
  -    apr_finfo_t finfo;
       apr_fileperms_t perms;
   
       /* Open source file. */
  @@ -35,12 +34,23 @@
   
       /* Maybe get its permissions. */
       if (to_perms == APR_FILE_SOURCE_PERMS) {
  +#if defined(HAVE_FSTAT64) && defined(O_LARGEFILE) && SIZEOF_OFF_T == 4
  +        struct stat64 st;
  +
  +        if (fstat64(s->filedes, &st) != 0)
  +            return errno;
  +
  +        perms = apr_unix_mode2perms(st.st_mode);  
  +#else
  +        apr_finfo_t finfo;
  +
           status = apr_file_info_get(&finfo, APR_FINFO_PROT, s);
           if (status != APR_SUCCESS && status != APR_INCOMPLETE) {
               apr_file_close(s);  /* toss any error */
               return status;
           }
           perms = finfo.protection;
  +#endif
       }
       else
           perms = to_perms;
  
  
  

Mime
View raw message