From acece01d325781e8165e53a73e686aea8bebffe5 Mon Sep 17 00:00:00 2001 From: Jorg Schuler Date: Sat, 4 Mar 2006 13:18:23 +0000 Subject: * 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. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1211 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- ChangeLog | 11 +++++++++++ configure.ac | 2 +- src/db-artwork-writer.c | 6 +++++- src/db-itunes-parser.h | 13 ++++++------- 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c962d4..79923df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-02-04 Jorg Schuler + + * 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. + 2005-02-28 Jorg Schuler * ipod-device.c: (ipod_device_set_property): fixed possible diff --git a/configure.ac b/configure.ac index 0c8d494..e6c0cb9 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ AM_CONFIG_HEADER(config.h) # LIBGPOD_MAJOR_VERSION=0 LIBGPOD_MINOR_VERSION=3 -LIBGPOD_MICRO_VERSION=1 +LIBGPOD_MICRO_VERSION=2 LIBGPOD_INTERFACE_AGE=0 # If you need a modifier for the version number. # Normally empty, but can be used to make "fixup" releases. diff --git a/src/db-artwork-writer.c b/src/db-artwork-writer.c index 4c728e8..65fc089 100644 --- a/src/db-artwork-writer.c +++ b/src/db-artwork-writer.c @@ -41,7 +41,11 @@ #include #include -#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; diff --git a/src/db-itunes-parser.h b/src/db-itunes-parser.h index a51af8b..bdd8498 100644 --- a/src/db-itunes-parser.h +++ b/src/db-itunes-parser.h @@ -29,12 +29,6 @@ #include /*#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 @@ struct _MhiiHeader { 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]; -- cgit