Patch for 64-bit libyahoo
Burt Holzman <[email protected]>
| Newsgroups | gmane.network.instant-messaging.ayttm.user |
|---|---|
| Message-ID | <[email protected]> |
Phillip and company,
I was unable to login to yahoo on an EM64T machine without the following
patch. I know there are probably some portability issues with yahoo
file xfer as well, but I don't use that ...
- B
--------
Index: sha.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/yahoo2/libyahoo2/sha.c,v
retrieving revision 1.1
diff -u -r1.1 sha.c
--- sha.c 28 Sep 2003 12:29:03 -0000 1.1
+++ sha.c 7 Jul 2005 16:14:55 -0000
@@ -50,7 +50,7 @@
*/
for (i = 0; i < len; i++) {
ctx->W[ctx->lenW / 4] <<= 8;
- ctx->W[ctx->lenW / 4] |= (unsigned long)dataIn[i];
+ ctx->W[ctx->lenW / 4] |= (uint32)dataIn[i];
if ((++ctx->lenW) % 64 == 0) {
shaHashBlock(ctx);
ctx->lenW = 0;
@@ -109,7 +109,7 @@
static void shaHashBlock(SHA_CTX *ctx) {
int t;
- unsigned long A,B,C,D,E,TEMP;
+ uint32 A,B,C,D,E,TEMP;
for (t = 16; t <= 79; t++)
ctx->W[t] =
Index: sha.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/yahoo2/libyahoo2/sha.h,v
retrieving revision 1.2
diff -u -r1.2 sha.h
--- sha.h 14 Jan 2004 22:35:29 -0000 1.2
+++ sha.h 7 Jul 2005 16:14:55 -0000
@@ -12,10 +12,10 @@
int strprintsha(char *dest, int *hashval);
typedef struct {
- unsigned long H[5];
- unsigned long W[80];
+ uint32 H[5];
+ uint32 W[80];
int lenW;
- unsigned long sizeHi,sizeLo;
+ uint32 sizeHi,sizeLo;
} SHA_CTX;
void shaInit(SHA_CTX *ctx);
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click