diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2023-12-11 13:38:19 +0100 |
---|---|---|
committer | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2023-12-11 13:38:19 +0100 |
commit | 8d2e5ad7f1723c9125c2d511c281b4fe62ff29cd (patch) | |
tree | d144b284ec4f2915f06824125926c5f5bfab7399 /gcc | |
parent | 0a569f87cd8436abaa6ac8c0da6e441152904e67 (diff) | |
download | gcc-8d2e5ad7f1723c9125c2d511c281b4fe62ff29cd.zip gcc-8d2e5ad7f1723c9125c2d511c281b4fe62ff29cd.tar.gz gcc-8d2e5ad7f1723c9125c2d511c281b4fe62ff29cd.tar.bz2 |
ada: Fix Ada bootstrap on FreeBSD
Ada bootstrap on FreeBSD/amd64 was also broken by the recent warning
changes:
terminals.c: In function 'allocate_pty_desc':
terminals.c:1200:12: error: implicit declaration of function 'openpty'; did you
mean 'openat'? [-Wimplicit-function-declaration]
1200 | status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
| ^~~~~~~
| openat
terminals.c: At top level:
terminals.c:1268:9: warning: "TABDLY" redefined
1268 | #define TABDLY 0
| ^~~~~~
In file included from /usr/include/termios.h:38,
from terminals.c:1109:
/usr/include/sys/_termios.h:111:9: note: this is the location of the previous definition
111 | #define TABDLY 0x00000004 /* tab delay mask */
| ^~~~~~
make[7]: *** [../gcc-interface/Makefile:302: terminals.o] Error 1
Fixed by including the necessary header and guarding the fallback
definition of TABDLY.
This allowed a 64-bit-only bootstrap on x86_64-unknown-freebsd14.0 to
complete successfully.
2023-12-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc/ada:
* terminals.c [__FreeBSD__]: Include <libutil.h>.
(TABDLY): Only define if missing.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/terminals.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c index 14de0fe..21784b1 100644 --- a/gcc/ada/terminals.c +++ b/gcc/ada/terminals.c @@ -1125,6 +1125,9 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED, #if defined (__APPLE__) # include <util.h> #endif +#if defined (__FreeBSD__) +# include <libutil.h> +#endif #define CDISABLE _POSIX_VDISABLE @@ -1265,11 +1268,13 @@ allocate_pty_desc (pty_desc **desc) { #ifndef NLDLY #define NLDLY 0 #define CRDLY 0 -#define TABDLY 0 #define BSDLY 0 #define VTDLY 0 #define FFDLY 0 #endif +#ifndef TABDLY +#define TABDLY 0 +#endif /* child_setup_tty - set terminal properties * |