commit 5ebb477a5097a0ed7ca77e9cec2d515f3b76f781 Author: Christophe Fergeau <t...@gnome.org> Date: Tue Jul 19 23:03:52 2011 +0200
add optional g_checksum_reset implementation g_checksum_reset was introduced in glib 2.18 but we only depend on glib 2.16. Add our own g_checksum_reset implementation if it's not available in the glib we're building against. configure.ac | 1 + src/itdb_hash58.c | 8 ++++++++ 2 files changed, 9 insertions(+), 0 deletions(-) --- diff --git a/configure.ac b/configure.ac index 66cc889..4049a09 100644 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,7 @@ saved_LIBS="$LIBS" CFLAGS="$LIBGPOD_CFLAGS $CFLAGS" LIBS="$LIBGPOD_LIBS $LIBS" AC_CHECK_FUNCS([g_int64_hash g_int64_equal]) +AC_CHECK_FUNCS([g_checksum_reset]) CFLAGS="$saved_CFLAGS" LIBS="$saved_LIBS" diff --git a/src/itdb_hash58.c b/src/itdb_hash58.c index 4931f1f..af9832b 100644 --- a/src/itdb_hash58.c +++ b/src/itdb_hash58.c @@ -117,6 +117,14 @@ static const unsigned char fixed[18] = { 0x21, 0x07, 0xC1, 0xD0, 0x12, 0xB2, 0xA1, 0x07, 0x81 }; +#ifndef HAVE_G_CHECKSUM_RESET +#define g_checksum_reset(checksum) \ +G_STMT_START { \ + g_checksum_free(checksum); \ + (checksum) = g_checksum_new (G_CHECKSUM_SHA1); \ +} G_STMT_END +#endif + static int gcd(int a, int b){ while (TRUE) { ------------------------------------------------------------------------------ Storage Efficiency Calculator This modeling tool is based on patent-pending intellectual property that has been used successfully in hundreds of IBM storage optimization engage- ments, worldwide. Store less, Store more with what you own, Move data to the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/ _______________________________________________ gtkpod-cvs2 mailing list gtkpod-cvs2@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2