Merge branch 'gconstructor-h-fix' into 'main'

gconstructor.h: Visual Studio: Only include gslist.h if needed

Closes libadwaita#418

See merge request GNOME/glib!2487
This commit is contained in:
Philip Withnall 2022-02-14 12:27:19 +00:00
commit 40aeefc9ee

View File

@ -55,7 +55,15 @@
#elif defined (_MSC_VER) && (_MSC_VER >= 1500)
/* Visual studio 2008 and later has _Pragma */
/*
* Only try to include gslist.h if not already included via glib.h,
* so that items using gconstructor.h outside of GLib (such as
* GResources) continue to build properly.
*/
#ifndef __G_LIB_H__
#include "gslist.h"
#endif
#include <stdlib.h>
#define G_HAS_CONSTRUCTORS 1