Ver código fonte

Merged revisions 12418-12419 via svnmerge from
svn+ssh://[email protected]/FPC/svn/fpc/trunk

........
r12418 | marco | 2008-12-23 14:57:25 +0100 (Tue, 23 Dec 2008) | 2 lines

* fix for 64-bit signed<->unsigned issue, bug #12841
........
r12419 | marco | 2008-12-23 15:00:59 +0100 (Tue, 23 Dec 2008) | 2 lines

* two more culong(1) shl fixes.
........

git-svn-id: branches/fixes_2_2@12430 -

marco 16 anos atrás
pai
commit
f7c6b6202e
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      rtl/unix/genfdset.inc

+ 3 - 3
rtl/unix/genfdset.inc

@@ -19,7 +19,7 @@ function fpFD_SET(fdno:cint;var nset : TFDSet): cint;
 Begin
    if (fdno<0) or (fdno > FD_MAXFDSET) Then
        exit(-1);
-   nset[fdno shr ln2bitsinword]:=nset[(fdno) shr ln2bitsinword] OR (1 shl ((fdno) and ln2bitmask));
+   nset[fdno shr ln2bitsinword]:=nset[(fdno) shr ln2bitsinword] OR (culong(1) shl ((fdno) and ln2bitmask));
    fpFD_SET:=0;
 End;
 
@@ -28,7 +28,7 @@ function fpFD_CLR(fdno:cint;var nset : TFDSet): cint;
 Begin
    if (fdno<0) or (fdno >  FD_MAXFDSET) Then
        exit(-1);
-   nset[(fdno) shr ln2bitsinword]:=nset[(fdno) shr ln2bitsinword] AND Cardinal(NOT (1 shl ((fdno) and ln2bitmask)));
+   nset[(fdno) shr ln2bitsinword]:=nset[(fdno) shr ln2bitsinword] AND Cardinal(NOT (culong(1) shl ((fdno) and ln2bitmask)));
    fpFD_CLR:=0;
 End;
 
@@ -55,7 +55,7 @@ function fpFD_ISSET(fdno:cint;const nset : TFDSet): cint;
 Begin
    if (fdno<0) or (fdno >  FD_MAXFDSET) Then
        exit(-1);
-    if ((nset[(fdno) shr ln2bitsinword]) and (1 shl ((fdno) and ln2bitmask)))>0 Then
+    if ((nset[fdno shr ln2bitsinword]) and (culong(1) shl ((fdno) and ln2bitmask)))>0 Then
      fpFD_ISSET:=1
     else
      fpFD_ISSET:=0;