delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/24/14:21:39

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <415465A5.3010500@parkheights.dyndns.org>
Date: Fri, 24 Sep 2004 14:21:25 -0400
From: sergey ivanov <seriv AT parkheights DOT dyndns DOT org>
User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: text mount if cygwin not installed
X-Virus-Scanned: by amavisd-new at spectr.org
X-IsSubscribed: yes

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019