Windows and default --modify-window=0

Dave Dykstra dwd at drdykstra.us
Fri Jan 10 17:00:01 EST 2003


Ok, I agree --modify-window should default to 2 (or 1 if that's all that's
really needed) on cygwin.  However, I don't like os-specific defines.
That _WIN32 we've got there is the only one currently in the code, and
there's no occurrances of __CYGWIN__.   I'd rather have a configure.in
rule for it.  Any suggestions on a good one?  At a minimum there's an
AC_CYGWIN macro but that's not much different than just checking for
__CYGWIN__.  Probably it would be worth calling AC_CYGWIN and then setting
a DEFAULT_MODIFY_WINDOW to 2 in configure if $CYGWIN=yes.  As far as I
know there is no other port of rsync to Windows yet except under Cygwin
so I don't think it is worth putting in extra code to support something
that may never be used.  Or, perhaps we should key off of the $EXEEXT
variable which gets set to '.exe' on Windows; anybody have an opinion on
that?

- Dave

On Thu, Jan 09, 2003 at 02:41:21PM -0800, jw schultz wrote:
> On Thu, Jan 09, 2003 at 11:21:36PM +0100, Lapo Luchini wrote:
> > jw schultz wrote:
> > 
> > >The 2 second timestamp resolution only applies to some
> > >windows filesystems.  I think NTFS has timestamp resolution
> > >in the milliseconds (unlrelated to precision).  It should
> > >only become an issue when the windows filesystem is the
> > >destination.
> > >
> > This message says it is 2 seconds aso on NTFSD actually:
> > http://lists.samba.org/pipermail/rsync/2000-July/002491.html
> 
> I don't use windows myself.  I just recall that one of the
> windows filesystem has timestamps in the milliseconds.
> 
> > >Further examination shows that it is
> > >already hacked in options.c for win32:  
> > >| #ifdef _WIN32
> > >| int modify_window=2;
> > >| #else
> > >| int modify_window=0;
> > >| #endif
> > >perhaps something just needs to be added to the #ifdef.
> > >
> > Ohhh... I'd add CygWin to the #ifdef too, then.
> > Grr, I *never* remember what does cygwin define and what not ^_^
> > 
> > Let me check... this message
> > http://sources.redhat.com/ml/gdb-patches/2001-04/msg00039.html
> > suggests that to include djgpp, mingw and cygwin the full ifdef should be:
> > 
> > #if defined(__GO32__) || defined(_WIN32) || defined (__CYGWIN__)
> > 
> > Should I add that to the current 2.5.5 cygwin port (creating a -3 release) 
> > or 2.5.6 will be short in time?
> 
> Depends on how urgent this is.  Given you have a workaround
> i'd get it in cvs and wait.  Assuming the 2.5.6 really does
> happen soon.
> 
> Please try a modify-window of 1.  Maybe my math is off
> somehow but i don't think it needs to be greater than 1.
> Take a look at the code in util.c.  If you truncate to 2
> second resolution and compare against 1 second resolution
> the difference should never be greater than 1 second.
> It won't make a difference very often but i'd still feel
> better making the window as small as possible.
> 
> -- 
> ________________________________________________________________
> 	J.W. Schultz            Pegasystems Technologies
> 	email address:		jw at pegasys.ws
> 
> 		Remember Cernan and Schmitt
> -- 
> To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



More information about the rsync mailing list