Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP4:FactoryCandidates
emacs-jinx
0001-Only-export-necessary-symbols.-Fixes-105.p...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Only-export-necessary-symbols.-Fixes-105.patch of Package emacs-jinx
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@thaodan.de> Date: Fri, 29 Sep 2023 20:48:06 +0300 Subject: [PATCH] Only export necessary symbols. Fixes #105 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As recommended in: https://gcc.gnu.org/wiki/Visibility Signed-off-by: Björn Bidar <bjorn.bidar@thaodan.de> --- jinx-mod.c | 19 +++++++++++++++++-- jinx.el | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/jinx-mod.c b/jinx-mod.c index 0e6a4e66f4f88a7f8d636a1beaddbe957d3f55a2..c999abd7e6b1668ab26585fc00c18511517412e9 100644 --- a/jinx-mod.c +++ b/jinx-mod.c @@ -21,10 +21,25 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ #include <stdlib.h> #include <string.h> + +#if defined _WIN32 || defined __CYGWIN__ + #ifdef __GNUC__ + #define JINX_EXPORT __attribute__ ((dllexport)) + #else + #define JINX_EXPORT __declspec(dllexport) + #endif +#else + #if __GNUC__ >= 4 + #define JINX_EXPORT __attribute__ ((visibility ("default"))) + #else + #define JINX_EXPORT + #endif +#endif + #define jinx_unused(var) _##var __attribute__((unused)) #define jinx_autofree __attribute__((cleanup(jinx_autofree_cleanup))) -int plugin_is_GPL_compatible; +JINX_EXPORT int plugin_is_GPL_compatible; static EnchantBroker* broker = 0; static emacs_value Qt, Qnil, Qcons; @@ -171,7 +186,7 @@ static emacs_value jinx_suggest(emacs_env* env, ptrdiff_t jinx_unused(nargs), return list; } -int emacs_module_init(struct emacs_runtime *runtime) { +int JINX_EXPORT emacs_module_init(struct emacs_runtime *runtime) { if ((size_t)runtime->size < sizeof (*runtime)) return 1; // Require Emacs binary compatibility emacs_env* env = runtime->get_environment(runtime); diff --git a/jinx.el b/jinx.el index 7bfc8705f9f5bcd35c349ec140a3eb02fa098d93..5accf4a6b4c823b344e46eebb587a58a09751c96 100644 --- a/jinx.el +++ b/jinx.el @@ -582,7 +582,7 @@ If CHECK is non-nil, always check first." (or (locate-library c-name t) (error "Jinx: %s not found" c-name)))) (command - `(,cc "-I." "-O2" "-Wall" "-Wextra" "-fPIC" "-shared" + `(,cc "-I." "-O2" "-Wall" "-Wextra" "-fPIC" "-shared" "-fvisibility=hidden" "-o" ,mod-name ,c-name ,@(split-string-and-unquote (condition-case nil
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor