patches/qt3-0022-q_export-visibility.diff
author jurikm
Sun, 12 Feb 2012 14:04:10 +0000
changeset 8245 383896da4129
parent 782 a013313b88b4
permissions -rw-r--r--
SFEsauerbraten.spec: add IPS package name

--- qt-x11-free-3.3.8/src/kernel/qgplugin.h.orig	2008-01-08 22:54:24.839138316 +0530
+++ qt-x11-free-3.3.8/src/kernel/qgplugin.h	2008-01-08 22:54:28.192810973 +0530
@@ -90,35 +90,19 @@
 	    return i->iface(); \
 	}
 
-#    ifdef Q_WS_WIN
-#	ifdef Q_CC_BOR
-#	    define Q_EXPORT_PLUGIN(PLUGIN) \
-	        Q_PLUGIN_VERIFICATION_DATA \
-		Q_EXTERN_C __declspec(dllexport) \
-                const char * __stdcall qt_ucm_query_verification_data() \
-                { return qt_ucm_verification_data; } \
-		Q_EXTERN_C __declspec(dllexport) QUnknownInterface* \
-                __stdcall ucm_instantiate() \
-		Q_PLUGIN_INSTANTIATE( PLUGIN )
-#	else
-#	    define Q_EXPORT_PLUGIN(PLUGIN) \
-	        Q_PLUGIN_VERIFICATION_DATA \
-		Q_EXTERN_C __declspec(dllexport) \
-                const char *qt_ucm_query_verification_data() \
-                { return qt_ucm_verification_data; } \
-		Q_EXTERN_C __declspec(dllexport) QUnknownInterface* ucm_instantiate() \
-		Q_PLUGIN_INSTANTIATE( PLUGIN )
-#	endif
-#    else
-#	define Q_EXPORT_PLUGIN(PLUGIN) \
+#if defined(Q_WS_WIN) && defined(Q_CC_BOR)
+#   define Q_STDCALL __stdcall
+#else
+#   define Q_STDCALL
+#endif
+
+#define Q_EXPORT_PLUGIN(PLUGIN) \
 	    Q_PLUGIN_VERIFICATION_DATA \
-	    Q_EXTERN_C \
-            const char *qt_ucm_query_verification_data() \
+	    Q_EXTERN_C Q_EXPORT \
+            const char * Q_STDCALL qt_ucm_query_verification_data() \
             { return qt_ucm_verification_data; } \
-	    Q_EXTERN_C QUnknownInterface* ucm_instantiate() \
+	    Q_EXTERN_C Q_EXPORT QUnknownInterface* Q_STDCALL ucm_instantiate() \
             Q_PLUGIN_INSTANTIATE( PLUGIN )
-#    endif
-
 #endif
 
 struct QUnknownInterface;
--- qt-x11-free-3.3.8/src/tools/qglobal.h.orig	2007-02-02 19:31:04.000000000 +0530
+++ qt-x11-free-3.3.8/src/tools/qglobal.h	2008-01-08 22:54:28.193824107 +0530
@@ -882,6 +882,10 @@
 #    define Q_TEMPLATE_EXTERN
 #    undef  Q_DISABLE_COPY 	/* avoid unresolved externals */
 #  endif
+#elif defined(Q_CC_GNU) && __GNUC__ - 0 >= 4
+#    define Q_EXPORT __attribute__((visibility("default")))
+#    undef QT_MAKEDLL		/* ignore these for other platforms */
+#    undef QT_DLL
 #else
 #  undef QT_MAKEDLL		/* ignore these for other platforms */
 #  undef QT_DLL