From: caro Date: Tue, 29 Jun 2010 05:29:50 +0000 (+0000) Subject: On Windows 64, long is of size 32 bits and not 64 bits. Also X-Git-Tag: submit/2.0alpha-wayland/20121127.222001~305 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3459f3dd17586665e631865559c91785148a28fb;p=profile%2Fivi%2Feet.git On Windows 64, long is of size 32 bits and not 64 bits. Also LONG_BIT is not defined on Windows. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eet@49934 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/ChangeLog b/ChangeLog index 4a6322a..7d96e98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -385,3 +385,7 @@ * Release eet 1.3.2 +2010-06-29 Vincent Torri + + * On Windows 64, long is of size 32 bits and not 64 bits. Also + LONG_BIT is not defined on Windows. diff --git a/src/lib/eet_data.c b/src/lib/eet_data.c index 9459caa..5644548 100644 --- a/src/lib/eet_data.c +++ b/src/lib/eet_data.c @@ -1627,7 +1627,11 @@ eet_data_write(Eet_File *ef, Eet_Data_Descriptor *edd, const char *name, const v static int _eet_free_hash(void *data) { +#ifdef _WIN64 + __int64 ptr = (UINT_PTR)data; +#else unsigned long ptr = (unsigned long)(data); +#endif int hash; hash = ptr; @@ -1635,7 +1639,7 @@ _eet_free_hash(void *data) hash ^= ptr >> 16; hash ^= ptr >> 24; -#if LONG_BIT != 32 +#if defined (_WIN64) || ( (! defined (_WIN32)) && (LONG_BIT != 32) ) hash ^= ptr >> 32; hash ^= ptr >> 40; hash ^= ptr >> 48;