delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/05/02/16:22:12

X-Spam-Check-By: sourceware.org
Message-ID: <4457BF67.220D8F5B@dessent.net>
Date: Tue, 02 May 2006 13:21:59 -0700
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Truncated Environment Variables? - using Cygwin + GetEnvironmentStrings() WIN32 API
References: <44542B34 DOT 9000907 AT arkasoft DOT com> <44543FE2 DOT 5070208 AT arkasoft DOT com> <44544896 DOT 10E80D75 AT dessent DOT net> <44576A04 DOT 3090409 AT arkasoft DOT com>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
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

Kaveh Goudarzi wrote:

>         I downloaded the src for cygwin and compiled my code
> as below (cygwin is where I did the cvs pull).
> 
> gcc -o envs-test.exe env-test.c -I  cygwin/src/winsup/cygwin/include/sys
> 
>         I call cygwin_internal ( CW_SYNC_WINENV )  prior to
> the call to GetEnvironmentStrings ... the strange thing is the
> value that comes back ... looking at the code (cygwin/src/winsup/cygwin/external.cc)
> I expected zero but I get another value (4294967295 ... uninitialized return?)

You need to be careful with the versions here.  You shouldn't try to use
current headers with an old DLL.  In this case CW_SYNC_WINENV was not a
feature in the released vesion 1.5.19, but was added to CVS after its
release.  If you just take a standard Cygwin install and try to compile
a program that calls cygwin_internal (CW_SYNC_WINENV) you should get a
compile error.  This is your signal that you need to use a snapshot --
both headers and DLL.

Brian

--
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