From: <jc...@us...> - 2008-12-15 14:38:15
|
Revision: 2170 http://gtkpod.svn.sourceforge.net/gtkpod/?rev=2170&view=rev Author: jcsjcs Date: 2008-12-15 14:38:07 +0000 (Mon, 15 Dec 2008) Log Message: ----------- * src/itdb_plist.c: substitute g_base64_decode() between version 2.8 and 2.11 of glib. * src/itdb_device.c: handle timezone correctly on CYGWIN Patches courtesy of ?\195?\137ric Lassauge. Modified Paths: -------------- libgpod/trunk/ChangeLog libgpod/trunk/src/itdb_device.c libgpod/trunk/src/itdb_plist.c Modified: libgpod/trunk/ChangeLog =================================================================== --- libgpod/trunk/ChangeLog 2008-12-15 14:23:23 UTC (rev 2169) +++ libgpod/trunk/ChangeLog 2008-12-15 14:38:07 UTC (rev 2170) @@ -1,3 +1,12 @@ +2008-12-15 Jorg Schuler <jcsjcs at users.sourceforge.net> + + * src/itdb_plist.c: substitute g_base64_decode() between version + 2.8 and 2.11 of glib. + + * src/itdb_device.c: handle timezone correctly on CYGWIN + + Patches courtesy of Éric Lassauge. + 2008-12-13 Jorg Schuler <jcsjcs at users.sourceforge.net> * po/fr.po: Update French translation (Éric Lassauge) Modified: libgpod/trunk/src/itdb_device.c =================================================================== --- libgpod/trunk/src/itdb_device.c 2008-12-15 14:23:23 UTC (rev 2169) +++ libgpod/trunk/src/itdb_device.c 2008-12-15 14:38:07 UTC (rev 2170) @@ -39,6 +39,9 @@ #include <sys/stat.h> #include <sys/types.h> #include <time.h> +#ifdef __CYGWIN__ + extern __IMPORT long _timezone; +#endif #ifdef HAVE_UNISTD_H #include <unistd.h> #endif @@ -1575,7 +1578,11 @@ static gint get_local_timezone (void) { +#ifdef __CYGWIN__ + return (gint) _timezone; /* global variable defined by time.h, see man tzset */ +#else return timezone; /* global variable defined by time.h, see man tzset */ +#endif } /* This function reads the timezone information from the iPod and sets it in Modified: libgpod/trunk/src/itdb_plist.c =================================================================== --- libgpod/trunk/src/itdb_plist.c 2008-12-15 14:23:23 UTC (rev 2169) +++ libgpod/trunk/src/itdb_plist.c 2008-12-15 14:38:07 UTC (rev 2170) @@ -177,7 +177,14 @@ GValue *value; str_val = (char *)xmlNodeGetContent(a_node); +#if GLIB_CHECK_VERSION(2,12,0) + /* base64 support only after GLib 2.12 */ raw_data = g_base64_decode (str_val, &len); +#else +#warning GLib > 2.12 required for g_base64_decode(). Working around this problem. + raw_data = g_strdup (""); + len = 0; +#endif xmlFree (str_val); data_val = g_string_new_len ((char *)raw_data, len); g_free (raw_data); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |