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

--- Comment #11 from GCC 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:9cdde72d1cefdf2ffff52ad2eec1ff465dccb3ab

commit r15-2949-g9cdde72d1cefdf2ffff52ad2eec1ff465dccb3ab
Author: Gaius Mulley <gaiusm...@gmail.com>
Date:   Fri Aug 16 12:41:11 2024 +0100

    PR modula2/116378 m2 bootstrap fails on x86_64-darwin

    This patch fixes m2 bootstrap failure on x86_64-darwin.  libc_open
    is defined with three parameters the last of which is an int for
    portability (rather than a vararg).  This avoids portability
    problems by promoting mode_t to an int.  In the future it could
    be tidied up by using the m2 optarg extension.

    gcc/m2/ChangeLog:

            PR modula2/116378
            * gm2-libs-iso/TermFile.mod (termOpen): Add third argument
            for open.
            * gm2-libs/libc.def (open): Remove vararg and use INTEGER for
            mode parameter three.
            * mc-boot-ch/Glibc.c (tracedb_open): Replace mode_t with int.
            (libc_open): Rewrite without varargs.
            * mc-boot/Glibc.h (libc_open): Replace varargs with int mode.
            * pge-boot/Glibc.cc (libc_open): Rewrite.
            * pge-boot/Glibc.h (libc_open): Replace varargs with int mode.

    gcc/testsuite/ChangeLog:

            PR modula2/116378
            * gm2/extensions/run/pass/testopen.mod: Add third argument
            for open.
            * gm2/isolib/run/pass/openlibc.mod: Ditto.
            * gm2/pim/run/pass/testaddr3.mod: Ditto.

    Signed-off-by: Gaius Mulley <gaiusm...@gmail.com>

Reply via email to