efl: detect 64 bits correctly.
authorCedric Bail <cedric.bail@free.fr>
Sat, 9 Nov 2013 10:48:31 +0000 (19:48 +0900)
committerCedric Bail <cedric.bail@free.fr>
Sat, 9 Nov 2013 10:48:31 +0000 (19:48 +0900)
src/bin/edje/edje_cc_out.c
src/lib/edje/edje_signal.c
src/lib/eina/eina_config.h.in
src/lib/eina/eina_cow.c
src/lib/eina/eina_hash.c
src/lib/ethumb/ethumb.c

index 1c09c3eb3a72883fdb8940e23f6d9e4cb59da94c..d821902473cb87a3549e6afbc274bbc8f2733e9e 100644 (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
index 1ec9b151d14e39ebb73a750cc6cea686a6010b44..b9aa3e9f55c54bdaee02562950073a2021019f8a 100644 (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));
index 72e3ed3eeb5429010001d5bc9892c1bf2ae1211f..5eddfdd61ded5448c146f7ce4f99dcad082e988d 100644 (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_ */
index a2c4e3fbfe7f750a6bfc22e561dbefc930380b80..2488648178a3b773aecb8a5bc28c614f40e9c5bf 100644 (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,
index 87dd68679e9387ec7643c0ef313d6c09dbbc5547..0989f68342418a4efccd32e93990bfd009da29a6 100644 (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),
index eab57a2d8fe421c3bb5abe6824d396c17a189cc1..3c4a96868f32727f5a139060a0ce88d4c9de48a2 100644 (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);