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 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 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 AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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