]> granicus.if.org Git - python/commitdiff
get 64bit platforms without uint64 right again
authorChristian Heimes <christian@cheimes.de>
Sun, 14 Oct 2012 02:17:50 +0000 (04:17 +0200)
committerChristian Heimes <christian@cheimes.de>
Sun, 14 Oct 2012 02:17:50 +0000 (04:17 +0200)
Modules/_sha3/sha3module.c

index 38bda75f9da77d0e2b25af27726a0e482050e6ac..ac568b83f9281f69d61f0abe8239e294c2e5328a 100644 (file)
 #ifdef __sparc
   /* On SPARC with Solaris CC opt64 fails with 'invalid address alignment' */
   #define KeccakOpt 32
-#elif SIZEOF_VOID_P == 8
+#elif SIZEOF_VOID_P == 8 && defined(PY_UINT64_T)
+  /* opt64 works only for 64bit platforms with unsigned int64 */
   #define KeccakOpt 64
-#elif SIZEOF_VOID_P == 4
+#else
+  /* opt32 is used for the remaining 32 and 64bit platforms */
   #define KeccakOpt 32
 #endif
 
   #define Unrolling 24
   #define UseBebigokimisa
   typedef PY_UINT64_T UINT64;
-#elif KeccakOpt == 32  && defined(PY_UINT64_T)
+#elif KeccakOpt == 32 && defined(PY_UINT64_T)
   /* 32bit platforms with unsigned int64 */
   #define Unrolling 2
   #define UseSchedule 3