Update of /cvsroot/gtkpod/libgpod/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2615/src
Modified Files:
db-artwork-writer.c db-itunes-parser.h
Log Message:
* configure.ac: bumped version to 0.3.2 for release.
* db-artwork-writer.c: increased IPOD_MMAP_SIZE from 2 to 16 MB as
a temporary workaround until a propoer solution can be
implemented.
* db-itunes-parser.h: replaced the #pragma pack(4) with an
'packed' attribute on _MhiiHeader only.
Index: db-artwork-writer.c
===================================================================
RCS file: /cvsroot/gtkpod/libgpod/src/db-artwork-writer.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- db-artwork-writer.c 4 Dec 2005 07:01:27 -0000 1.13
+++ db-artwork-writer.c 4 Mar 2006 13:15:09 -0000 1.14
@@ -41,7 +41,11 @@
#include <stdio.h>
#include <sys/types.h>
-#define IPOD_MMAP_SIZE 2 * 1024 * 1024
+/* FIXME: Writing aborts if a file exceeds the following size because
+ the mremap() further down will fail (at least most of the time on
+ most systems). As a workaround the size was increased from 2 MB to
+ 16 MB. */
+#define IPOD_MMAP_SIZE 16 * 1024 * 1024
struct iPodMmapBuffer {
int fd;
Index: db-itunes-parser.h
===================================================================
RCS file: /cvsroot/gtkpod/libgpod/src/db-itunes-parser.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- db-itunes-parser.h 19 Feb 2006 10:13:17 -0000 1.3
+++ db-itunes-parser.h 4 Mar 2006 13:15:09 -0000 1.4
@@ -29,12 +29,6 @@
#include <glib.h>
/*#include "ipod-db-parser.h"*/
-/* Make sure that 64bit integers do not get padded */
-/* FIXME: Obviously, this could also affect 16bit and 32bit integers,
- but so far all 32bit inters seem to be aligned correctly without
- padding. */
-#pragma pack(4)
-
#define ITUNESDB_MAX_SIZE 10 * 1024 * 1024
struct _MHeader {
@@ -529,7 +523,12 @@
gint32 unknown8;
gint32 orig_img_size;
unsigned char padding[];
-};
+} __attribute__((__packed__));
+/* I we don't put the 'packed' attribute above, some 64 bit systems
+ * will pad the 64 bit integer to be aligned to an 8-byte boundary.
+ * Hopefully there won't be any systems around that crash when
+ * accessing 64 bit integers not aligned to 8-byte boundaries. */
+
struct _MhniHeader {
unsigned char header_id[4];
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2