Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <3FA56584.3010706@cwilson.fastmail.fm>
Date: Sun, 02 Nov 2003 15:13:56 -0500
From: Charles Wilson <cygwin@cwilson.fastmail.fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: libltdl + dlopen/LoadLibrary [Was: Re: gcc 3.3.1-3, loading .la files
 from gcj-compiled apps]
References: <3FA5590F.6060308@santafe.edu> <20031102194409.GB15320@redhat.com>
In-Reply-To: <20031102194409.GB15320@redhat.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Christopher Faylor wrote:

> On Sun, Nov 02, 2003 at 12:20:47PM -0700, Marcus G. Daniels wrote:
> 
>>Would it be possible to add a -D_WIN32 to the libjava/libltdl Makefile 
>>for Cygwin?  Then the LoadLibrary support will get compiled-in, and 
>>dynamic libraries can be loaded into GCJ apps.
> 
> 
> No.  If there is dynamic linking to be done it should work through
> dlopen and pals.  Defining _WIN32 is not the way to accomplish this.
> 

Hmmm...  I've been having problems compiling cvs-m4 which HEAVILY uses 
the libltdl library-loading functionality.  I wonder if it could be 
related to this:

 From ltdl.c:
#if __CYGWIN__
   {
     char wpath[MAX_PATH];
     cygwin_conv_to_full_win32_path(searchname, wpath);
     module = LoadLibrary(wpath);
   }
#else
   module = LoadLibrary (searchname);
#endif
   LT_DLFREE (searchname);

It appears that current libtool does in fact use LoadLibrary and not 
dlopen.  This worked fine in the past (perhaps pre-1.5.0?) but appears 
to not work as well anymore.

Should the module-loading functionality in libtoool for cygwin be 
reworked to use dlopen instead?

--
Chuck



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

