the HP-UX port of rsync made by the HP-UX Porting Centre (http://hpux.connect.org.uk/) seems not to be able to transfer files larger then 2 GB. We tested this on HP 9000 servers with HP-UX 11.0 and 11.11 . We always get following output: receiving file list... 1 file to consider filename.foo write failed on "/dir/filename.foo": File too large rsync error: error in file IO (code 11) at receiver.c(227) rsync: connection unexpectedly closed (113 bytes read so far) rsync error: error in rsync protocol data stream (code 12) at io.c(342) In all cases the filesystem was of type vxfs with largefiles enabled. The rsync server and the rsync client are same version 2.6.2 : # /usr/local/bin/rsync --version rsync version 2.6.2 protocol version 28 Copyright (C) 1996-2004 by Andrew Tridgell and others <http://rsync.samba.org/> Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles, no IPv6, 32-bit system inums, 64-bit internal inums I wasn't able to compile the rsync package by myself. So I can't say whether it's a general problem on HP-UX or only with this compilation by the Porting Centre.
Turns out that HP-UX does not have a proper large-file version of mkstemp(). Your best bet for now is to undefine HAVE_SECURE_MKSTEMP in config.h and recompile. It would be good to add some logic into configure to do this automatically. I wonder if it would be sufficent to check for the functions open64() and mkstemp64() and if the former exists but not the latter, avoid mkstemp()?
Created attachment 589 [details] Add checks for open64 and mkstemp64 to configure If the user's system has open64() but not mkstemp64(), we avoid using mkstemp().
I tested this patch on HPUX 11.0 and it seems to work properly. The config.log shows that it finds open64() but not mkstemp64(), and skips mkstemp(). My only concern would be that some OS doesn't have mkstemp64() but has a working mkstemp(). (AIX, perhaps?) I also tested the patched rsync with the largefiles testsuite script I recently sent to the rsync mailing list-- it passes. -- Steve
I checked the patch into CVS.