Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'the CLI is not the issue...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
the CLI is not the issue...
Authored by: tomaz on Nov 23, '03 08:58:44AM

If you apply this patch to libdbx 1.0.3, it will run correctly also on big endian machines (you must define BIG_ENDIAN as 1):

54,65d53
< void _cbo (unsigned char *a, int len)
< {
< #if BIG_ENDIAN
< int i;
< unsigned char ch;
<
< for (i=0; i<(len/2); i++) { ch=a[len-1-i]; a[len-1-i]=a[i]; a[i]=ch; }
< #endif
< }
<
< #define cbo(a,b) (_cbo ((unsigned char *) (a), (b)))
<
91d78
< cbo (&(signature[0]),4); cbo (&(signature[1]),4); cbo (&(signature[2]),4); cbo (&(signature[3]),4);
379d365
< cbo (&indexptr, 4);
387d372
< cbo (&itemcount, 4);
417,418d401
< cbo (&(tindex.self), 4); cbo (&(tindex.unknown1), 4); cbo (&(tindex.anotherTablePtr), 4); cbo (&(tindex.parent), 4);
< cbo (&(tindex.indexCount), 4);
434d416
< cbo (&(index.indexptr), 4); cbo (&(index.anotherTablePtr), 4); cbo (&(index.indexCount), 4);
484d465
< cbo (&(blockhdr.self), 4); cbo (&(blockhdr.size), 4); cbo (&(blockhdr.u1), 2);
501d481
< cbo (&(blockp.val), 4);
544c524
< ((FILETIME*)bufx) = &(email->date);
---
> ((struct FILETIME*)bufx) = &(email->date);
648d627
< cbo (&(hdr.self), 4); cbo (&(hdr.nextaddressoffset), 4); cbo (&(hdr.blocksize), 2); cbo (&(hdr.nextaddress), 4);
677d655
< cbo (&(hdr.self), 4); cbo (&(hdr.blocksize), 4); cbo (&(hdr.unknown2), 2);
681d658
< cbo (&(fol.id), 4); cbo (&(fol.parent), 4); cbo (&(fol.unknown6), 4);
747d723
< cbo (dest, 4);
750,752c726,727
< memcpy((FILETIME*)dest, &buffer[pos], 8);
< cbo (&((FILETIME*)dest)->dwHighDateTime, 4); cbo (&((FILETIME*)dest)->dwLowDateTime, 4);
< // DEBUG_EMAIL("[%d] value copied was %#X%X\n", __LINE__, (FILETIME*)dest->dwHighDateTime, (FILETIME*)dest->dwLowDateTime);
---
> memcpy((struct WIN32_FILETIME*)dest, &buffer[pos], 8);
> // DEBUG_EMAIL("[%d] value copied was %#X%X\n", __LINE__, (struct FILETIME*)dest->dwHighDateTime, (struct FILETIME*)dest->dwLowDateTime);



[ Reply to This | # ]
the CLI is not the issue...
Authored by: tomaz on Nov 23, '03 09:00:23AM

(apply the patch to libdbx.c)



[ Reply to This | # ]