summaryrefslogtreecommitdiff
path: root/compiler/cstreams.pas
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2011-09-27 20:22:40 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2011-09-27 20:22:40 +0000
commit8b5b89db30881fce287cda10fc220fc91e4986df (patch)
treea186ac6f47512a8481b5f6f2bdcc08653eb44edd /compiler/cstreams.pas
parent707ed84c1a5daaf21b6dc091aed6cbcc7a5fc5bf (diff)
downloadfpc-8b5b89db30881fce287cda10fc220fc91e4986df.tar.gz
* patch by Alexander Shishkin to clean up $ifopt usage by $push/$pop, resolves #20346
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@19256 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/cstreams.pas')
-rw-r--r--compiler/cstreams.pas20
1 files changed, 10 insertions, 10 deletions
diff --git a/compiler/cstreams.pas b/compiler/cstreams.pas
index ddd6e9c615..9fa995c17c 100644
--- a/compiler/cstreams.pas
+++ b/compiler/cstreams.pas
@@ -371,9 +371,9 @@ begin
If Mode=fmcreate then
begin
system.assign(FHandle,AFileName);
- {$I-}
+ {$push} {$I-}
system.rewrite(FHandle,1);
- {$I+}
+ {$pop}
CStreamError:=IOResult;
end
else
@@ -381,9 +381,9 @@ begin
oldfilemode:=filemode;
filemode:=$40 or Mode;
system.assign(FHandle,AFileName);
- {$I-}
+ {$push} {$I-}
system.reset(FHandle,1);
- {$I+}
+ {$pop}
CStreamError:=IOResult;
filemode:=oldfilemode;
end;
@@ -392,9 +392,9 @@ end;
destructor TCFileStream.Destroy;
begin
- {$I-}
+ {$push} {$I-}
System.Close(FHandle);
- {$I+}
+ {$pop}
CStreamError:=IOResult;
end;
@@ -417,10 +417,10 @@ end;
Procedure TCFileStream.SetSize(NewSize: Longint);
begin
- {$I-}
+ {$push} {$I-}
System.Seek(FHandle,NewSize);
System.Truncate(FHandle);
- {$I+}
+ {$pop}
CStreamError:=IOResult;
end;
@@ -429,7 +429,7 @@ function TCFileStream.Seek(Offset: Longint; Origin: Word): Longint;
var
l : longint;
begin
- {$I-}
+ {$push} {$I-}
case Origin of
soFromBeginning :
begin
@@ -451,7 +451,7 @@ begin
System.Seek(FHandle,l);
end;
end;
- {$I+}
+ {$pop}
CStreamError:=IOResult;
Result:=l;
end;