From b34157f103da88c31106915b53255075e144f0f0 Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Thu, 10 Dec 2015 16:38:58 +0100 Subject: [PATCH 1/1] [xbt] Fix XBT_PUBLIC definition for ELF/*nix --- include/xbt/base.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/include/xbt/base.h b/include/xbt/base.h index dcbaca2444..22f1a5592f 100644 --- a/include/xbt/base.h +++ b/include/xbt/base.h @@ -235,23 +235,20 @@ # define XBT_PUBLIC_DATA(type) extern __declspec(dllimport) type # define XBT_PUBLIC_CLASS class __declspec(dllimport) - -/* UNIX build */ #elif defined(__ELF__) +# define XBT_PUBLIC(type) __attribute__((visibility("default"))) type +# define XBT_EXPORT_NO_IMPORT(type) __attribute__((visibility("default"))) type +# define XBT_IMPORT_NO_EXPORT(type) __attribute__((visibility("default"))) type +# define XBT_PUBLIC_DATA(type) extern __attribute__((visibility("default"))) type +# define XBT_PUBLIC_CLASS class __attribute__((visibility("default"))) +#else # define XBT_PUBLIC(type) type # define XBT_EXPORT_NO_IMPORT(type) type # define XBT_IMPORT_NO_EXPORT(type) type # define XBT_PUBLIC_DATA(type) extern type # define XBT_PUBLIC_CLASS class -#else -# define XBT_PUBLIC(type) __attribute__((visibility("default"))) type -# define XBT_EXPORT_NO_IMPORT(type) __attribute__((visibility("default"))) type -# define XBT_IMPORT_NO_EXPORT(type) __attribute__((visibility("default"))) type -# define XBT_PUBLIC_DATA(type) extern __attribute__((visibility("default"))) type -# define XBT_PUBLIC_CLASS class __attribute__((visibility("default"))) - #endif #ifdef __ELF__ -- 2.20.1