rsync and utimes handling

Mike Frysinger vapier at
Mon Apr 21 05:34:18 GMT 2008

the rsync code currently does things like:
	<do utimes stuff>
#elif defined HAVE_UTIME
	<do utime stuff>

the problem here is when rsync detects the utimes function.  the older utime 
code is ifdef-ed away so it isnt available at runtime.  that means rsync will 
only be runtime usable on newer systems.  if you take a recent glibc and 
compile it against recent kernel headers, you get a C library that supports 
both utimes and utime, and will run fine regardless of the kernel.  if it 
supports utimes(), glibc will return the expected values.  if it doesnt, 
glibc will return ENOSYS.

what i'm proposing is decoupling of the #if logic so that it isnt an if;else:
	<do utimes stuff and return if successful>
	<do utime stuff and return if successful>
	<return failure>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url :

More information about the rsync mailing list