[glib: 1/2] Fix include order of glib-visibility.h




commit 0db49cc57bb8e76535bfa690fcda8f258030997f
Author: Xavier Claessens <xavier claessens collabora com>
Date:   Mon Oct 17 04:50:24 2022 -0400

    Fix include order of glib-visibility.h
    
    It uses macros from glibconfig.h, gmacros.h and gversionmacros.h, makes
    sure it is included after them.

 glib/glibconfig.h.in | 1 -
 glib/gtypes.h        | 4 ++++
 2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/glib/glibconfig.h.in b/glib/glibconfig.h.in
index fb85daf990..e93a7c8665 100644
--- a/glib/glibconfig.h.in
+++ b/glib/glibconfig.h.in
@@ -18,7 +18,6 @@
 #mesondefine GMODULE_STATIC_COMPILATION
 #mesondefine G_INTL_STATIC_COMPILATION
 #mesondefine FFI_STATIC_BUILD
-#include <glib/glib-visibility.h>
 
 /* Specifies that GLib's g_print*() functions wrap the
  * system printf functions.  This is useful to know, for example,
diff --git a/glib/gtypes.h b/glib/gtypes.h
index 15ead8da33..2312d5ae67 100644
--- a/glib/gtypes.h
+++ b/glib/gtypes.h
@@ -34,6 +34,10 @@
 #include <glibconfig.h>
 #include <glib/gmacros.h>
 #include <glib/gversionmacros.h>
+
+/* Must be included after the 3 headers above */
+#include <glib/glib-visibility.h>
+
 #include <time.h>
 
 G_BEGIN_DECLS


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]