[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/engine lib_socket.c,1.7,1.8
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/engine lib_socket.c,1.7,1.8 |
Date: |
Fri, 22 Nov 2002 20:56:29 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv26977/engine
Modified Files:
lib_socket.c
Log Message:
Add the "volatile" keyword to chosen places in the "HostToNetworkOrder"
functions to prevent gcc optimizing away important code that is needed
for the conversion.
Index: lib_socket.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_socket.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** lib_socket.c 20 Sep 2002 03:56:23 -0000 1.7
--- lib_socket.c 23 Nov 2002 01:56:26 -0000 1.8
***************
*** 240,244 ****
ILInt64 _IL_IPAddress_HostToNetworkOrder_l(ILExecThread *thread, ILInt64 host)
{
! unsigned char value[8];
value[0] = (unsigned char)(host >> 56);
value[1] = (unsigned char)(host >> 48);
--- 240,244 ----
ILInt64 _IL_IPAddress_HostToNetworkOrder_l(ILExecThread *thread, ILInt64 host)
{
! unsigned char volatile value[8];
value[0] = (unsigned char)(host >> 56);
value[1] = (unsigned char)(host >> 48);
***************
*** 257,261 ****
ILInt32 _IL_IPAddress_HostToNetworkOrder_i(ILExecThread *thread, ILInt32 host)
{
! unsigned char value[4];
value[0] = (unsigned char)(host >> 24);
value[1] = (unsigned char)(host >> 16);
--- 257,261 ----
ILInt32 _IL_IPAddress_HostToNetworkOrder_i(ILExecThread *thread, ILInt32 host)
{
! unsigned char volatile value[4];
value[0] = (unsigned char)(host >> 24);
value[1] = (unsigned char)(host >> 16);
***************
*** 270,274 ****
ILInt16 _IL_IPAddress_HostToNetworkOrder_s(ILExecThread *thread, ILInt16 host)
{
! unsigned char value[2];
value[0] = (unsigned char)(host >> 8);
value[1] = (unsigned char)host;
--- 270,274 ----
ILInt16 _IL_IPAddress_HostToNetworkOrder_s(ILExecThread *thread, ILInt16 host)
{
! unsigned char volatile value[2];
value[0] = (unsigned char)(host >> 8);
value[1] = (unsigned char)host;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/engine lib_socket.c,1.7,1.8,
Rhys Weatherley <address@hidden> <=