TAB0 might not be defined in termios.h #2483

- OpenBSD termios.h does not have TAB0, skip
  its use if it is not defined
This commit is contained in:
Rui Abreu Ferreira 2015-04-22 16:39:58 +01:00 committed by Justin M. Keyes
parent f26e35279d
commit 1383c5f6cb

View File

@ -205,7 +205,10 @@ static void init_termios(struct termios *termios) FUNC_ATTR_NONNULL_ALL
memset(termios, 0, sizeof(struct termios)); memset(termios, 0, sizeof(struct termios));
// Taken from pangoterm // Taken from pangoterm
termios->c_iflag = ICRNL|IXON; termios->c_iflag = ICRNL|IXON;
termios->c_oflag = OPOST|ONLCR|TAB0; termios->c_oflag = OPOST|ONLCR;
#ifdef TAB0
termios->c_oflag |= TAB0;
#endif
termios->c_cflag = CS8|CREAD; termios->c_cflag = CS8|CREAD;
termios->c_lflag = ISIG|ICANON|IEXTEN|ECHO|ECHOE|ECHOK; termios->c_lflag = ISIG|ICANON|IEXTEN|ECHO|ECHOE|ECHOK;