Cygwin.
(LT_READTEXT_MODE): Ensure proper textmode fopen is used on
Cygwin.
* libltdl/ltdl.h (LT_SCOPE) [__CYGWIN__]: Also define on Cygwin.
+2007-01-28 Charles Wilson <libtool@cwilson.fastmail.fm>
+
+ * libltdl/ltdl.c (LT_GLOBAL_DATA) [__CYGWIN__]: Also define on
+ Cygwin.
+ (LT_READTEXT_MODE): Ensure proper textmode fopen is used on
+ Cygwin.
+ * libltdl/ltdl.h (LT_SCOPE) [__CYGWIN__]: Also define on Cygwin.
+
2007-01-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS) [ cygwin, mingw ]
\f
/* --- WINDOWS SUPPORT --- */
-
-#ifdef DLL_EXPORT
-# define LT_GLOBAL_DATA __declspec(dllexport)
-#else
-# define LT_GLOBAL_DATA
+/* DLL building support on win32 hosts; mostly to workaround their
+ ridiculous implementation of data symbol exporting. */
+#ifndef LT_GLOBAL_DATA
+# if defined(__WINDOWS__) || defined(__CYGWIN__)
+# ifdef DLL_EXPORT /* defined by libtool (if required) */
+# define LT_GLOBAL_DATA __declspec(dllexport)
+# endif
+# endif
+# ifndef LT_GLOBAL_DATA /* static linking or !__WINDOWS__ */
+# define LT_GLOBAL_DATA
+# endif
#endif
/* 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"
/* 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
# ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */
+ /* note: cygwin/mingw compilers can rely instead on auto-import */
# define LT_SCOPE extern __declspec(dllimport)
# endif
# endif