[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] libtool on cygwin [1/4]: cygwin doesn't use LoadLibrary
From: |
Charles Wilson |
Subject: |
[PATCH] libtool on cygwin [1/4]: cygwin doesn't use LoadLibrary |
Date: |
Wed, 05 Nov 2003 04:53:32 -0500 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 |
See changelog for explanation...
--
Chuck
2003-11-05 Charles Wilson <address@hidden>
* libltdl/ltdl.c: Use textmode to read .la files.
Remove cruft from when libltdl-on-cygwin used
LoadLibrary() interface, since it now uses dlopen().
* libltdl/ltdl.h: Don't use declspec on cygwin;
instead rely on cygwin's auto-import magic for DATA items.
Index: libltdl/ltdl.c
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/ltdl.c,v
retrieving revision 1.181
diff -u -r1.181 ltdl.c
--- libltdl/ltdl.c 7 Oct 2003 22:29:05 -0000 1.181
+++ libltdl/ltdl.c 3 Nov 2003 16:34:32 -0000
@@ -146,7 +146,7 @@
/* fopen() mode flags for reading a text file */
#undef LT_READTEXT_MODE
-#ifdef __WINDOWS__
+#if defined(__WINDOWS__) || defined(__CYGWIN__)
# define LT_READTEXT_MODE "rt"
#else
# define LT_READTEXT_MODE "r"
@@ -1290,7 +1290,7 @@
/* --- LOADLIBRARY() INTERFACE LOADER --- */
-#ifdef __WINDOWS__
+#if defined(__WINDOWS__) && !defined(__CYGWIN__)
/* dynamic linking for Win32 */
@@ -1339,15 +1339,7 @@
if (!searchname)
return 0;
-#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);
/* libltdl expects this function to fail if it is unable
@@ -2208,7 +2200,7 @@
#if HAVE_SHL_LOAD
errors += lt_dlloader_add (lt_dlloader_next (0), &sys_shl, "dlopen");
#endif
-#ifdef __WINDOWS__
+#if defined(__WINDOWS__) && !defined(__CYGWIN__)
errors += lt_dlloader_add (lt_dlloader_next (0), &sys_wll, "dlopen");
#endif
#ifdef __BEOS__
Index: libltdl/ltdl.h
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/ltdl.h,v
retrieving revision 1.58
diff -u -r1.58 ltdl.h
--- libltdl/ltdl.h 1 Aug 2003 18:31:55 -0000 1.58
+++ libltdl/ltdl.h 3 Nov 2003 16:34:34 -0000
@@ -127,7 +127,7 @@
/* DLL building support on win32 hosts; mostly to workaround their
ridiculous implementation of data symbol exporting. */
#ifndef LT_SCOPE
-# ifdef __WINDOWS__
+# if defined(__WINDOWS__) && !defined(__CYGWIN__)
# ifdef DLL_EXPORT /* defined by libtool (if required) */
# define LT_SCOPE __declspec(dllexport)
# endif
- [PATCH] libtool on cygwin [1/4]: cygwin doesn't use LoadLibrary,
Charles Wilson <=