Subject: Re: cygwin DLL 1.3.14-1 "cygdrive flags" registry entry
From: Christopher Faylor <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Fri, 22 Nov 2002 17:59:06 -0500

On Fri, Nov 22, 2002 at 04:51:11PM -0600, Holmes, Randy wrote:
>I am trying to prepare a series of cygwin dependant applications for
>distribution.  The available documentation says all that is required is
>to distribute the cygwin1.dll with the apps.  However when I tried this
>I had corrupted data returned from a read call.
>
>After much experimenting I determined that when cygwin is installed
>there are some registry settings that effect the behavior of the
>library.  I determined that the following registry entry will make my
>problem 'go away'
>
>============================================================
> Windows Registry Editor Version 5.00
>
> [HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions]
>
> [HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin]
>
> [HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2]
> "cygdrive flags"=dword:00000022
>
>============================================================
>
>Can anybody point me to some documentation which explains the "cygdrive
>flags" entry: What flags are available?  What effect they have on
>application behavior?  Can they be set programmatically?  etc...

We do not advertise the contents of the registry.  You shouldn't even
be worrying about them.  They are subject to change without notice.

If you are getting corrupted data it is undoubtedly a binmode/textmode
issue.  You need to modify your program to properly open files in the
correct mode, i.e., if you are opening a file which is binary, use:

  FILE *fp = fopen ("foo", "rb");

  or

  int fd = open ("foo", O_RDONLY | O_BINARY);

Btw, I'm sure you know this, but if you are preparing something for
distribution then your distribution will be open source.  That's a
stipulation of the cygwin license.  Either that or you need to
purchase a cygwin license from Red Hat.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/