delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/12/28/05:48:14

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Mon, 28 Dec 2009 11:47:55 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: C / C# combination question
Message-ID: <20091228104755.GC14544@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <0MhkDT-1NbSlY0u5z-00MvhY AT mx DOT kundenserver DOT de>
MIME-Version: 1.0
In-Reply-To: <0MhkDT-1NbSlY0u5z-00MvhY@mx.kundenserver.de>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

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

- Raw text -


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