Skip to contentSkip to conversation

Port: win32 DLLs don't support hidden symbols

PATCH New Michael Jeanson 2 participants 2 messages Jan 26, 2017 – Feb 14, 2017 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 2/2 Port: win32 DLLs don't support hidden symbols

---
 src/common/macros.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
src/common/macros.h +8 -1
index 8ae6535..90849ed 100644
@@ -74,7 +74,14 @@ void *zmalloc(size_t len)
 #define LTTNG_PACKED __attribute__((__packed__))
 #endif
 
-#ifndef LTTNG_HIDDEN
+/*
+ * LTTNG_HIDDEN: set the hidden attribute for internal functions
+ * On Windows, symbols are local unless explicitly exported,
+ * see https://gcc.gnu.org/wiki/Visibility
+ */
+#if defined(_WIN32) || defined(__CYGWIN__)
+#define LTTNG_HIDDEN
+#else
 #define LTTNG_HIDDEN __attribute__((visibility("hidden")))
 #endif
 
Signature · 6 lines
2.7.4

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
#2 lore raw

Re: [PATCH lttng-tools 1/2] Port: add cygwin support to endian compat

In reply to a message not in the archive

Both patches merged in master and stable-2.9.

Thanks!
Jérémie

Quoted 21 lines · Michael Jeanson
---
 src/common/compat/endian.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/common/compat/endian.h +1 -2
index 4edc124..6427feb 100644
@@ -18,7 +18,7 @@
 #ifndef _COMPAT_ENDIAN_H
 #define _COMPAT_ENDIAN_H
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__CYGWIN__)
 #include <endian.h>
 
 /*
--

2.7.4

Signature · 7 lines
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev