[PATCH] rsync on cygwin - textmode config files

Martin Pool mbp at samba.org
Thu Feb 21 06:17:24 EST 2002


> (1) --no-detach

OK, already fixed.  --no-fork would be good to add in the future -- it
can be handy for debugging.

> (2) ctrl-c

Fixed recently by Colin Walters.

> O_TEXT and O_BINARY

Good.

It might be cleaner to #ifdef on O_BINARY or something that will also
work on MSVC++.

> +#ifdef __CYGWIN__
> +   {
> +       /* CYGWIN has no O_TEXT equivalent for
> +           fopen... */
> +       int fd = open( FileName, O_RDONLY | O_TEXT);
> +       OpenedFile = fdopen( fd, "r" );
> +   }
> +#else 
> +   OpenedFile = fopen( FileName, "r" );
> +#endif

Can't you say "rt" as an fopen mode?  That works on all C platforms
that I know, and avoids the ifdef.

> (3) avoid perm check on password file

This seems good, though again perhaps ideally we would ifdef for "the
windows platform" rather than "cygwin".

Thanks very much,
-- 
Martin 




More information about the rsync mailing list