From 7c0a8e1d4c1dc26e6505fab468cb2317a7daeb7e Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Thu, 24 Apr 2008 07:54:32 +0000 Subject: [PATCH] structec makes a poor assumption that all targets use 1 byte chars, 2 byte shorts and 4 byte longs which is wrong on 64bit sims which causes database to not be commited. The proper fix should be to remove those assumtopns but probably not nescacery untill a target comes along which breaks the assumption. This _shouldnt_ change anything on target. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17234 a1c6a512-1295-4272-9138-f99709370657 --- apps/tagcache.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/tagcache.c b/apps/tagcache.c index 5ba955f6ce..8f34b32b05 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c @@ -145,10 +145,10 @@ enum tagcache_queue { }; struct tagcache_command_entry { - long command; - long idx_id; - long tag; - long data; + int32_t command; + int32_t idx_id; + int32_t tag; + int32_t data; }; static struct tagcache_command_entry command_queue[TAGCACHE_COMMAND_QUEUE_LENGTH]; @@ -167,22 +167,22 @@ struct tagfile_entry { /* Fixed-size tag entry in master db index. */ struct index_entry { - long tag_seek[TAG_COUNT]; /* Location of tag data or numeric tag data */ - long flag; /* Status flags */ + int32_t tag_seek[TAG_COUNT]; /* Location of tag data or numeric tag data */ + int32_t flag; /* Status flags */ }; /* Header is the same in every file. */ struct tagcache_header { - long magic; /* Header version number */ - long datasize; /* Data size in bytes */ - long entry_count; /* Number of entries in this file */ + int32_t magic; /* Header version number */ + int32_t datasize; /* Data size in bytes */ + int32_t entry_count; /* Number of entries in this file */ }; struct master_header { struct tagcache_header tch; - long serial; /* Increasing counting number */ - long commitid; /* Number of commits so far */ - long dirty; + int32_t serial; /* Increasing counting number */ + int32_t commitid; /* Number of commits so far */ + int32_t dirty; }; /* For the endianess correction */