* ...
* HASH_LONG Nl,Nh;
* HASH_LONG data[HASH_LBLOCK];
- * int num;
+ * unsigned int num;
* ...
* } HASH_CTX;
* HASH_UPDATE
: "cc"); \
ret; \
})
-# elif defined(__powerpc) || defined(__ppc)
+# elif defined(__powerpc) || defined(__ppc__) || defined(__powerpc64__)
# define ROTATE(a,n) ({ register unsigned int ret; \
asm ( \
"rlwinm %0,%1,%2,0,31" \
* this trick on x86* platforms only, because these CPUs can fetch
* unaligned data without raising an exception.
*/
-# define HOST_c2l(c,l) ({ (l)=*((const unsigned int *)(c)); \
- asm ("bswapl %0":"=r"(l):"0"(l)); \
- (c)+=4; (l); })
+# define HOST_c2l(c,l) ({ unsigned int r=*((const unsigned int *)(c)); \
+ asm ("bswapl %0":"=r"(r):"0"(r)); \
+ (c)+=4; (l)=r; })
# define HOST_l2c(l,c) ({ unsigned int r=(l); \
asm ("bswapl %0":"=r"(r):"0"(r)); \
*((unsigned int *)(c))=r; (c)+=4; r; })
const unsigned char *data=data_;
register HASH_LONG * p;
register HASH_LONG l;
- unsigned int sw,sc,ew,ec;
+ size_t sw,sc,ew,ec;
if (len==0) return 1;
}
else
{
- c->num+=len;
+ c->num+=(unsigned int)len;
if ((sc+len) < 4) /* ugly, add char's to a word */
{
l=p[sw]; HOST_p_c2l_p(data,l,sc,len); p[sw]=l;