X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Tue, 3 Nov 2009 11:00:46 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Shall dlopen("foo") succeeed if only "foo.dll" exists? Message-ID: <20091103100045.GA18643@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20091102164807 DOT GA2897 AT calimero DOT vinschen DOT de> <4AEF9E10 DOT 6030804 AT byu DOT net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AEF9E10.6030804@byu.net> 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 Nov 2 20:05, Eric Blake wrote: > -----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 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. Maybe Chuck can make this definitive? 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