summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-03-22 13:48:45 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-03-22 13:48:45 +0100
commitaacea7da465b6667e80d87a6c074e092a8908cf6 (patch)
tree171f99a446e7b00082be8a46d130ce3840bd1323 /cppuhelper
parented0ffbba06f754eea1d37452dbdc684e8a4b72ad (diff)
Make SAL_CALL placement work with both MinGW and MSVC
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/inc/cppuhelper/implementationentry.hxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/cppuhelper/inc/cppuhelper/implementationentry.hxx b/cppuhelper/inc/cppuhelper/implementationentry.hxx
index 655ac2bc0fa8..747ec7f942d3 100644
--- a/cppuhelper/inc/cppuhelper/implementationentry.hxx
+++ b/cppuhelper/inc/cppuhelper/implementationentry.hxx
@@ -31,6 +31,14 @@
#include <cppuhelper/factory.hxx>
#include "cppuhelperdllapi.h"
+// MinGW wants it the one way around while MSVC wants it the other (and
+// everywhere else, SAL_CALL is empty, so doesn't matter):
+#if defined __GNUC__
+#define MY_FN_PTR(name) SAL_CALL (* name)
+#else
+#define MY_FN_PTR(name) (SAL_CALL * name)
+#endif
+
namespace cppu
{
/** One struct instance represents all data necessary for registering one service implementation.
@@ -45,17 +53,17 @@ struct ImplementationEntry
/** Function that returns the implementation-name of the implementation
(same as XServiceInfo.getImplementationName() ).
*/
- rtl::OUString SAL_CALL ( * getImplementationName )();
+ rtl::OUString MY_FN_PTR( getImplementationName )();
/** Function that returns all supported servicenames of the implementation
( same as XServiceInfo.getSupportedServiceNames() ).
*/
- com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL ( * getSupportedServiceNames ) ();
+ com::sun::star::uno::Sequence< rtl::OUString > MY_FN_PTR( getSupportedServiceNames ) ();
/** Function that creates a SingleComponentFactory.
*/
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory > SAL_CALL
- ( * createFactory )(
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory >
+ MY_FN_PTR( createFactory )(
ComponentFactoryFunc fptr,
::rtl::OUString const & rImplementationName,
::com::sun::star::uno::Sequence< ::rtl::OUString > const & rServiceNames,