summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--codemaker/source/cppumaker/cpputype.cxx4
-rw-r--r--include/rtl/alloc.h3
-rw-r--r--include/rtl/ustring.h3
-rw-r--r--include/sal/types.h8
-rw-r--r--include/xmloff/xmlimppr.hxx4
5 files changed, 18 insertions, 4 deletions
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index 9ae5d689072e..b2ba3413402c 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -3328,7 +3328,11 @@ void EnumType::addComprehensiveGetCppuTypeIncludes(
void EnumType::dumpDeclaration(FileStream& o)
{
o << "\n#if defined LIBO_INTERNAL_ONLY\n";
+ o << "\n#if defined __GNUC__\n"; // gcc does not like visibility annotation on enum
+ o << "\nenum class " << id_ << "\n{\n";
+ o << "\n#else\n";
o << "\nenum class SAL_DLLPUBLIC_RTTI " << id_ << "\n{\n";
+ o << "\n#endif\n";
o << "\n#else\n";
o << "\nenum SAL_DLLPUBLIC_RTTI " << id_ << "\n{\n";
o << "\n#endif\n";
diff --git a/include/rtl/alloc.h b/include/rtl/alloc.h
index 4ce01cf1bcb4..1dc9cefacb0d 100644
--- a/include/rtl/alloc.h
+++ b/include/rtl/alloc.h
@@ -153,7 +153,8 @@ SAL_DLLPUBLIC void SAL_CALL rtl_freeAlignedMemory (
/** Opaque rtl_arena_type.
*/
-typedef struct SAL_DLLPUBLIC_RTTI rtl_arena_st rtl_arena_type;
+struct SAL_DLLPUBLIC_RTTI rtl_arena_st;
+typedef struct rtl_arena_st rtl_arena_type;
#define RTL_ARENA_NAME_LENGTH 31
diff --git a/include/rtl/ustring.h b/include/rtl/ustring.h
index 303aff446023..ddc87e29205d 100644
--- a/include/rtl/ustring.h
+++ b/include/rtl/ustring.h
@@ -1197,7 +1197,8 @@ SAL_DLLPUBLIC double SAL_CALL rtl_ustr_toDouble(
/** @cond INTERNAL */
/** The implementation of a Unicode string.
*/
-typedef struct SAL_DLLPUBLIC_RTTI _rtl_uString
+struct SAL_DLLPUBLIC_RTTI _rtl_uString;
+typedef struct _rtl_uString
{
oslInterlockedCount refCount; /* opaque */
sal_Int32 length;
diff --git a/include/sal/types.h b/include/sal/types.h
index c61956f647d7..a2ef256239e1 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -220,7 +220,7 @@ typedef void * sal_Handle;
# define SAL_DLLPUBLIC_IMPORT __attribute__ ((visibility("hidden")))
# define SAL_DLLPRIVATE __attribute__ ((visibility("hidden")))
# define SAL_DLLPUBLIC_TEMPLATE __attribute__ ((visibility("hidden")))
-# define SAL_DLLPUBLIC_RTTI
+# define SAL_DLLPUBLIC_RTTI __attribute__ ((visibility("default")))
# else
# define SAL_DLLPUBLIC_EXPORT __attribute__ ((visibility("default")))
# define SAL_JNI_EXPORT __attribute__ ((visibility("default")))
@@ -234,7 +234,11 @@ typedef void * sal_Handle;
# define SAL_DLLPUBLIC_RTTI __attribute__ ((visibility("default")))
# endif
# else
-# define SAL_DLLPUBLIC_RTTI
+// GCC does not have currently have equivalent functionality to clang's type_visibility
+// but I have a feature request for that at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113958
+// Until that is implemented, just make the whole class visible, which is what I would need to
+// do anyhow if something wants to import the typeinfo symbol.
+# define SAL_DLLPUBLIC_RTTI __attribute__ ((visibility("default")))
# endif
# endif
# else
diff --git a/include/xmloff/xmlimppr.hxx b/include/xmloff/xmlimppr.hxx
index adfba4eadc60..1f537a322eea 100644
--- a/include/xmloff/xmlimppr.hxx
+++ b/include/xmloff/xmlimppr.hxx
@@ -39,7 +39,11 @@ namespace com::sun::star::uno { template <typename > class Reference; }
namespace com::sun::star::uno { template <typename > class Sequence; }
namespace com::sun::star::xml::sax { class XAttributeList; }
namespace com::sun::star::xml::sax { class XFastAttributeList; }
+#if defined __GNUC__ // gcc does not like visibility annotation on enum
+namespace com::sun::star::drawing { enum class FillStyle; }
+#else
namespace com::sun::star::drawing { enum class SAL_DLLPUBLIC_RTTI FillStyle; }
+#endif
struct XMLPropertyState;
class XMLPropertySetMapper;