core: Compile again on GLib 2.28

This commit is contained in:
Colin Walters committed 2012-05-05 11:45:19 -04:00
1 parent 471c04605e
commit 38dd179017
6 files changed
+30 -15

No files matched your search

+1 -1
View File
@@ -28,7 +28,7 @@
#include "otutil.h"
#if GLIB_CHECK_VERSION(2,32,0)
#if GLIB_CHECK_VERSION(2,32,0) && !defined(OSTREE_GLIB_TARGET_MIN)
/* nothing */
#else
/* Code copied from glib/glib/genviron.c */
+12 -1
View File
@@ -27,10 +27,16 @@
G_BEGIN_DECLS
#if GLIB_CHECK_VERSION(2,32,0)
#if GLIB_CHECK_VERSION(2,32,0) && !defined(OSTREE_GLIB_TARGET_MIN)
#define ot_g_environ_getenv g_environ_getenv
#define ot_g_environ_setenv g_environ_setenv
#define ot_g_environ_unsetenv g_environ_unsetenv
#define ot_mutex_init(v) do { g_mutex_init (&(v)); } while (0);
#define ot_mutex_free(v) do { g_mutex_clear (&(v)); } while (0);
#define ot_mutex_lock(v) do { g_mutex_lock (&(v)); } while (0);
#define ot_mutex_unlock(v) do { g_mutex_unlock (&(v)); } while (0);
#else
const gchar *
ot_g_environ_getenv (gchar **envp,
@@ -45,6 +51,11 @@ ot_g_environ_setenv (gchar **envp,
gchar **
ot_g_environ_unsetenv (gchar **envp,
const gchar *variable);
#define ot_mutex_init(v) do { v = g_mutex_new (); } while (0);
#define ot_mutex_free(v) do { g_mutex_free (v); } while (0);
#define ot_mutex_lock(v) do { g_mutex_lock (v); } while (0);
#define ot_mutex_unlock(v) do { g_mutex_unlock (v); } while (0);
#endif
+1 -1
View File
@@ -91,7 +91,7 @@ ot_util_variant_save (GFile *dest,
GVariant *
ot_util_variant_take_ref (GVariant *variant)
{
#if GLIB_CHECK_VERSION(2,32,0)
#if GLIB_CHECK_VERSION(2,32,0) && !defined(OSTREE_GLIB_TARGET_MIN)
return g_variant_take_ref (variant);
#else
if (g_variant_is_floating (variant))