delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/04/28/10:51:26

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Date: Wed, 28 Apr 1999 10:48:48 -0400
From: Chris Faylor <cgf AT cygnus DOT com>
To: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Cc: Eugene Kanter <eugene AT bgs DOT com>,
cygwin users <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: putenv does not put env into win32?
Message-ID: <19990428104848.C695@cygnus.com>
References: <19990428130449 DOT 359 DOT rocketmail AT web109 DOT yahoomail DOT com>
Mime-Version: 1.0
X-Mailer: Mutt 0.95.3i
In-Reply-To: <19990428130449.359.rocketmail@web109.yahoomail.com>; from Earnie Boyd on Wed, Apr 28, 1999 at 06:04:49AM -0700

I have no opinion on the subject of dlopen vs.  LoadLibrary.  AFAIK,
LoadLibrary works as well as dlopen.

As far as getenv/putenv, the only reason I can see to use the Windows
version is if you are not using a cygwin procedure (exec, spawn) to
start a subprocess.  These functions propagate environment variables
to the subprocess.

cgf

On Wed, Apr 28, 1999 at 06:04:49AM -0700, Earnie Boyd wrote:
>I've searched and searched but can't find the reference I had in mind.  Chris,
>I've added you to this discussion because I thought I had remembered you
>stating advantages of using dlopen over LoadLibrary.  Can you expound your
>knowledge on this subject please.
>
>PS: Thanks Mumit for your input.
>
>> which document says use dlopen?
>>> 
>>> --- Eugene Kanter <eugene AT bgs DOT com> wrote:
>>>> Earnie Boyd wrote:
>>>>>
>>>>> --- Eugene Kanter <eugene AT bgs DOT com> wrote:
>>>>> > Any ideas of how to call Win32 versions of getenv/_putenv instead of
>>>>> > cygwin ones?
>>>>>
>>>>> Use the mingw32 package.  For more info read the docs and search the
>>>> archives.
>>>>
>>>> I can not use mingw32 package because the rest of the application (RPM)
>>>> requires cygwin. I just scanned archives and FAQ and have not noticed
>>>> any mentions of putenv limitations.
>>>>
>>> 
>>> Ok.  But I don't think you can do what you want to anyway.  The putenv
>> function
>>> only modifies the environment of the current process not the parent.  Also,
>>> you're using LoadLibrary which in the documentation is said not to be used;
>> but
>>> to use dlopen, etc. instead.  I'm not experienced enough at this to help
>> beyond
>>> these pointers.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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