https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109830

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Gaius Mulley <ga...@gcc.gnu.org>:

https://gcc.gnu.org/g:1953c0cfb006a696723baa7d5ea14038f6d901a4

commit r14-795-g1953c0cfb006a696723baa7d5ea14038f6d901a4
Author: Gaius Mulley <gaiusm...@gmail.com>
Date:   Fri May 12 17:44:29 2023 +0100

    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 <gaiusm...@gmail.com>

Reply via email to