From: Charles Wilson Date: Sun, 28 Jan 2007 13:33:52 +0000 (+0000) Subject: * libltdl/ltdl.c (LT_GLOBAL_DATA) [__CYGWIN__]: Also define on X-Git-Tag: release-1-5-23b~12 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=63fbfac20bdec716e3ed882ce04f7c5b38bab452;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 7523fc62d..c9f7ec0ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-01-28 Charles Wilson + + * 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 * libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS) [ cygwin, mingw ] diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index a13b83dec..fad062ad3 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -137,16 +137,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA /* --- 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" diff --git a/libltdl/ltdl.h b/libltdl/ltdl.h index 8aaf3429a..166d5efea 100644 --- a/libltdl/ltdl.h +++ b/libltdl/ltdl.h @@ -127,11 +127,12 @@ LT_BEGIN_C_DECLS /* 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