mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-11-27 06:09:57 +08:00
* libltdl/ltdl.h (__WINDOWS__): Define this if _WIN32 or WIN32 are
defined, unless __CYGWIN__ or __CYGWIN32__ are defined. (LT_SCOPE): Now set without reference to __CYGWIN__ definition, since __WINDOWS__ now implies !__CYGWIN__ after canonicalisation. (LT_PARAMS, lt_ptr): Use canonicalised __WINDOWS__ to determine which values to set these macros to.
This commit is contained in:
parent
54d8a61dcd
commit
84ba5fad62
11
ChangeLog
11
ChangeLog
@ -1,3 +1,12 @@
|
||||
2003-11-06 Gary V. Vaughan <gary@gnu.org>
|
||||
|
||||
* libltdl/ltdl.h (__WINDOWS__): Define this if _WIN32 or WIN32 are
|
||||
defined, unless __CYGWIN__ or __CYGWIN32__ are defined.
|
||||
(LT_SCOPE): Now set without reference to __CYGWIN__ definition,
|
||||
since __WINDOWS__ now implies !__CYGWIN__ after canonicalisation.
|
||||
(LT_PARAMS, lt_ptr): Use canonicalised __WINDOWS__ to determine
|
||||
which values to set these macros to.
|
||||
|
||||
2003-11-05 Gary V. Vaughan <gary@gnu.org>
|
||||
|
||||
* README-alpha: Mention autotools-announce@gnu.org, and update release
|
||||
@ -15,7 +24,7 @@
|
||||
|
||||
2003-10-30 Peter O'Gorman <peter@pogma.com>
|
||||
|
||||
* m4/libtool.m4 (Darwin): Fix stupidities for darwin tags support.
|
||||
* m4/libtool.m4 (Darwin): Fix stupidities for darwin tags support.
|
||||
Makes it work again if AC_LIBTOOL_TAGS is specified in configure.ac.
|
||||
Bug reported by Joe Orton and Christian Schaffner.
|
||||
|
||||
|
110
libltdl/ltdl.h
110
libltdl/ltdl.h
@ -51,10 +51,61 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
LT_BEGIN_C_DECLS
|
||||
|
||||
|
||||
/* Canonicalise Windows and Cygwin recognition macros.
|
||||
To match the values set by recent Cygwin compilers, make sure that if
|
||||
__CYGWIN__ is defined (after canonicalisation), __WINDOWS__ is NOT! */
|
||||
#if defined(__CYGWIN32__) && !defined(__CYGWIN__)
|
||||
# define __CYGWIN__ __CYGWIN32__
|
||||
#endif
|
||||
#if defined(__CYGWIN__)
|
||||
# if defined(__WINDOWS__)
|
||||
# undef __WINDOWS__
|
||||
# endif
|
||||
#elif defined(_WIN32)
|
||||
# define __WINDOWS__ _WIN32
|
||||
#elif defined(WIN32)
|
||||
# define __WINDOWS__ WIN32
|
||||
#endif
|
||||
#if defined(__CYGWIN__) && defined(__WINDOWS__)
|
||||
# undef __WINDOWS__
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
/* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory
|
||||
separator when it is set. */
|
||||
# define LT_DIRSEP_CHAR '\\'
|
||||
# define LT_PATHSEP_CHAR ';'
|
||||
#else
|
||||
# define LT_PATHSEP_CHAR ':'
|
||||
#endif
|
||||
|
||||
/* DLL building support on win32 hosts; mostly to workaround their
|
||||
ridiculous implementation of data symbol exporting. */
|
||||
#ifndef LT_SCOPE
|
||||
# ifdef __WINDOWS__
|
||||
# ifdef DLL_EXPORT /* defined by libtool (if required) */
|
||||
# define LT_SCOPE __declspec(dllexport)
|
||||
# endif
|
||||
# ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */
|
||||
# define LT_SCOPE extern __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
# ifndef LT_SCOPE /* static linking or !__WINDOWS__ */
|
||||
# define LT_SCOPE extern
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(_MSC_VER) /* Visual Studio */
|
||||
# define R_OK 4
|
||||
#endif
|
||||
|
||||
|
||||
/* LT_PARAMS is a macro used to wrap function prototypes, so that compilers
|
||||
that don't understand ANSI C prototypes still work, and ANSI C
|
||||
compilers can issue warnings about type mismatches. */
|
||||
#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus)
|
||||
#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(__WINDOWS__) || defined(__cplusplus)
|
||||
# define LT_PARAMS(protos) protos
|
||||
# define lt_ptr void*
|
||||
#else
|
||||
@ -89,63 +140,6 @@ LT_BEGIN_C_DECLS
|
||||
#define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0)
|
||||
|
||||
|
||||
|
||||
/* --- WINDOWS SUPPORT --- */
|
||||
|
||||
|
||||
/* Canonicalise Windows and Cygwin recognition macros. */
|
||||
#ifdef __CYGWIN32__
|
||||
# ifndef __CYGWIN__
|
||||
# define __CYGWIN__ __CYGWIN32__
|
||||
# endif
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(WIN32)
|
||||
# ifndef __WINDOWS__
|
||||
# ifdef _WIN32
|
||||
# define __WINDOWS__ _WIN32
|
||||
# else
|
||||
# ifdef WIN32
|
||||
# define __WINDOWS__ WIN32
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
# ifndef __CYGWIN__
|
||||
/* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory
|
||||
separator when it is set. */
|
||||
# define LT_DIRSEP_CHAR '\\'
|
||||
# define LT_PATHSEP_CHAR ';'
|
||||
# endif
|
||||
#endif
|
||||
#ifndef LT_PATHSEP_CHAR
|
||||
# define LT_PATHSEP_CHAR ':'
|
||||
#endif
|
||||
|
||||
/* DLL building support on win32 hosts; mostly to workaround their
|
||||
ridiculous implementation of data symbol exporting. */
|
||||
#ifndef LT_SCOPE
|
||||
# ifdef __WINDOWS__
|
||||
# ifdef DLL_EXPORT /* defined by libtool (if required) */
|
||||
# define LT_SCOPE __declspec(dllexport)
|
||||
# endif
|
||||
# ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */
|
||||
# define LT_SCOPE extern __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
# ifndef LT_SCOPE /* static linking or !__WINDOWS__ */
|
||||
# define LT_SCOPE extern
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(_MSC_VER) /* Visual Studio */
|
||||
# define R_OK 4
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* --- DYNAMIC MODULE LOADING API --- */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user