I have discovered that rsync 2.5.6 uses the mkstemp() routine wich do not have a 64bits version into the AIX libc. A very simple workaround to the big files writing rsync pb. is to not use this routine that create files w/ mkstemp() by modifying the "syscall.c" source file at line 154 as following : #if defined(HAVE_SECURE_MKSTEMP) && defined(HAVE_FCHMOD) become #if defined(HAVE_SECURE_MKSTEMP) && defined(HAVE_FCHMOD) && ! defined(_AIX) Hope this will help poor AIX users ;-) Dean, a nostalgic Digital Unix veteran. Digital/Tru64 Unix don't care big files !
On Tue, Feb 11, 2003 at 03:18:00PM +0100, Dean wrote:> > > > I have discovered that rsync 2.5.6 uses the mkstemp() routine wich do > not have a 64bits version into the AIX libc.mkstemp should have no need of a 64bit version. Why is this an issue?> A very simple workaround to the big files writing rsync pb. is to not > use this routine that create files w/ mkstemp() by modifying the > "syscall.c" source file at line 154 as following : > > #if defined(HAVE_SECURE_MKSTEMP) && defined(HAVE_FCHMOD) > become > #if defined(HAVE_SECURE_MKSTEMP) && defined(HAVE_FCHMOD) && ! > defined(_AIX)If AIX doesn't have a secure mkstemp the logic determining that should be in configure where HAVE_SECURE_MKSTEMP is defined. It should not be grafted on here. Given that the "s" in mkstemp stands for "secure" an insecure mkstemp would be broken :) -- ________________________________________________________________ J.W. Schultz Pegasystems Technologies email address: jw@pegasys.ws Remember Cernan and Schmitt
On Tue, Feb 11, 2003 at 10:41:46 -0800, jw schultz wrote:> > >mkstemp should have no need of a 64bit version. Why is this >an issue?mkstemp() generates a temporary file name and open the corresponding file with a 32bits system call (no 64bits version for this function in AIX libc). So I/O operations on the returned 32bits file descriptor will fail after the 2GB limit. By skipping mkstemp() function use, mktemp() + 64bits open() syscall (if _LARGE_FILES defined) will be used, that will allow >2GB files. Linux libc have a 64bits version of mkstemp() : Linux(2.4.19)# nm /lib/libc.so.6 |grep mkstemp 000c65a0 T mkstemp 000c65e0 T mkstemp64 Solaris too: SunOS(2.8)# nm /lib/libc.so |grep mkstemp|grep FUNC [3538] | 274264| 224|FUNC |GLOB |0 |9 |_mkstemp [3294] | 213800| 224|FUNC |GLOB |0 |9 |_mkstemp64 [4662] | 274264| 224|FUNC |WEAK |0 |9 |mkstemp [3668] | 213800| 224|FUNC |WEAK |0 |9 |mkstemp64 and AIX gives : AIX(5.1 ML3)# nm /lib/libc.a|grep mkstemp mkstemp D 254912 12 .mkstemp T 1110564 ../../../../../../../src/bos/usr/ccs/lib/libc/mkstemp.c f - Poor AIX users/programmers !
"Dean" <dean@dacunha.net> wrote:>I have discovered that rsync 2.5.6 uses the mkstemp() routine wich do >not have a 64bits version into the AIX libc. > >A very simple workaround to the big files writing rsync pb. is to not >use this routine that create files w/ mkstemp() by modifying the >"syscall.c" source file at line 154 as following : > >#if defined(HAVE_SECURE_MKSTEMP) && defined(HAVE_FCHMOD) >become >#if defined(HAVE_SECURE_MKSTEMP) && defined(HAVE_FCHMOD) && ! >defined(_AIX)This needs to be turned into a configure test in order to be accepted. (See configure.in). If we start putting in tests for operating systems, we've started down the primrose path... (apologies to non-native English speakers; the rest of the quote is "...to dalliance", i.e., to doing things the Wrong Way). Thanks PG -- Paul Green, Senior Technical Consultant, Stratus Technologies. Voice: +1 978-461-7557; FAX: +1 978-461-3610 Speaking from Stratus not for Stratus
"Dean" <dean@dacunha.net> asks: What is the origin of the expression "the primrose path to dalliance"? William Shakespeare, in "Hamlet". For a nice explanation, see http://www.straightdope.com/mailbag/mprimrose.html Thanks PG -- Paul Green, Senior Technical Consultant, Stratus Technologies. Voice: +1 978-461-7557; FAX: +1 978-461-3610 Speaking from Stratus not for Stratus