https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101388
--- Comment #1 from Gaius Mulley <gaiusmod2 at gmail dot com> --- "ro at gcc dot gnu.org" <gcc-bugzi...@gcc.gnu.org> writes: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101388 > > Bug ID: 101388 > Summary: Unconditional use of __MAX_BAUD > Product: gcc > Version: 12.0 > Status: UNCONFIRMED > Severity: normal > Priority: P3 > Component: modula2 > Assignee: unassigned at gcc dot gnu.org > Reporter: ro at gcc dot gnu.org > CC: gaiusmod2 at gmail dot com > Target Milestone: --- > Target: *-*-solaris2.11 > > Building the devel/modula-2 branch on Solaris 11 fails with undefined > references > to __MAX_BAUD in two places: > > /vol/gcc/src/git/modula-2/gcc/m2/mc-boot-ch/Gtermios.c: In function > 'termios_GetFlag': > /vol/gcc/src/git/modula-2/gcc/m2/mc-boot-ch/Gtermios.c:872:27: error: > '__MAX_BAUD' undeclared (first use in this function) > *b = ((t->c_cflag & __MAX_BAUD) == __MAX_BAUD); > ^~~~~~~~~~ > > /vol/gcc/src/git/modula-2/gcc/m2/gm2-libs-ch/termios.c: In function > 'termios_GetFlag': > /vol/gcc/src/git/modula-2/gcc/m2/gm2-libs-ch/termios.c:877:27: error: > '__MAX_BAUD' undeclared (first use in this function) > 877 | *b = ((t->c_cflag & __MAX_BAUD) == __MAX_BAUD); > | ^~~~~~~~~~ > __MAX_BAUD seems to be Linux/glibc specific, but the current problem is > obviously > cause by a wrong guard which checks for defined(MAX) instead of > defined(__MAX_BAUD). > > Correcting this lets the build continue. many thanks for the report - now fixed in the git repro, regards, Gaius