From 708229dc96533b6f165b82ce4d9e07537d1ce8b1 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 7 May 2012 16:54:43 +0200 Subject: fdo#49580: Fix bean after gbuild'ification 4478b739ddade09425d496cbddee1542fdfd5e9b "convert bean to gbuild and add to tail_build" broke the following: * The name of the officebean dynamic library must not be changed (by adding the "lo" extension), as code in officebean.jar uses it in NativeLibraryLoader. * With gbuild's per-default hidden visibility, JNIEXPORT functions must instead use SAL_DLLPUBLIC_EXPORT. (Windows-only code in bean/native/win32/ should be safe to continue using JNIEXPORT.) Change-Id: I I3c312dd05c90421ba0c726496b7149a26d155604 --- bean/native/unix/com_sun_star_beans_LocalOfficeWindow.c | 10 ++++++---- bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c | 7 +++++-- 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'bean') diff --git a/bean/native/unix/com_sun_star_beans_LocalOfficeWindow.c b/bean/native/unix/com_sun_star_beans_LocalOfficeWindow.c index a45b49efae77..cc35283fbf2d 100644 --- a/bean/native/unix/com_sun_star_beans_LocalOfficeWindow.c +++ b/bean/native/unix/com_sun_star_beans_LocalOfficeWindow.c @@ -26,6 +26,8 @@ * ************************************************************************/ +#include "sal/config.h" + #include #include #include @@ -40,7 +42,7 @@ #include "jawt_md.h" #include "jawt.h" -/*#include "../inc/com_sun_star_comp_beans_LocalOfficeWindow.h"*/ +#include "sal/types.h" #if defined assert #undef assert @@ -55,7 +57,7 @@ #define SYSTEM_MAC 5 #define SYSTEM_XWINDOW 6 -JNIEXPORT jlong JNICALL Java_com_sun_star_comp_beans_LocalOfficeWindow_getNativeWindow +SAL_DLLPUBLIC_EXPORT jlong JNICALL Java_com_sun_star_comp_beans_LocalOfficeWindow_getNativeWindow (JNIEnv * env, jobject obj_this); /*****************************************************************************/ @@ -64,7 +66,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_star_comp_beans_LocalOfficeWindow_getNative * Method: getNativeWindowSystemType * Signature: ()I */ -JNIEXPORT jint JNICALL Java_com_sun_star_beans_LocalOfficeWindow_getNativeWindowSystemType +SAL_DLLPUBLIC_EXPORT jint JNICALL Java_com_sun_star_beans_LocalOfficeWindow_getNativeWindowSystemType (JNIEnv * env, jobject obj_this) { (void) env; /* avoid warning about unused parameter */ @@ -79,7 +81,7 @@ JNIEXPORT jint JNICALL Java_com_sun_star_beans_LocalOfficeWindow_getNativeWindow * Method: getNativeWindow * Signature: ()J */ -JNIEXPORT jlong JNICALL Java_com_sun_star_beans_LocalOfficeWindow_getNativeWindow +SAL_DLLPUBLIC_EXPORT jlong JNICALL Java_com_sun_star_beans_LocalOfficeWindow_getNativeWindow (JNIEnv * env, jobject obj_this) { (void) env; /* avoid warning about unused parameter */ diff --git a/bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c b/bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c index 5b3611057016..8510dc368245 100644 --- a/bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c +++ b/bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c @@ -26,6 +26,8 @@ * ************************************************************************/ +#include "sal/config.h" + #include #include #include @@ -40,6 +42,7 @@ #include "jawt_md.h" #include "jawt.h" +#include "sal/types.h" #define SYSTEM_WIN32 1 #define SYSTEM_WIN16 2 @@ -71,7 +74,7 @@ static void ThrowException(JNIEnv * env, char const * type, char const * msg) { * Method: getNativeWindowSystemType * Signature: ()I */ -JNIEXPORT jint JNICALL Java_com_sun_star_comp_beans_LocalOfficeWindow_getNativeWindowSystemType +SAL_DLLPUBLIC_EXPORT jint JNICALL Java_com_sun_star_comp_beans_LocalOfficeWindow_getNativeWindowSystemType (JNIEnv * env, jobject obj_this) { (void) env; /* avoid warning about unused parameter */ @@ -86,7 +89,7 @@ JNIEXPORT jint JNICALL Java_com_sun_star_comp_beans_LocalOfficeWindow_getNativeW * Method: getNativeWindow * Signature: ()J */ -JNIEXPORT jlong JNICALL Java_com_sun_star_comp_beans_LocalOfficeWindow_getNativeWindow +SAL_DLLPUBLIC_EXPORT jlong JNICALL Java_com_sun_star_comp_beans_LocalOfficeWindow_getNativeWindow (JNIEnv * env, jobject obj_this) { jboolean result; -- cgit v1.2.3