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

--- 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:cf4dcfa6727b89362494bd49e2a28ebd10d767ce

commit r14-912-gcf4dcfa6727b89362494bd49e2a28ebd10d767ce
Author: Gaius Mulley <gaiusm...@gmail.com>
Date:   Tue May 16 15:51:53 2023 +0100

    PR modula2/108344 disable default opening of /dev/tty

    This patch changes removes the static initialisation code for
KeyBoardLEDs.cc.
    The module is only initialised if one of the exported functions is called.
    This is useful as the module will access /dev/tty which might not be
    available.  TimerHandler.mod has also been changed to disable the scroll
    lock LED as a sign of life.

    gcc/m2/ChangeLog:

            PR modula2/108344
            * gm2-libs-coroutines/TimerHandler.mod (EnableLED): New constant.
            (Timer): Test EnableLED before switching on the scroll LED.

    libgm2/ChangeLog:

            PR modula2/108344
            * libm2cor/KeyBoardLEDs.cc (initialize_module): New function.
            (SwitchScroll): Call initialize_module.
            (SwitchNum): Call initialize_module.
            (SwitchCaps): Call initialize_module.
            (SwitchLEDs): Call initialize_module.
            (M2EXPORT): Remove initialization code.

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

Reply via email to