#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
+#define member_sizeof(type, field) sizeof(((type *) 0)->field)
+
/*
* lttng_strncpy returns 0 on success, or nonzero on failure.
* It checks that the @src string fits into @dst_len before performing