On Windows 64, long is of size 32 bits and not 64 bits. Also
authorcaro <caro>
Tue, 29 Jun 2010 05:29:50 +0000 (05:29 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 29 Jun 2010 05:29:50 +0000 (05:29 +0000)
LONG_BIT is not defined on Windows.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eet@49934 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
src/lib/eet_data.c

index 4a6322a..7d96e98 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
         * 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.
index 9459caa..5644548 100644 (file)
@@ -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;