From baf5a13f170dbd910a0d3c8570499a244a208079 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 16 Aug 2021 04:26:55 +0200 Subject: [PATCH] Update atomic/volatile compat With glib 2.64, volatile gint produce annoying Wcast-qual compiler warnings with mingw/gcc-8. Even though the the build succeeds, and only glib 2.68+ requires non-volatile atomics this results in a much cleaner build-log. --- libs/pbd/pbd/g_atomic_compat.h | 2 +- wscript | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/pbd/pbd/g_atomic_compat.h b/libs/pbd/pbd/g_atomic_compat.h index d13f606a45..844a149574 100644 --- a/libs/pbd/pbd/g_atomic_compat.h +++ b/libs/pbd/pbd/g_atomic_compat.h @@ -30,7 +30,7 @@ * Older versions of glib and older compilers still expect a volatile qualifier and print * "cast from type 'volatile long int*' to type 'long int*' casts away qualifiers [-Wcast-qual]" */ -#if defined HAVE_GLIB_2_68 && (defined(__cplusplus) && __cplusplus >= 201103L) +#if defined HAVE_GLIB_2_64 && (defined(__cplusplus) && __cplusplus >= 201103L) # define GATOMIC_QUAL #else # define GATOMIC_QUAL volatile diff --git a/wscript b/wscript index 1843585b14..3b22d1ce76 100644 --- a/wscript +++ b/wscript @@ -1146,7 +1146,7 @@ def configure(conf): conf.env.append_value('LDFLAGS', '-L/usr/X11R6/lib') autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.28', mandatory=True) - autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB_2_68', atleast_version='2.68', mandatory=False) + autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB_2_64', atleast_version='2.64', mandatory=False) autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD', atleast_version='2.2', mandatory=True) autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.32.0', mandatory=True) autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE', atleast_version='1.0.18', mandatory=True)