Contents of /trunk/qt/patches/qt-3.3.4-add_qexport_visibility.patch
Parent Directory | Revision Log
Revision 153 -
(show annotations)
(download)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 2285 byte(s)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 2285 byte(s)
-import
1 | Index: src/kernel/qgplugin.h |
2 | =================================================================== |
3 | --- src/kernel/qgplugin.h (revision 423270) |
4 | +++ src/kernel/qgplugin.h (working copy) |
5 | @@ -90,35 +90,19 @@ |
6 | return i->iface(); \ |
7 | } |
8 | |
9 | -# ifdef Q_WS_WIN |
10 | -# ifdef Q_CC_BOR |
11 | -# define Q_EXPORT_PLUGIN(PLUGIN) \ |
12 | - Q_PLUGIN_VERIFICATION_DATA \ |
13 | - Q_EXTERN_C __declspec(dllexport) \ |
14 | - const char * __stdcall qt_ucm_query_verification_data() \ |
15 | - { return qt_ucm_verification_data; } \ |
16 | - Q_EXTERN_C __declspec(dllexport) QUnknownInterface* \ |
17 | - __stdcall ucm_instantiate() \ |
18 | - Q_PLUGIN_INSTANTIATE( PLUGIN ) |
19 | -# else |
20 | -# define Q_EXPORT_PLUGIN(PLUGIN) \ |
21 | - Q_PLUGIN_VERIFICATION_DATA \ |
22 | - Q_EXTERN_C __declspec(dllexport) \ |
23 | - const char *qt_ucm_query_verification_data() \ |
24 | - { return qt_ucm_verification_data; } \ |
25 | - Q_EXTERN_C __declspec(dllexport) QUnknownInterface* ucm_instantiate() \ |
26 | - Q_PLUGIN_INSTANTIATE( PLUGIN ) |
27 | -# endif |
28 | -# else |
29 | -# define Q_EXPORT_PLUGIN(PLUGIN) \ |
30 | +#if defined(Q_WS_WIN) && defined(Q_CC_BOR) |
31 | +# define Q_STDCALL __stdcall |
32 | +#else |
33 | +# define Q_STDCALL |
34 | +#endif |
35 | + |
36 | +#define Q_EXPORT_PLUGIN(PLUGIN) \ |
37 | Q_PLUGIN_VERIFICATION_DATA \ |
38 | - Q_EXTERN_C \ |
39 | - const char *qt_ucm_query_verification_data() \ |
40 | + Q_EXTERN_C Q_EXPORT \ |
41 | + const char * Q_STDCALL qt_ucm_query_verification_data() \ |
42 | { return qt_ucm_verification_data; } \ |
43 | - Q_EXTERN_C QUnknownInterface* ucm_instantiate() \ |
44 | + Q_EXTERN_C Q_EXPORT QUnknownInterface* Q_STDCALL ucm_instantiate() \ |
45 | Q_PLUGIN_INSTANTIATE( PLUGIN ) |
46 | -# endif |
47 | - |
48 | #endif |
49 | |
50 | struct QUnknownInterface; |
51 | Index: src/tools/qglobal.h |
52 | =================================================================== |
53 | --- src/tools/qglobal.h (revision 423270) |
54 | +++ src/tools/qglobal.h (working copy) |
55 | @@ -865,6 +865,10 @@ |
56 | # define Q_TEMPLATE_EXTERN |
57 | # undef Q_DISABLE_COPY /* avoid unresolved externals */ |
58 | # endif |
59 | +#elif defined(Q_CC_GNU) && __GNUC__ - 0 >= 4 |
60 | +# define Q_EXPORT __attribute__((visibility("default"))) |
61 | +# undef QT_MAKEDLL /* ignore these for other platforms */ |
62 | +# undef QT_DLL |
63 | #else |
64 | # undef QT_MAKEDLL /* ignore these for other platforms */ |
65 | # undef QT_DLL |