* patch by Serg Bormant: fix fmShareCompat handling for win32/win64/nativent, resolves #23725

git-svn-id: trunk@23542 -
This commit is contained in:
florian 2013-01-29 21:26:17 +00:00
parent ef1c848198
commit 9315eba917
4 changed files with 16 additions and 2 deletions

1
.gitattributes vendored
View File

@ -13156,6 +13156,7 @@ tests/webtbs/tw23503.pp svneol=native#text/pascal
tests/webtbs/tw2351.pp svneol=native#text/plain
tests/webtbs/tw23568.pp -text svneol=native#text/plain
tests/webtbs/tw2363.pp svneol=native#text/plain
tests/webtbs/tw23725.pp svneol=native#text/pascal
tests/webtbs/tw23744.pp svneol=native#text/plain
tests/webtbs/tw2377.pp svneol=native#text/plain
tests/webtbs/tw2378.pp svneol=native#text/plain

View File

@ -329,7 +329,7 @@ begin
if ((filemode and fmshareExclusive) = fmshareExclusive) then
{ no sharing }
else
if (filemode = fmShareCompat) or ((filemode and fmshareDenyWrite) = fmshareDenyWrite) then
if ((filemode and $F0) = fmShareCompat) or ((filemode and fmshareDenyWrite) = fmshareDenyWrite) then
shflags := FILE_SHARE_READ
else
if ((filemode and fmshareDenyRead) = fmshareDenyRead) then

View File

@ -230,7 +230,7 @@ begin
if ((filemode and fmshareExclusive) = fmshareExclusive) then
{ no sharing }
else
if (filemode = fmShareCompat) or ((filemode and fmshareDenyWrite) = fmshareDenyWrite) then
if ((filemode and $f0) = fmShareCompat) or ((filemode and fmshareDenyWrite) = fmshareDenyWrite) then
shflags := file_Share_Read
else
if ((filemode and fmshareDenyRead) = fmshareDenyRead) then

13
tests/webtbs/tw23725.pp Normal file
View File

@ -0,0 +1,13 @@
var
t,t1, t2: text;
s: string;
begin
assign(t,'tw23725.txt');
rewrite(t);
writeln(t);
close(t);
assign(t1, 'tw23725.txt'); assign(t2, 'tw23725.txt');
write('Opening 1... '); reset(t1); writeln('done.');
write('Opening 2... '); reset(t2); writeln('done.');
close(t2); close(t1);
end.