Browse Source

* avoid constant evaluation problems if cycling with -Cr

pierre 23 năm trước cách đây
mục cha
commit
2f5a4e8a82
2 tập tin đã thay đổi với 13 bổ sung7 xóa
  1. 5 2
      rtl/win32/keyboard.pp
  2. 8 5
      rtl/win32/sockets.pp

+ 5 - 2
rtl/win32/keyboard.pp

@@ -94,7 +94,7 @@ end;
 { gets the next key from the queue, does wait for new keys }
 function getKeyEventFromQueueWait (VAR t : TKeyEventRecord) : boolean;
 begin
-  WaitForSingleObject (newKeyEvent, INFINITE);
+  WaitForSingleObject (newKeyEvent, dword(INFINITE));
   getKeyEventFromQueueWait := getKeyEventFromQueue (t, false);
 end;
 
@@ -820,7 +820,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.7  2002-05-09 08:28:23  carl
+  Revision 1.8  2002-07-17 07:28:21  pierre
+   * avoid constant evaluation problems if cycling with -Cr
+
+  Revision 1.7  2002/05/09 08:28:23  carl
   * Merges from Fixes branch
 
   Revision 1.2.2.5  2002/01/25 23:12:38  pierre

+ 8 - 5
rtl/win32/sockets.pp

@@ -194,8 +194,8 @@ end;
 { mimic the linux fdWrite/fdRead calls for the file/text socket wrapper }
 function fdWrite(handle : longint;Const bufptr;size : dword) : dword;
 begin
-  fdWrite := WinSock.send(handle, bufptr, size, 0);
-  if fdWrite = SOCKET_ERROR then
+  fdWrite := dword(WinSock.send(handle, bufptr, size, 0));
+  if fdWrite = dword(SOCKET_ERROR) then
   begin
     SocketError := WSAGetLastError;
     fdWrite := 0;
@@ -219,8 +219,8 @@ function fdRead(handle : longint;var bufptr;size : dword) : dword;
        begin
          if size>d then
            size:=d;
-         fdRead := WinSock.recv(handle, bufptr, size, 0);
-         if fdRead = SOCKET_ERROR then
+         fdRead := dword(WinSock.recv(handle, bufptr, size, 0));
+         if fdRead = dword(SOCKET_ERROR) then
          begin
            SocketError:= WSAGetLastError;
            fdRead := 0;
@@ -245,7 +245,10 @@ finalization
 end.
 {
   $Log$
-  Revision 1.7  2002-02-04 21:41:15  michael
+  Revision 1.8  2002-07-17 07:28:21  pierre
+   * avoid constant evaluation problems if cycling with -Cr
+
+  Revision 1.7  2002/02/04 21:41:15  michael
   + merged ixed syntax
 
   Revision 1.6  2002/02/04 21:29:34  michael