storage32.c fix for big endian arch

Phil Krylov phil at newstar.rinet.ru
Tue May 17 18:24:00 CDT 2005


Please disregard, Pierre d'Herbemont already sent the same few hours
before :)

-- Ph.

On Tue, 17 May 2005 21:41:41 +0400
Phil Krylov <phil at newstar.rinet.ru> wrote:

> ChangeLog:
> 
> Fixed storage32.c compilation in big endian architectures.
> 
> Patch:
> 
> Index: dlls/ole32/storage32.c
> ===================================================================
> RCS file: /home/wine/wine/dlls/ole32/storage32.c,v
> retrieving revision 1.87
> diff -p -u -r1.87 storage32.c
> --- dlls/ole32/storage32.c	14 May 2005 11:06:44 -0000	1.87
> +++ dlls/ole32/storage32.c	17 May 2005 17:20:06 -0000
> @@ -4130,8 +4130,8 @@ void StorageUtl_ReadULargeInteger(const 
>      ULARGE_INTEGER tmp;
>  
>      memcpy(&tmp, buffer + offset, sizeof(ULARGE_INTEGER));
> -    value->LowPart = htole32(tmp.HighPart);
> -    value->HighPart = htole32(tmp.LowPart);
> +    value->u.LowPart = htole32(tmp.u.HighPart);
> +    value->u.HighPart = htole32(tmp.u.LowPart);
>  #else
>      memcpy(value, buffer + offset, sizeof(ULARGE_INTEGER));
>  #endif
> @@ -4143,8 +4143,8 @@ void StorageUtl_WriteULargeInteger(BYTE*
>  #ifdef WORDS_BIGENDIAN
>      ULARGE_INTEGER tmp;
>  
> -    tmp.LowPart = htole32(value->HighPart);
> -    tmp.HighPart = htole32(value->LowPart);
> +    tmp.u.LowPart = htole32(value->u.HighPart);
> +    tmp.u.HighPart = htole32(value->u.LowPart);
>      memcpy(buffer + offset, &tmp, sizeof(ULARGE_INTEGER));
>  #else
>      memcpy(buffer + offset, value, sizeof(ULARGE_INTEGER));
> 
> 



More information about the wine-patches mailing list