efl: detect 64 bits correctly.

This commit is contained in:
Cedric Bail 2013-11-09 19:48:31 +09:00
parent 76c7b9a275
commit 926f4c5e84
6 changed files with 13 additions and 9 deletions

View File

@ -254,7 +254,7 @@ _part_lookup_key_pc_hash(const void *key, int key_length EINA_UNUSED)
if (a->stable)
{
#ifdef __LP64__
#ifdef EFL64
return eina_hash_int64((uintptr_t *) &a->pc, sizeof (void*)) ^
eina_hash_int64((uintptr_t *) &a->mem.dest, sizeof (void*));
#else
@ -264,7 +264,7 @@ _part_lookup_key_pc_hash(const void *key, int key_length EINA_UNUSED)
}
else
{
#ifdef __LP64__
#ifdef EFL64
return eina_hash_int64((uintptr_t *) &a->pc, sizeof (void*)) ^
eina_hash_int64((uintptr_t *) &a->mem.reallocated.base, sizeof (void*)) ^
eina_hash_int32((unsigned int *) &a->mem.reallocated.offset, sizeof (int));
@ -298,7 +298,7 @@ _part_lookup_key_hash(const void *key, int key_length EINA_UNUSED)
if (a->stable)
{
#ifdef __LP64__
#ifdef EFL64
return eina_hash_int64((uintptr_t *) &a->mem.dest, sizeof (void*));
#else
return eina_hash_int32((uintptr_t *) &a->mem.dest, sizeof (void*));
@ -306,7 +306,7 @@ _part_lookup_key_hash(const void *key, int key_length EINA_UNUSED)
}
else
{
#ifdef __LP64__
#ifdef EFL64
return eina_hash_int64((uintptr_t *) &a->mem.reallocated.base, sizeof (void*)) ^
eina_hash_int32((unsigned int *) &a->mem.reallocated.offset, sizeof (int));
#else

View File

@ -36,7 +36,7 @@ _edje_signal_match_key_hash(const void *key, int key_length EINA_UNUSED)
hash = eina_hash_int32(&a->matches_count, sizeof (int));
for (i = 0; i < a->matches_count; ++i)
{
#ifdef __LP64__
#ifdef EFL64
hash ^= eina_hash_int64((const unsigned long int*) &a->matches[i].signal, sizeof (char *));
hash ^= eina_hash_int64((const unsigned long int*) &a->matches[i].source, sizeof (char *));
hash ^= eina_hash_int64((const unsigned long int*) &a->matches[i].func, sizeof (Edje_Signal_Cb));

View File

@ -97,4 +97,8 @@
#endif
@EINA_CONFIGURE_HAVE_POSIX_SPINLOCK@
#if (defined(__x86_64__) || defined(__x86_64) || defined(__amd64__) || defined(__amd64) || defined(__ppc64__) || defined(_WIN64) || defined(__LP64__) || defined(_LP64))
# define EFL64
#endif
#endif /* EINA_CONFIG_H_ */

View File

@ -163,7 +163,7 @@ _eina_cow_hash_gen(const void *key, int key_length,
return r;
}
#ifdef __LP64__
#ifdef EFL64
static int
_eina_cow_hash64(const void *key, int key_length)
{
@ -355,7 +355,7 @@ eina_cow_add(const char *name, unsigned int struct_size, unsigned int step, cons
goto on_error;
}
#ifdef __LP64__
#ifdef EFL64
cow->match = eina_hash_new(_eina_cow_length,
_eina_cow_cmp,
_eina_cow_hash64,

View File

@ -804,7 +804,7 @@ eina_hash_int64_new(Eina_Free_Cb data_free_cb)
EAPI Eina_Hash *
eina_hash_pointer_new(Eina_Free_Cb data_free_cb)
{
#ifdef __LP64__
#ifdef EFL64
return eina_hash_new(EINA_KEY_LENGTH(_eina_int64_key_length),
EINA_KEY_CMP(_eina_int64_key_cmp),
EINA_KEY_HASH(eina_hash_int64),

View File

@ -1892,7 +1892,7 @@ ethumb_key_cmp(const void *key1, EINA_UNUSED int key1_length,
#undef CMP_PARAM
#define HASH_PARAM_I(Param) r ^= eina_hash_int32((unsigned int*) &e->Param, 0);
#ifdef __LP64__
#ifdef EFL64
# define HASH_PARAM_P(Param) r ^= eina_hash_int64((unsigned long int*) &e->Param, 0);
#else
# define HASH_PARAM_P(Param) r ^= eina_hash_int32((unsigned int*) &e->Param, 0);