X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Mon, 28 Dec 2009 11:47:55 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: C / C# combination question
Message-ID: <20091228104755.GC14544@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <0MhkDT-1NbSlY0u5z-00MvhY@mx.kundenserver.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <0MhkDT-1NbSlY0u5z-00MvhY@mx.kundenserver.de>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Dec 26 18:30, Jan Alphenaar wrote:
> Hi again,
> 
> After some more extensive debugging I was able to find out what goes wrong
> with an environment variable if a Cygwin C program is called from a C#
> program.
> 
> If an environment variable is in uppercase (like in my code) the getenv call
> in the C program will not be able to find it.
> 
> On the other hand, if the environment variable is in lower case in both
> programs, the getenv call is able to find it. So, there must be some kind of
> upper to lowercase translation on the way.

There's no uppercase/lowercase conversion going on by default if you run
Cygwin 1.7.  Under 1.5, when you started a Cygwin process from a
non-Cygwin process, the environment was completely uppercased.  Under
1.7 this only occures for a handful of variables (like PATH or
HOMEDRIVE) and the rest of the environment is left alone.  Unless you
have set CYGWIN=upcaseenv, see
http://cygwin.com/cygwin-ug-net/using-cygwinenv.html

There never was and still not is a conversion of the environment to
lowercase anywhere in Cygwin.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

