Changeset 476

Show
Ignore:
Timestamp:
02/04/04 17:56:51 (5 years ago)
Author:
jajcus
Message:

- 64-bit fixes (without them this won't work on AMD64 or Alpha)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libxode/include/libxode.h

    r423 r476  
    421421 */ 
    422422 
     423#include <stdint.h> 
     424 
    423425typedef struct { 
    424   unsigned long H[5]; 
    425   unsigned long W[80]; 
    426   int lenW; 
    427   unsigned long sizeHi,sizeLo; 
     426  uint32_t H[5]; 
     427  uint32_t W[80]; 
     428  int32_t lenW; 
     429  uint32_t sizeHi,sizeLo; 
    428430} LIBXODE_SHA_CTX; 
    429431 
  • trunk/libxode/src/sha.c

    r423 r476  
    6464  for (i = 0; i < len; i++) { 
    6565    ctx->W[ctx->lenW / 4] <<= 8; 
    66     ctx->W[ctx->lenW / 4] |= (unsigned long)dataIn[i]; 
     66    ctx->W[ctx->lenW / 4] |= (uint32_t)dataIn[i]; 
    6767    if ((++ctx->lenW) % 64 == 0) { 
    6868      shaHashBlock(ctx); 
     
    123123static void shaHashBlock(LIBXODE_SHA_CTX *ctx) { 
    124124  int t; 
    125   unsigned long A,B,C,D,E,TEMP; 
     125  uint32_t A,B,C,D,E,TEMP; 
    126126 
    127127  for (t = 16; t <= 79; t++) 
  • trunk/libxode/src/str.c

    r260 r476  
    137137    { 
    138138        arg = va_arg(ap,char *); 
    139         if((int)arg == (int)s) 
     139        if((void *)arg == (void *)s) 
    140140            break; 
    141141        else 
     
    186186    { 
    187187        arg = va_arg(ap,char *); 
    188         if((int)arg == (int)p) 
     188        if((void *)arg == (void *)p) 
    189189            break; 
    190190        else