From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8EF0F385E448; Fri, 9 Jul 2021 12:18:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8EF0F385E448 From: "ro at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/101388] New: Unconditional use of __MAX_BAUD Date: Fri, 09 Jul 2021 12:18:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ro at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone cf_gcctarget Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2021 12:18:04 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101388 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 =3D ((t->c_cflag & __MAX_BAUD) =3D=3D __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 =3D ((t->c_cflag & __MAX_BAUD) =3D=3D __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.=