diff options
author | Gaius Mulley <gaiusmod2@gmail.com> | 2023-05-12 17:44:29 +0100 |
---|---|---|
committer | Gaius Mulley <gaiusmod2@gmail.com> | 2023-05-12 17:44:29 +0100 |
commit | 1953c0cfb006a696723baa7d5ea14038f6d901a4 (patch) | |
tree | 3e27d0edecc39fb37eba3ef85559367d9c885677 /libgcc | |
parent | 75aa95694ed9bab50b5e152f7a755eb5f5e8014e (diff) | |
download | gcc-1953c0cfb006a696723baa7d5ea14038f6d901a4.zip gcc-1953c0cfb006a696723baa7d5ea14038f6d901a4.tar.gz gcc-1953c0cfb006a696723baa7d5ea14038f6d901a4.tar.bz2 |
PR modula2/109830 m2iso library SeqFile.mod appending to a file overwrites content
This patch is for the m2iso library SeqFile.mod to fix a bug when a
file is opened using OpenAppend. The patch checks to see if the file
exists and it uses FIO.OpenForRandom to ensure the file is not
overwritten.
gcc/m2/ChangeLog:
PR modula2/109830
* gm2-libs-iso/SeqFile.mod (newCid): New parameter toAppend
used to select FIO.OpenForRandom.
(OpenRead): Pass extra parameter to newCid.
(OpenWrite): Pass extra parameter to newCid.
(OpenAppend): Pass extra parameter to newCid.
gcc/testsuite/ChangeLog:
PR modula2/109830
* gm2/isolib/run/pass/seqappend.mod: New test.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions