summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbenjamin.dauvergne <benjamin.dauvergne@a716ebb1-153a-0410-b759-cfb97c6a1b53>2012-10-10 10:35:15 +0000
committerbenjamin.dauvergne <benjamin.dauvergne@a716ebb1-153a-0410-b759-cfb97c6a1b53>2012-10-10 10:35:15 +0000
commit4abc14dbdd510410f35ef52939ef36f21da8e265 (patch)
tree015650d93b9eb716872f116d37eeb54213b28a59
parentc02a50b54f866b2916ff04298ce36c7da4b68ee7 (diff)
downloadmod_auth_mellon-4abc14dbdd510410f35ef52939ef36f21da8e265.tar.gz
mod_auth_mellon-4abc14dbdd510410f35ef52939ef36f21da8e265.tar.xz
mod_auth_mellon-4abc14dbdd510410f35ef52939ef36f21da8e265.zip
add implementation of g_hash_table_get_keys to compile under Centos 5
git-svn-id: https://modmellon.googlecode.com/svn/trunk@171 a716ebb1-153a-0410-b759-cfb97c6a1b53
-rw-r--r--auth_mellon.h22
-rw-r--r--configure.ac4
2 files changed, 24 insertions, 2 deletions
diff --git a/auth_mellon.h b/auth_mellon.h
index c1c8086..12ff5a9 100644
--- a/auth_mellon.h
+++ b/auth_mellon.h
@@ -370,4 +370,26 @@ int am_httpclient_post_str(request_rec *r, const char *uri,
extern module AP_MODULE_DECLARE_DATA auth_mellon_module;
+/* Old glib compatibility */
+
+#if (GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION < 14)
+
+static void g_hash_table_get_keys_helper(gpointer key, gpointer value,
+ gpointer user_data)
+{
+ GList **out = user_data;
+
+ *out = g_list_prepend(*out, key);
+}
+
+static GList *g_hash_table_get_keys(GHashTable *ht)
+{
+ GList *ret = NULL;
+
+ g_hash_table_foreach(ht, g_hash_table_get_keys_helper, &ret);
+
+ return g_list_reverse(ret);
+}
+#endif
+
#endif /* MOD_AUTH_MELLON_H */
diff --git a/configure.ac b/configure.ac
index 4455a13..064b222 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,8 +64,8 @@ PKG_CHECK_MODULES(OPENSSL, openssl)
AC_SUBST(OPENSSL_CFLAGS)
AC_SUBST(OPENSSL_LIBS)
-# We need at least version 2.14 of GLib.
-PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.14])
+# We need at least version 2.12 of GLib.
+PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.12])
# Create Makefile from Makefile.in