Mail Archives: cygwin/2004/09/24/14:21:39
I have a problem.
I use cygwin1.dll + rsync.exe and a batch file for file synchronization.
Clients have not installed cygwin. First two files, cygwin1.dll +
rsync.exe, they are obtaining by ftp.
Recently I have updated cygwin1.dll to version 1.5.11-1 and rsync to
version 2.6.2-2. And now clients can not receive files, because of
translation CR->CR/LF inside binary files. Environment variable
CYGWIN=binmode now ignored in this situation.
The problem may be solved by entering 'cygdrive flags' valued 0x22 into
registry key '...Cygwin/mounts v2'. But I need solution without registry
changing for the clients.
So, now I have a patch, and I am asking to include it, or to solve this
problem in some another way, enabling use rsync for clients without
installing cygwin.
This is the patch;
--- cygwin-1.5.11-1/winsup/cygwin/path.cc 2004-09-04
23:13:49.000000000 -0400
+++ cygwin-1.5.11-1-patched/winsup/cygwin/path.cc 2004-09-14
18:50:43.114272800 -0400
@@ -75,6 +75,8 @@
#include "cygtls.h"
#include <assert.h>
+#define DEFAULT_CYGDRIVE_FLAGS (MOUNT_CYGDRIVE | MOUNT_BINARY)
+
static int normalize_win32_path (const char *src, char *dst, char ** tail);
static void slashify (const char *src, char *dst, int trailing_slash_p);
static void backslashify (const char *src, char *dst, int
trailing_slash_p);
@@ -1945,15 +1947,15 @@
if (r2.get_string (CYGWIN_INFO_CYGDRIVE_PREFIX, cygdrive,
sizeof (cygdrive), ""))
strcpy (cygdrive, CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX);
- cygdrive_flags = r2.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS,
MOUNT_CYGDRIVE);
+ cygdrive_flags = r2.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS,
DEFAULT_CYGDRIVE_FLAGS);
slashify (cygdrive, cygdrive, 1);
cygdrive_len = strlen (cygdrive);
}
else
{
- /* Fetch user cygdrive_flags from registry; returns MOUNT_CYGDRIVE on
+ /* Fetch user cygdrive_flags from registry; returns
DEFAULT_CYGDRIVE_FLAGS on
error. */
- cygdrive_flags = r.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS,
MOUNT_CYGDRIVE);
+ cygdrive_flags = r.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS,
DEFAULT_CYGDRIVE_FLAGS);
slashify (cygdrive, cygdrive, 1);
cygdrive_len = strlen (cygdrive);
}
@@ -2060,7 +2062,7 @@
/* Get the user flags, if appropriate */
if (res == ERROR_SUCCESS)
{
- int flags = r.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS, MOUNT_CYGDRIVE);
+ int flags = r.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS,
DEFAULT_CYGDRIVE_FLAGS);
strcpy (user_flags, (flags & MOUNT_BINARY) ? "binmode" : "textmode");
}
@@ -2074,7 +2076,7 @@
/* Get the system flags, if appropriate */
if (res2 == ERROR_SUCCESS)
{
- int flags = r2.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS, MOUNT_CYGDRIVE);
+ int flags = r2.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS,
DEFAULT_CYGDRIVE_FLAGS);
strcpy (system_flags, (flags & MOUNT_BINARY) ? "binmode" :
"textmode");
}
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -