www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4AEF9E10.6030804@byu.net> |
Date: | Mon, 02 Nov 2009 20:05:52 -0700 |
From: | Eric Blake <ebb9 AT byu DOT net> |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Shall dlopen("foo") succeeed if only "foo.dll" exists? |
References: | <20091102164807 DOT GA2897 AT calimero DOT vinschen DOT de> |
In-Reply-To: | <20091102164807.GA2897@calimero.vinschen.de> |
X-IsSubscribed: | yes |
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 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Corinna Vinschen on 11/2/2009 9:48 AM: > Weird question, right? > > Here's the problem. > > Assume you have a file "foo.so" on Linux. If you call > > dlopen ("./foo.so", RTLD_LAZY); > > it succeeds, but > > dlopen ("./foo", RTLD_LAZY); > > fails because the dlopen function never adds any suffixes like .so > automatically. And POSIX says "If file contains a <slash> character, the file argument is used as the pathname for the file. Otherwise, file is used in an implementation-defined manner to yield a pathname." So I think we are better off NOT adding an implicit .dll. > While we tend to change the implementation to be more Linux-like, > there could be some tools out there which erroneously depend on the > Windows-like behaviour of Cygwin's dlopen(). My only worry is whether libtool depends on this behavior. But a quick look at the source code (although not a definitive one) shows that libtool is already adding a trailing dot on its own, in order to bypass window's automatic .dll appending. So if anything, I'm guessing that not adding an implicit suffix is actually what libtool would prefer. - -- Don't work too hard, make some time for fun as well! Eric Blake ebb9 AT byu DOT net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrvnhAACgkQ84KuGfSFAYBbVwCfQgwsMJtWPhW+0Ed+gCKFaI0L smQAoKxXOi1fvSBDbGXxERRhToQXuPCS =rgXj -----END PGP SIGNATURE----- -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |