This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Shall dlopen("foo") succeeed if only "foo.dll" exists?


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.

Now assume you have a "foo.dll" file on Cygwin.

  dlopen ("./foo.dll", RTLD_LAZY);

succeeds, but so does

  dlopen ("./foo", RTLD_LAZY);

The reason is that Cygwin checks for the .dll suffix as well as the
Windows LoadLibrary function does.

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.

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().

Does anybody know such a tool?  If so, is there a chance to fix this
easily in that tool or do we have to keep up this behaviour?  Finally,
is there another *good* reason to stick to the Windows-like behaviour
here?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]