mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-22 14:49:10 +02:00
* fixed fpdup2() for non-text files
git-svn-id: trunk@1557 -
This commit is contained in:
parent
f1af7cfe8f
commit
5cd3f3272c
@ -278,8 +278,12 @@ Function FpDup2(var oldfile,newfile:file):cint;
|
|||||||
{
|
{
|
||||||
Copies the filedescriptor oldfile to newfile
|
Copies the filedescriptor oldfile to newfile
|
||||||
}
|
}
|
||||||
|
var
|
||||||
|
tmphandle : word;
|
||||||
begin
|
begin
|
||||||
|
tmphandle := filerec(newfile).handle;
|
||||||
filerec(newfile):=filerec(oldfile);
|
filerec(newfile):=filerec(oldfile);
|
||||||
|
filerec(newfile).handle := tmphandle;
|
||||||
fpDup2:=fpDup2(filerec(oldfile).handle,filerec(newfile).handle);
|
fpDup2:=fpDup2(filerec(oldfile).handle,filerec(newfile).handle);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user