# HG changeset patch # User Timo Sirainen # Date 1030558819 -10800 # Node ID 8cef827d2d79c6d6142baa4774ef309a6d1695aa # Parent 9381df54c9c359634b53648f456e38ccfad441b2 MailHashHeader is now 8-byte aligned. Fixed other header alignments too and stored MEM_ALIGN_SIZE into compat_data[]. diff -r 9381df54c9c3 -r 8cef827d2d79 src/lib-index/mail-hash.h --- a/src/lib-index/mail-hash.h Wed Aug 28 21:06:44 2002 +0300 +++ b/src/lib-index/mail-hash.h Wed Aug 28 21:20:19 2002 +0300 @@ -8,6 +8,8 @@ unsigned int indexid; unsigned int updateid; unsigned int used_records; + + unsigned int alignment; }; struct _MailHashRecord { diff -r 9381df54c9c3 -r 8cef827d2d79 src/lib-index/mail-index.c --- a/src/lib-index/mail-index.c Wed Aug 28 21:06:44 2002 +0300 +++ b/src/lib-index/mail-index.c Wed Aug 28 21:20:19 2002 +0300 @@ -372,7 +372,8 @@ hdr->compat_data[1] == MAIL_INDEX_COMPAT_FLAGS && hdr->compat_data[2] == sizeof(unsigned int) && hdr->compat_data[3] == sizeof(time_t) && - hdr->compat_data[4] == sizeof(uoff_t); + hdr->compat_data[4] == sizeof(uoff_t) && + hdr->compat_data[5] == MEM_ALIGN_SIZE; } /* Returns TRUE if we're compatible with given index file */ @@ -574,6 +575,7 @@ hdr->compat_data[2] = sizeof(unsigned int); hdr->compat_data[3] = sizeof(time_t); hdr->compat_data[4] = sizeof(uoff_t); + hdr->compat_data[5] = MEM_ALIGN_SIZE; hdr->indexid = ioloop_time; /* mark the index being rebuilt - rebuild() removes this flag diff -r 9381df54c9c3 -r 8cef827d2d79 src/lib-index/mail-index.h --- a/src/lib-index/mail-index.h Wed Aug 28 21:06:44 2002 +0300 +++ b/src/lib-index/mail-index.h Wed Aug 28 21:20:19 2002 +0300 @@ -77,7 +77,8 @@ 1 = flags, 2 = sizeof(unsigned int), 3 = sizeof(time_t), - 4 = sizeof(uoff_t) */ + 4 = sizeof(uoff_t), + 5 = MEM_ALIGN_SIZE */ unsigned int indexid; unsigned int flags; @@ -98,8 +99,6 @@ /* these UIDs may not exist and may not even be unseen */ unsigned int first_unseen_uid_lowwater; unsigned int first_deleted_uid_lowwater; - - unsigned int reserved_for_future_usage[5]; }; struct _MailIndexDataHeader {