diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-04-01 06:05:32 +0800 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-04-07 19:28:39 +0800 |
commit | f252d72685e281836fa10c60c01618d627d8c90c (patch) | |
tree | 2cb4f4c8c45120c6955c5afd5e45eddb6e8a3a87 | |
parent | 00217c7a2a7833babbd9b9e79c9ae4f358969d70 (diff) | |
download | gsoc2013-evolution-f252d72685e281836fa10c60c01618d627d8c90c.tar.gz gsoc2013-evolution-f252d72685e281836fa10c60c01618d627d8c90c.tar.zst gsoc2013-evolution-f252d72685e281836fa10c60c01618d627d8c90c.zip |
More build fixes.
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | plugins/bbdb/gaimbuddies.c | 26 |
2 files changed, 20 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 3b427e0805..7701a76003 100644 --- a/configure.ac +++ b/configure.ac @@ -69,6 +69,7 @@ AS_COMPILER_FLAGS(WARNING_FLAGS, -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED + -DEDS_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -Wall -Wextra diff --git a/plugins/bbdb/gaimbuddies.c b/plugins/bbdb/gaimbuddies.c index 586f5083b7..66f77bcc99 100644 --- a/plugins/bbdb/gaimbuddies.c +++ b/plugins/bbdb/gaimbuddies.c @@ -40,8 +40,6 @@ #include <string.h> #include <libebook/e-book.h> -#undef EDS_DISABLE_DEPRECATED -#include <libedataserver/md5-utils.h> #include <libedataserverui/e-source-combo-box.h> #include <sys/time.h> @@ -76,15 +74,29 @@ get_buddy_filename (void) static gchar * get_md5_as_string (const gchar *filename) { - guchar d[16]; + GMappedFile *mapped_file; + const gchar *contents; + gchar *digest; + gsize length; + GError *error = NULL; g_return_val_if_fail (filename != NULL, NULL); - md5_get_digest_from_file (filename, d); + mapped_file = g_mapped_file_new (filename, FALSE, &error); + if (mapped_file == NULL) { + g_warning ("%s", error->message); + return NULL; + } + + contents = g_mapped_file_get_contents (mapped_file); + length = g_mapped_file_get_length (mapped_file); + + digest = g_compute_checksum_for_data ( + G_CHECKSUM_MD5, (guchar *) contents, length); + + g_mapped_file_unref (mapped_file); - return g_strdup_printf ("%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x", - d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], - d[8], d[9], d[10], d[11], d[12], d[13], d[14], d[15]); + return digest; } void |