simplified WXDLLEXPORT/IMPORT defines, added WXEXPORT/IMPORT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -417,80 +417,49 @@ typedef int wxWindowID;
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
|
// __declspec works in BC++ 5 and later, Watcom C++ 11.0 and later as well
|
||||||
// __declspec works in BC++ 5 and later, Watcom C++ 11.0 and later as well as VC++ and gcc
|
// as VC++ and gcc
|
||||||
#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNUC__) || defined(__WATCOMC__)
|
#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNUC__) || defined(__WATCOMC__)
|
||||||
# ifdef WXMAKINGDLL
|
#define WXEXPORT __declspec(dllexport)
|
||||||
# define WXDLLEXPORT __declspec( dllexport )
|
#define WXIMPORT __declspec(dllimport)
|
||||||
# define WXDLLEXPORT_DATA(type) __declspec( dllexport ) type
|
#else // compiler doesn't support __declspec()
|
||||||
# define WXDLLEXPORT_CTORFN
|
#define WXEXPORT
|
||||||
# elif defined(WXUSINGDLL)
|
#define WXIMPORT
|
||||||
# define WXDLLEXPORT __declspec( dllimport )
|
|
||||||
# define WXDLLEXPORT_DATA(type) __declspec( dllimport ) type
|
|
||||||
# define WXDLLEXPORT_CTORFN
|
|
||||||
# else
|
|
||||||
# define WXDLLEXPORT
|
|
||||||
# define WXDLLEXPORT_DATA(type) type
|
|
||||||
# define WXDLLEXPORT_CTORFN
|
|
||||||
#endif
|
#endif
|
||||||
#else
|
|
||||||
# define WXDLLEXPORT
|
|
||||||
# define WXDLLEXPORT_DATA(type) type
|
|
||||||
# define WXDLLEXPORT_CTORFN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif defined(__WXPM__)
|
#elif defined(__WXPM__)
|
||||||
|
|
||||||
#if defined (__WATCOMC__)
|
#if defined (__WATCOMC__)
|
||||||
|
#define WXEXPORT __declspec(dllexport)
|
||||||
# ifdef WXMAKINGDLL
|
// __declspec(dllimport) prepends __imp to imported symbols. We do NOT
|
||||||
# define WXDLLEXPORT __declspec( dllexport )
|
// want that!
|
||||||
# define WXDLLEXPORT_DATA(type) __declspec( dllexport ) type
|
#define WXIMPORT
|
||||||
# define WXDLLEXPORT_CTORFN
|
#elif (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )))
|
||||||
// __declspec(dllimport) prepends __imp to imported symbols. We do NOT want that!
|
#define WXEXPORT _Export
|
||||||
//# elif defined(WXUSINGDLL)
|
#define WXIMPORT _Export
|
||||||
//# define WXDLLEXPORT __declspec( dllimport )
|
#endif
|
||||||
//# define WXDLLEXPORT_DATA(type) __declspec( dllimport ) type
|
|
||||||
//# define WXDLLEXPORT_CTORFN
|
|
||||||
# else
|
|
||||||
# define WXDLLEXPORT
|
|
||||||
# define WXDLLEXPORT_DATA(type) type
|
|
||||||
# define WXDLLEXPORT_CTORFN
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# elif (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )))
|
// for other platforms/compilers we don't anything
|
||||||
|
#ifndef WXEXPORT
|
||||||
|
#define WXEXPORT
|
||||||
|
#define WXIMPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// WXDLLEXPORT maps to export declaration when building the DLL, to import
|
||||||
|
// declaration if using it or to nothing at all if we don't use wxWin DLL
|
||||||
#ifdef WXMAKINGDLL
|
#ifdef WXMAKINGDLL
|
||||||
# define WXDLLEXPORT _Export
|
#define WXDLLEXPORT WXEXPORT
|
||||||
# define WXDLLEXPORT_DATA(type) _Export type
|
#define WXDLLEXPORT_DATA(type) WXEXPORT type
|
||||||
#define WXDLLEXPORT_CTORFN
|
#define WXDLLEXPORT_CTORFN
|
||||||
#elif defined(WXUSINGDLL)
|
#elif defined(WXUSINGDLL)
|
||||||
# define WXDLLEXPORT _Export
|
#define WXDLLEXPORT WXIMPORT
|
||||||
# define WXDLLEXPORT_DATA(type) _Export type
|
#define WXDLLEXPORT_DATA(type) WXIMPORT type
|
||||||
#define WXDLLEXPORT_CTORFN
|
#define WXDLLEXPORT_CTORFN
|
||||||
# else
|
#else // not making nor using DLL
|
||||||
#define WXDLLEXPORT
|
#define WXDLLEXPORT
|
||||||
#define WXDLLEXPORT_DATA(type) type
|
#define WXDLLEXPORT_DATA(type) type
|
||||||
#define WXDLLEXPORT_CTORFN
|
#define WXDLLEXPORT_CTORFN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# else
|
|
||||||
|
|
||||||
# define WXDLLEXPORT
|
|
||||||
# define WXDLLEXPORT_DATA(type) type
|
|
||||||
# define WXDLLEXPORT_CTORFN
|
|
||||||
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#else // !(MSW or OS2)
|
|
||||||
|
|
||||||
# define WXDLLEXPORT
|
|
||||||
# define WXDLLEXPORT_DATA(type) type
|
|
||||||
# define WXDLLEXPORT_CTORFN
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// For ostream, istream ofstream
|
// For ostream, istream ofstream
|
||||||
#if defined(__BORLANDC__) && defined( _RTLDLL )
|
#if defined(__BORLANDC__) && defined( _RTLDLL )
|
||||||
# define WXDLLIMPORT __import
|
# define WXDLLIMPORT __import
|
||||||
|
Reference in New Issue
Block a user