public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/101388] New: Unconditional use of __MAX_BAUD
@ 2021-07-09 12:18 ro at gcc dot gnu.org
  2021-08-15 13:38 ` [Bug modula2/101388] " gaiusmod2 at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ro at gcc dot gnu.org @ 2021-07-09 12:18 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-01-18 11:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09 12:18 [Bug modula2/101388] New: Unconditional use of __MAX_BAUD ro at gcc dot gnu.org
2021-08-15 13:38 ` [Bug modula2/101388] " gaiusmod2 at gmail dot com
2021-08-15 21:29 ` pinskia at gcc dot gnu.org
2021-09-14 10:05 ` ro at gcc dot gnu.org
2021-09-14 10:08 ` ro at gcc dot gnu.org
2021-10-13 17:04 ` gaiusmod2 at gmail dot com
2022-01-18 11:32 ` gaius at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).