www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/03/03:22:00

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,SPF_HELO_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4AEFE81D.8010202@towo.net>
Date: Tue, 03 Nov 2009 09:21:49 +0100
From: Thomas Wolff <towo AT towo DOT net>
User-Agent: Thunderbird 2.0.0.23 (X11/20090812)
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> <4AEF305E DOT 1010105 AT cygwin DOT com> <20091102203348 DOT GC6836 AT calimero DOT vinschen DOT de>
In-Reply-To: <20091102203348.GC6836@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

Corinna Vinschen schrieb:
> On Nov  2 14:17, Larry Hall (Cygwin) wrote:
>   
>> On 11/02/2009 11:48 AM, Corinna Vinschen wrote:
>>     
>>> For 1.7 our choice is to keep dlopen() checking for the .dll suffix to
>>> be more Windows-like, or to be more Linux-like by dropping the check for
>>> the .dll suffix so that dlopen() fails if the filename isn't specified
>>> fully.
>>>       
>> OK, I'll admit I'm responding with a question without actually looking at the
>> code and so one can feel free to ignore me.  However the thought that came
>> to my mind is, should it really matter if dlopen() checks?  What does the check
>> give us that just passing the name along to LoadLibrary() doesn't?  At first
>> impression, doing the check just prematurely rejects names without
>> the DLL suffix
>> that would otherwise be accepted by Windows.  Since there's a source
>> level change
>> that (typically) needs to happen to make the code work on Windows as opposed
>> to Linux/Unix, what benefit are we getting from this added check?
>>     
>
> Good question, that's exactly why I'm asking.
>
> Answer:  Nothing but *maybe* a less surprising behaviour in terms of
> POSIX compatibility.  Allowing automatic file extension is not part of
> the standards and not even mentioned as a possible option.  Sure, if
> that's nothing to worry about, we can stick to the current behaviour.
>   
In terms of compatibility and least surprising behavior, what about 
accepting
dlopen ("bla.so") and looking for "bla.dll"? This might help to avoid 
source changes,
and it's kind of like the ".exe magic".
If POSIX requires to give the suffix I'm not sure whether this was wise 
and whether they had
different suffixes in different environments in mind. I wonder how this 
is handled on Mac
with its ".dylib" suffixes.

Thomas

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

- Raw text -


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