summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-11-21 22:40:27 +0100
committerBruno Haible <bruno@clisp.org>2020-11-21 22:41:29 +0100
commit31600a8bd3ad1e27715e214227b6b64196aff631 (patch)
tree117194c521f400dbaf05ff36fe2451a4ba5fba81
parentfc6f96660801e1da624753bd17379a68f82aa409 (diff)
downloadlibunistring-31600a8bd3ad1e27715e214227b6b64196aff631.tar.gz
build: Fix export of symbols in 64-bit mode on Windows.
Reported by kenjiuno <h8mastre@gmail.com> in <https://savannah.gnu.org/bugs/?59491>. * woe32dll/export.h (IMP): Correct definition in 64-bit mode.
-rw-r--r--ChangeLog7
-rw-r--r--woe32dll/export.h8
2 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 14f81d2..b97929b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-11-21 Bruno Haible <bruno@clisp.org>
+
+ build: Fix export of symbols in 64-bit mode on Windows.
+ Reported by kenjiuno <h8mastre@gmail.com> in
+ <https://savannah.gnu.org/bugs/?59491>.
+ * woe32dll/export.h (IMP): Correct definition in 64-bit mode.
+
2020-09-06 Bruno Haible <bruno@clisp.org>
build: Add support for clang on Windows.
diff --git a/woe32dll/export.h b/woe32dll/export.h
index ef6a77c..b17d9d3 100644
--- a/woe32dll/export.h
+++ b/woe32dll/export.h
@@ -1,5 +1,5 @@
/* Exporting symbols from Cygwin shared libraries.
- Copyright (C) 2006, 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2011-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or
@@ -103,7 +103,11 @@
#if defined __GNUC__ /* GCC compiler, GNU toolchain */
/* IMP(x) is a symbol that contains the address of x. */
-# define IMP(x) _imp__##x
+# if defined _WIN64 || defined _LP64
+# define IMP(x) __imp_##x
+# else
+# define IMP(x) _imp__##x
+# endif
/* Ensure that the variable x is exported from the library, and that a
pseudo-variable IMP(x) is available. */