]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* NEWS: updated.
authorGary V. Vaughan <gary@gnu.org>
Mon, 13 Dec 1999 16:34:18 +0000 (16:34 +0000)
committerGary V. Vaughan <gary@gnu.org>
Mon, 13 Dec 1999 16:34:18 +0000 (16:34 +0000)
* libltdl/Makefile.am: Use -no-undefined for dll compliance.
* libltdl/configure.in: Use AC_LIBTOOL_WIN32_DLL for dll
compliance.
* libltdl/ltdl.c: Define and use LTDL_GLOBAL_DATA to correctly
export global data symbols from libtldl.dll.
* libltdl/ltdl.h: Define and use LTDL_SCOPE to declare data
symbols as dllexport, dllimport or plain ornary extern depending
in the context in which it is used.

ChangeLog
NEWS
libltdl/Makefile.am
libltdl/configure.in
libltdl/ltdl.c
libltdl/ltdl.h

index dd3eb127bcff965f3ec68ede0bc17b28992bd590..02ea5674adf5d569ba7a6124116e02c01f243f02 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 1999-12-13  Gary V. Vaughan  <gary@oranda.demon.co.uk>
 
+       * NEWS: updated.
+       * libltdl/Makefile.am: Use -no-undefined for dll compliance.
+       * libltdl/configure.in: Use AC_LIBTOOL_WIN32_DLL for dll
+       compliance.
+       * libltdl/ltdl.c: Define and use LTDL_GLOBAL_DATA to correctly
+       export global data symbols from libtldl.dll.
+       * libltdl/ltdl.h: Define and use LTDL_SCOPE to declare data
+       symbols as dllexport, dllimport or plain ornary extern depending
+       in the context in which it is used.
+
        * doc/libtool.texi (Distributing libltdl): document use of
        ltdl.m4.
        * libltdl/configure.in: Removed header checks, as they are
diff --git a/NEWS b/NEWS
index c43cbed49e76ab32601d2e5bb0a8d589ae48dc32..70057d4dbbde895b15755ee541286c56887b913d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 NEWS - list of user-visible changes between releases of GNU Libtool
 
 New in 1.3d: 1999-??-??; CVS version 1.3c, Libtool team:
+* libltdl can now be built as a dll with win32.
 * m4 macros needed to configure libltdl split out into libltdl/ltdl.m4.
 * Start of support code for cross-compiling to win32.
 * Improved support for mingw32.
@@ -11,8 +12,9 @@ New in 1.3d: 1999-??-??; CVS version 1.3c, Libtool team:
   environments is inherited from --build flag passed to configure.
 * Various bugfixes
 \f
-New in 1.3.4: 1999-??-??, CVS version 1.3.3a, Libtool team:
+New in 1.3.4: 1999-12-08, CVS version 1.3.3a, Libtool team:
 * Support for Compaq Tru64 V5.0.
+* Improved support for Digital Unix V4.*.
 * Improved support for NetBSD, FreeBSD and Unixware.
 * Many fine bugfixes.
 \f
index a1df9fc37b7c0e6eaee362c034cd0382e82ed3f1..dafd5854d5180f44b823ac9abece4179103d6718 100644 (file)
@@ -14,7 +14,7 @@ noinst_LTLIBRARIES = libltdlc.la
 endif
 
 libltdl_la_SOURCES = ltdl.c
-libltdl_la_LDFLAGS = -version-info 1:2:1
+libltdl_la_LDFLAGS = -no-undefined -version-info 1:2:1
 libltdl_la_LIBADD = $(LIBADD_DL)
 
 libltdlc_la_SOURCES = ltdl.c
index d03069427b0568c51f73d11fc3b381f3707f4db5..766a9aa8adbb920511d7cbdce449ed34b4ebf6d3 100644 (file)
@@ -21,6 +21,8 @@ AM_MAINTAINER_MODE
 AC_PROG_CC
 AC_C_CONST
 AC_C_INLINE
+
+AC_LIBTOOL_WIN32_DLL
 AM_PROG_LIBTOOL
 AC_SUBST(LIBTOOL_DEPS)
 
index 4d75e02e51fd902958bb1bab884484a44bfb40f2..ee5fcb3ed48dd6d0f3a94fbb1b7da7862057b893 100644 (file)
@@ -60,6 +60,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 
 #include "ltdl.h"
 
+#ifdef DLL_EXPORT
+#  define LTDL_GLOBAL_DATA     __declspec(dllexport)
+#else
+#  define LTDL_GLOBAL_DATA
+#endif
+
 /* max. filename length */
 #ifndef LTDL_FILENAME_MAX
 #define LTDL_FILENAME_MAX 1024
@@ -100,13 +106,13 @@ static const char shutdown_error[] = "library already shutdown";
 
 #ifndef HAVE_PRELOADED_SYMBOLS
 /* If libtool won't define it, we'd better do */
-const lt_dlsymlist lt_preloaded_symbols[1] = { { 0, 0 } };
+LTDL_GLOBAL_DATA const lt_dlsymlist lt_preloaded_symbols[1] = { { 0, 0 } };
 #endif
 
 static const char *last_error = 0;
 
-lt_ptr_t (*lt_dlmalloc) LTDL_PARAMS((size_t size)) = (lt_ptr_t(*)LTDL_PARAMS((size_t)))malloc;
-void    (*lt_dlfree)  LTDL_PARAMS((lt_ptr_t ptr)) = (void(*)LTDL_PARAMS((lt_ptr_t)))free;
+LTDL_GLOBAL_DATA lt_ptr_t (*lt_dlmalloc) LTDL_PARAMS((size_t size)) = (lt_ptr_t(*)LTDL_PARAMS((size_t)))malloc;
+LTDL_GLOBAL_DATA void   (*lt_dlfree)  LTDL_PARAMS((lt_ptr_t ptr)) = (void(*)LTDL_PARAMS((lt_ptr_t)))free;
 
 typedef struct lt_dltype_t {
        struct lt_dltype_t *next;
index c0e446b87efa5688ed847e685a7a109a97fba026..b67e0b8212dd64501915c5bebf63d6931a022e07 100644 (file)
@@ -54,6 +54,22 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 # define lt_ptr_t      char*
 #endif
 
+/* DLL building support on win32 hosts;  mostly to workaround their
+   ridiculous implementation of data symbol exporting. */
+#ifndef LTDL_SCOPE
+#  ifdef _WIN32
+#    ifdef DLL_EXPORT          /* defined by libtool (if required) */
+#      define LTDL_SCOPE       __declspec(dllexport)
+#    endif
+#    ifdef LIBLTDL_DLL_IMPORT  /* define if linking with this dll */
+#      define LTDL_SCOPE       extern __declspec(dllimport)
+#    endif
+#  endif
+#  ifndef LTDL_SCOPE           /* static linking or !_WIN32 */
+#    define LTDL_SCOPE extern
+#  endif
+#endif
+
 #include <stdlib.h>
 
 #ifdef _LTDL_COMPILE_
@@ -81,11 +97,11 @@ extern int lt_dladdsearchdir LTDL_PARAMS((const char *search_dir));
 extern int lt_dlsetsearchpath LTDL_PARAMS((const char *search_path));
 extern const char *lt_dlgetsearchpath LTDL_PARAMS((void));
 
-extern const lt_dlsymlist lt_preloaded_symbols[];
+LTDL_SCOPE const lt_dlsymlist lt_preloaded_symbols[];
 #define LTDL_SET_PRELOADED_SYMBOLS() lt_dlpreload_default(lt_preloaded_symbols)
 
-extern lt_ptr_t (*lt_dlmalloc)LTDL_PARAMS((size_t size));
-extern void (*lt_dlfree)LTDL_PARAMS((lt_ptr_t ptr));
+LTDL_SCOPE lt_ptr_t (*lt_dlmalloc)LTDL_PARAMS((size_t size));
+LTDL_SCOPE void (*lt_dlfree)LTDL_PARAMS((lt_ptr_t ptr));
 
 __END_DECLS