[patch] rsync large file support on AIX and HPUX

Olaf Flebbe o.flebbe at science-computing.de
Fri Aug 13 12:40:13 GMT 2004


Hi,

HPUX and some AIX releases have a bug in their implementation of mkstemp(). They 
do not open the resulting file with O_LARGEFILE. Copying a >2GB file files fails 
therefore.

IRIX, Linux seems to be o.k.

There is an efix for AIX available but seems not to be deployed everywhere.

Cheers
   Olaf

*** rsync-2.6.2/syscall.c.ORG_SC        Fri Aug 13 13:17:27 2004
--- rsync-2.6.2/syscall.c       Fri Aug 13 13:19:29 2004
***************
*** 152,158 ****
         RETURN_ERROR_IF(dry_run, 0);
         RETURN_ERROR_IF(read_only, EROFS);

! #if defined(HAVE_SECURE_MKSTEMP) && defined(HAVE_FCHMOD)
         {
                 int fd = mkstemp(template);
                 if (fd == -1)
--- 152,160 ----
         RETURN_ERROR_IF(dry_run, 0);
         RETURN_ERROR_IF(read_only, EROFS);

!
!       /* AIX and hpux mkstemp is broken for LARGE_FILES */
! #if defined(HAVE_SECURE_MKSTEMP) && defined(HAVE_FCHMOD) && !defined(_AIX) && 
!defined(__hpux)
         {
                 int fd = mkstemp(template);
                 if (fd == -1)

-- 
Dr. Olaf Flebbe                 science + computing ag
Leiter Softwareentwicklung      Hagellocher Weg 71-75
phone +49 7071 9457 254         72070 Tuebingen, Germany
fax   +49 7071 9457 511         www.science-computing.de




More information about the rsync mailing list