summaryrefslogtreecommitdiff
path: root/javaunohelper/source/juhx-export-functions.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-04-18 13:16:41 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-04-18 13:27:31 +0200
commit96488510c006785bba22c1039885c03e95ac4832 (patch)
tree20fdaa3131b63df8c81497cc332ebb105b34db61 /javaunohelper/source/juhx-export-functions.hxx
parent000d3aaca5e8b0bab4689f753e8025d73e5bcded (diff)
Let juhx.dll export undecorated symbols on Windows
...otherwise preload.cxx in juh.dll will not be able to find them via osl_getFunctionSymbol. What apparently happens is that JNICALL expanding to __stdcall decorates symbol names with _...@NN. This likely was hidden in pre-gbuild times thanks to the use of def files. (On a side note, the JVM appears to contain special code to find syms for native methods in both decorated and undecorated form; that explains why it picks up the decorated symbols from juh.dll just fine.) There is no need for the functions in juhx.dll (called from the juh.dll wrapper) to adhere to JNICALL (in fact, things would likely be easier to maintain if the juhx.dll functions also used different names than their juh.dll wrappers). However, what complicates this patch is that for DISABLE_DYNLOADING, the juh wrapper and its preload.cxx is elided, and the code that would normally go into the juhx library goes into the juh library (and thus needs to stick to JNICALL, and also needs to use the right function names). Change-Id: I66611648f1f79f57f0c1b23fb7a801da2d7b86c5
Diffstat (limited to 'javaunohelper/source/juhx-export-functions.hxx')
-rw-r--r--javaunohelper/source/juhx-export-functions.hxx44
1 files changed, 44 insertions, 0 deletions
diff --git a/javaunohelper/source/juhx-export-functions.hxx b/javaunohelper/source/juhx-export-functions.hxx
new file mode 100644
index 000000000000..0012cf4832bf
--- /dev/null
+++ b/javaunohelper/source/juhx-export-functions.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_JAVAUNOHELPER_SOURCE_JUHX_EXPORT_FUNCTIONS_HXX
+#define INCLUDED_JAVAUNOHELPER_SOURCE_JUHX_EXPORT_FUNCTIONS_HXX
+
+#include "sal/config.h"
+
+#include "sal/types.h"
+
+#include "juhx-export-types.hxx"
+
+extern "C" {
+
+SAL_JNI_EXPORT javaunohelper::detail::Func_bootstrap
+Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap;
+
+SAL_JNI_EXPORT javaunohelper::detail::Func_getFactory
+Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory;
+
+SAL_JNI_EXPORT javaunohelper::detail::Func_writeInfo
+Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo;
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */