delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/10/25/10:49:57

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=Q/eIEW9ZcY4yDOq6UzC5UP1kwL4faN8H5E17PAhQWva18pLQW6qlu
86ejr1BsXUuaLhtJ2zLE2wlIcnRc66AOhRmsqpUy2l5e8UueMNhfwAj7WnReo1yQ
IypW894jbMnN7Odqvuqjp5iBkinvDUKRQiSlTssd/yknqUjoPqpLrw=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=WWV+vIdW9iQxGihisKd6ZxP60JM=; b=FiC8ino7jckMDQ3HI1KSNKcebUy7
a1bRY5Y8ZrthlT5FSL26K6rdEvNAj9kKV5cubjrZpWXc1o/zU+CV1Ow0ryDr/Gbe
eY/6TaZJEviBpp/Y2rT+jpI1TBj0oWGFB4xRigjzJxjbvtPVBdeRM0U44MxiquJS
FGxQnFNSVISFpwY=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Sat, 25 Oct 2014 16:49:34 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: [ANNOUNCEMENT] TEST RELEASE: Cygwin 1.7.33-0.1
Message-ID: <20141025144934.GB30397@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <announce DOT 20141022092323 DOT GH32374 AT calimero DOT vinschen DOT de> <A0FD00D9-6DFB-4E3D-9FDE-44BC1CAAEEDC AT Denis-Excoffier DOT org> <20141024110209 DOT GJ20607 AT calimero DOT vinschen DOT de> <25D5C8B8-57B7-449C-95C6-CD9055816B6B AT Denis-Excoffier DOT org> <20141024193638 DOT GO20607 AT calimero DOT vinschen DOT de> <544AB396 DOT 5060300 AT t-online DOT de> <09092535-826E-4995-94E8-B4AF3E4F5089 AT Denis-Excoffier DOT org> <20141025111016 DOT GA30397 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <20141025111016.GA30397@calimero.vinschen.de>
User-Agent: Mutt/1.5.23 (2014-03-12)

--O5XBE6gyVG5Rl6Rj
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Oct 25 13:10, Corinna Vinschen wrote:
> On Oct 24 23:17, Denis Excoffier wrote:
> > 2014-10-24 22:16, Christian Franke wrote:
> > > Another possible solution:
> > > Check for e.g. CYGWIN_DLLPATH environment variable before calling Set=
DllDirectory().
> > >=20
> > > If unset or empty, call SetDllDirectory("X:\path_to_cygwin\bin");
> > > else if set to ".", do nothing.
> > > else call SetDllDirectory(CYGWIN_DLLPATH);
> > >=20
> > > The above 'make check' should then work again as 'CYGWIN_DLLPATH=3D. =
make check'.
> > I can buy this. Setting 'export CYGWIN_DLLPATH :=3D .' at the beginning=
 of the Makefile will
> > do the job.
> >=20
> > >=20
> > > Possible enhancement: If AddDllDirectory() is available (>=3D Win8), =
accept a real search path in CYGWIN_DLLPATH.
> > Also perhaps you can use yet another subitem in the CYGWIN environment =
variable?
>=20
> If AddDllDirectory works without much hassle, which I have to test first,
> why introduce CYGWIN_DLLPATH or another CYGWIN item?
>=20
> LD_LIBRARY_PATH would be the one we want then, wouldn't it?

One really big problem with AddDllDirectory is this:  While you can add
multiple directories to the search path, the order in which these
directories are added does not specify a search order.  In fact, the
order in which the paths are searched is unspecified per MSDN.

In Denis example that means, if we add /usr/bin and /my/dir/bin to the
DLL search path, Denis case works or it doesn't, and we never know when
it will work and when it won't, and we have no way to influence this.
Oh boy.

Apart from SetDllDirectory and AddDllDirectory, what about this very
simple solution in Cygwin:

- Don't call SetDllDirectory at all, thus "." is kept in the search
  path.

- In execve, when creating the Windows environment for the child process,
  check if $PATH is empty.  If so, set $PATH to /bin for the child.
  Or, check if /bin is in $PATH, if not, add it.

That would catch both problems, backward compatibility with Denis
scenario, as well as the PATH setting in postfix.


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--O5XBE6gyVG5Rl6Rj
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJUS7h+AAoJEPU2Bp2uRE+gdEcP/AoZPHwsgP5L0TI/lGf9dPan
rG4+Z7F7/50M1jAc/cMo2QJnojZSw1YdnRsBXbTFt36DdszZyXC91zX3O/ULeU8y
ujeBhNm/XFd30VeCnAN7rnJW5jQn5ME92GSDJJdPw4kVw8piiFjEgV7B/vjQFDxC
sHJGMzHLj7kSP77d858Qb+SZ4krlGI+SOp6sRyj2k11sXdQ6Uriu2cN4djam4cBM
dJWscHNuXpKt7uz98ltkS+xXH3ou0tJU/hM5hgt2GC8R/IFzwpckrjzy7Mt24TVA
DRytaIvV8L5d/ilgS4GF5pdi9RhQ/goopi7vxF1rXm/SMna0pklhBmNHFxRgOzTt
9nBXqjyXL06E20XylHndrf2//LijM/WNXuRJZ7yaYiAvUGFke/TXGGqjrCJcNeC1
wHqCAJGAcE5mxvwV9EQFkmT3EoDm5/w15wwPR10lDjwqLV8GgFh2btDNo5Tufxa1
7vXYTtIm3tYI1UVX+4LxrRRrvazhExedVOFtZ3eO1d5/wJnLDZaWUggA1Oomy3lz
RIrgFOXpFZ4kSiFMvXadqd5FyJdHCjwCg5WFve0QjFKUG2jumQezCIwb+lohLoLS
WkrmqGFH8owwg3lM23YXlKfFKd2x7Eu/ud4iH3sLCed1hmE1oS8KSXqZYR7EAakl
Xj78F95Wq2m6P8IwGBl1
=R3Ry
-----END PGP SIGNATURE-----

--O5XBE6gyVG5Rl6Rj--

- Raw text -


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