Simplify G_HAVE_GNUC_VISIBILITY definition

There is no need of compiler checks, GNUC visibility should be used when
__GNUC__ >= 4 but not on Windows.
This commit is contained in:
Xavier Claessens
2022-10-13 20:49:11 -04:00
parent c16f524034
commit d40459c280
3 changed files with 4 additions and 36 deletions

View File

@@ -129,7 +129,6 @@ typedef unsigned @glib_intptr_type_define@ guintptr;
#endif
#mesondefine G_HAVE_GROWING_STACK
#mesondefine G_HAVE_GNUC_VISIBILITY
#ifndef _MSC_VER
# define G_HAVE_GNUC_VARARGS 1

View File

@@ -1190,6 +1190,10 @@
#define G_UNLIKELY(expr) (expr)
#endif
#if __GNUC__ >= 4 && !defined(_WIN32) && !defined(__CYGWIN__)
#define G_HAVE_GNUC_VISIBILITY 1
#endif
/* GLIB_CANNOT_IGNORE_DEPRECATIONS is defined above for compilers that do not
* have a way to temporarily suppress deprecation warnings. In these cases,
* suppress the deprecated attribute altogether (otherwise a simple #include