head 1.7; access; symbols pkgsrc-2026Q1:1.7.0.74 pkgsrc-2026Q1-base:1.7 pkgsrc-2025Q4:1.7.0.72 pkgsrc-2025Q4-base:1.7 pkgsrc-2025Q3:1.7.0.70 pkgsrc-2025Q3-base:1.7 pkgsrc-2025Q2:1.7.0.68 pkgsrc-2025Q2-base:1.7 pkgsrc-2025Q1:1.7.0.66 pkgsrc-2025Q1-base:1.7 pkgsrc-2024Q4:1.7.0.64 pkgsrc-2024Q4-base:1.7 pkgsrc-2024Q3:1.7.0.62 pkgsrc-2024Q3-base:1.7 pkgsrc-2024Q2:1.7.0.60 pkgsrc-2024Q2-base:1.7 pkgsrc-2024Q1:1.7.0.58 pkgsrc-2024Q1-base:1.7 pkgsrc-2023Q4:1.7.0.56 pkgsrc-2023Q4-base:1.7 pkgsrc-2023Q3:1.7.0.54 pkgsrc-2023Q3-base:1.7 pkgsrc-2023Q2:1.7.0.52 pkgsrc-2023Q2-base:1.7 pkgsrc-2023Q1:1.7.0.50 pkgsrc-2023Q1-base:1.7 pkgsrc-2022Q4:1.7.0.48 pkgsrc-2022Q4-base:1.7 pkgsrc-2022Q3:1.7.0.46 pkgsrc-2022Q3-base:1.7 pkgsrc-2022Q2:1.7.0.44 pkgsrc-2022Q2-base:1.7 pkgsrc-2022Q1:1.7.0.42 pkgsrc-2022Q1-base:1.7 pkgsrc-2021Q4:1.7.0.40 pkgsrc-2021Q4-base:1.7 pkgsrc-2021Q3:1.7.0.38 pkgsrc-2021Q3-base:1.7 pkgsrc-2021Q2:1.7.0.36 pkgsrc-2021Q2-base:1.7 pkgsrc-2021Q1:1.7.0.34 pkgsrc-2021Q1-base:1.7 pkgsrc-2020Q4:1.7.0.32 pkgsrc-2020Q4-base:1.7 pkgsrc-2020Q3:1.7.0.30 pkgsrc-2020Q3-base:1.7 pkgsrc-2020Q2:1.7.0.26 pkgsrc-2020Q2-base:1.7 pkgsrc-2020Q1:1.7.0.6 pkgsrc-2020Q1-base:1.7 pkgsrc-2019Q4:1.7.0.28 pkgsrc-2019Q4-base:1.7 pkgsrc-2019Q3:1.7.0.24 pkgsrc-2019Q3-base:1.7 pkgsrc-2019Q2:1.7.0.22 pkgsrc-2019Q2-base:1.7 pkgsrc-2019Q1:1.7.0.20 pkgsrc-2019Q1-base:1.7 pkgsrc-2018Q4:1.7.0.18 pkgsrc-2018Q4-base:1.7 pkgsrc-2018Q3:1.7.0.16 pkgsrc-2018Q3-base:1.7 pkgsrc-2018Q2:1.7.0.14 pkgsrc-2018Q2-base:1.7 pkgsrc-2018Q1:1.7.0.12 pkgsrc-2018Q1-base:1.7 pkgsrc-2017Q4:1.7.0.10 pkgsrc-2017Q4-base:1.7 pkgsrc-2017Q3:1.7.0.8 pkgsrc-2017Q3-base:1.7 pkgsrc-2017Q2:1.7.0.4 pkgsrc-2017Q2-base:1.7 pkgsrc-2017Q1:1.7.0.2 pkgsrc-2017Q1-base:1.7 pkgsrc-2016Q4:1.6.0.28 pkgsrc-2016Q4-base:1.6 pkgsrc-2016Q3:1.6.0.26 pkgsrc-2016Q3-base:1.6 pkgsrc-2016Q2:1.6.0.24 pkgsrc-2016Q2-base:1.6 pkgsrc-2016Q1:1.6.0.22 pkgsrc-2016Q1-base:1.6 pkgsrc-2015Q4:1.6.0.20 pkgsrc-2015Q4-base:1.6 pkgsrc-2015Q3:1.6.0.18 pkgsrc-2015Q3-base:1.6 pkgsrc-2015Q2:1.6.0.16 pkgsrc-2015Q2-base:1.6 pkgsrc-2015Q1:1.6.0.14 pkgsrc-2015Q1-base:1.6 pkgsrc-2014Q4:1.6.0.12 pkgsrc-2014Q4-base:1.6 pkgsrc-2014Q3:1.6.0.10 pkgsrc-2014Q3-base:1.6 pkgsrc-2014Q2:1.6.0.8 pkgsrc-2014Q2-base:1.6 pkgsrc-2014Q1:1.6.0.6 pkgsrc-2014Q1-base:1.6 pkgsrc-2013Q4:1.6.0.4 pkgsrc-2013Q4-base:1.6 pkgsrc-2013Q3:1.6.0.2 pkgsrc-2013Q3-base:1.6 pkgsrc-2013Q2:1.5.0.12 pkgsrc-2013Q2-base:1.5 pkgsrc-2013Q1:1.5.0.10 pkgsrc-2013Q1-base:1.5 pkgsrc-2012Q4:1.5.0.8 pkgsrc-2012Q4-base:1.5 pkgsrc-2012Q3:1.5.0.6 pkgsrc-2012Q3-base:1.5 pkgsrc-2012Q2:1.5.0.4 pkgsrc-2012Q2-base:1.5 pkgsrc-2012Q1:1.5.0.2 pkgsrc-2012Q1-base:1.5 pkgsrc-2011Q4:1.4.0.2 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q3:1.3.0.38 pkgsrc-2011Q3-base:1.3 pkgsrc-2011Q2:1.3.0.36 pkgsrc-2011Q2-base:1.3 pkgsrc-2011Q1:1.3.0.34 pkgsrc-2011Q1-base:1.3 pkgsrc-2010Q4:1.3.0.32 pkgsrc-2010Q4-base:1.3 pkgsrc-2010Q3:1.3.0.30 pkgsrc-2010Q3-base:1.3 pkgsrc-2010Q2:1.3.0.28 pkgsrc-2010Q2-base:1.3 pkgsrc-2010Q1:1.3.0.26 pkgsrc-2010Q1-base:1.3 pkgsrc-2009Q4:1.3.0.24 pkgsrc-2009Q4-base:1.3 pkgsrc-2009Q3:1.3.0.22 pkgsrc-2009Q3-base:1.3 pkgsrc-2009Q2:1.3.0.20 pkgsrc-2009Q2-base:1.3 pkgsrc-2009Q1:1.3.0.18 pkgsrc-2009Q1-base:1.3 pkgsrc-2008Q4:1.3.0.16 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.14 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.12 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.10 pkgsrc-2008Q2-base:1.3 cwrapper:1.3.0.8 pkgsrc-2008Q1:1.3.0.6 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.4 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.2 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.2.0.38 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.36 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.34 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.32 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.30 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.28 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.26 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.24 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.22 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.20 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.18 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.16 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.14 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.2.0.12 pkgsrc-2004Q1-base:1.2 pkgsrc-2003Q4:1.2.0.10 pkgsrc-2003Q4-base:1.2 netbsd-1-6-1:1.2.0.6 netbsd-1-6-1-base:1.2 netbsd-1-6:1.2.0.8 netbsd-1-6-RELEASE-base:1.2 pkgviews:1.2.0.4 pkgviews-base:1.2 buildlink2:1.2.0.2 buildlink2-base:1.2 netbsd-1-5-PATCH003:1.2 netbsd-1-5-PATCH001:1.2 netbsd-1-5-RELEASE:1.2 netbsd-1-4-PATCH003:1.2 netbsd-1-4-PATCH002:1.2 comdex-fall-1999:1.2 netbsd-1-4-PATCH001:1.2 netbsd-1-4-RELEASE:1.2 netbsd-1-3-PATCH003:1.2 netbsd-1-3-PATCH002:1.1; locks; strict; comment @# @; 1.7 date 2017.02.17.17.00.03; author joerg; state Exp; branches; next 1.6; commitid MrbD1g67qhU7kkGz; 1.6 date 2013.09.10.14.15.11; author joerg; state Exp; branches; next 1.5; commitid tUlnKWW8EwlsMT4x; 1.5 date 2012.02.16.17.32.45; author hans; state Exp; branches; next 1.4; 1.4 date 2011.11.25.21.34.34; author joerg; state Exp; branches; next 1.3; 1.3 date 2007.10.10.16.53.58; author rillig; state Exp; branches; next 1.2; 1.2 date 98.08.07.10.36.44; author agc; state Exp; branches; next 1.1; 1.1 date 98.03.20.11.05.17; author frueauf; state Exp; branches; next ; desc @@ 1.7 log @Add missing includes. @ text @$NetBSD: patch-ab,v 1.6 2013/09/10 14:15:11 joerg Exp $ --- common/ttio.c.orig 1997-02-21 23:06:09.000000000 +0000 +++ common/ttio.c @@@@ -45,12 +45,21 @@@@ static char copyright[] = #include "osdep.h" #include "cdefs.h" #include "global.h" +#include #include #include #include #include "mcap.h" #include "ttio.h" #include +#include +#include +#include +#ifndef __sun +#include +#else +#include +#endif static void dectl PROTO ((char *, int, char *, int, char *)); @@@@ -73,6 +82,16 @@@@ int ttsetup (name) { if (chown (nbuf, pw -> pw_uid, pw -> pw_gid) < 0) warn ("Can't set owner on %s: %m", nbuf); +#ifdef __NetBSD__ + if (chmod (nbuf, 0600) < 0) + warn ("Can't set mode on %s: %m", nbuf); + revoke(nbuf); + if (ttyaction(nbuf, "modemd", "root")) + warn ("Can't ttyaction %s: %m", nbuf); + + /* delay open so DTR stays down long enough to be detected */ + usleep(100); +#endif } /* Open the terminal device. */ @@@@ -131,20 +150,19 @@@@ int ttsetup (name) return fd; } -void ttnormal (fd) +void ttnormal (int fd) { NORMAL_TTY (ts); PUT_TTY_STATE (fd, ts); } -void tthupcl (fd) +void tthupcl (int fd) { HUPCL_TTY (ts); PUT_TTY_STATE (fd, ts); } -void redirect_std (fd) - int fd; +void redirect_std (int fd) { int i; @@@@ -203,10 +221,8 @@@@ static int tteof = 0; /* Match the specified string with input from the specified tty. Return nonzero if input matches, zero if not. */ -ttmatch (ANSI_DECL (int) tty, ANSI_DECL (int) timeout, VA_DOTDOTDOT) - KandR (int tty;) - KandR (int timeout;) - va_dcl +int +ttmatch (int tty, int timeout, ...) { TIME entry, now, to; int cur, curmatch, next; @@@@ -230,7 +246,7 @@@@ ttmatch (ANSI_DECL (int) tty, ANSI_DECL match, try reading some more data from the tty... */ matchID = 1; VA_start (list, timeout); - while (string = va_arg (list, char *)) + while ((string = va_arg (list, char *))) { syslog (LOG_DEBUG, "Matching against %s", string); for (cur = ttstart; cur != ttend; cur = NEXT (cur)) @@@@ -316,9 +332,7 @@@@ ttmatch (ANSI_DECL (int) tty, ANSI_DECL } /* Read a connect speed from standard in... */ -ttread_connect_speed (tty, timeout) - int tty; - int timeout; +int ttread_connect_speed (int tty, int timeout) { TIME entry, now, to; int status; @ 1.6 log @Fix operator precendence. Include missing header. Use socklen_t. Don't pass formatted buffers as format string. Bump revision. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.5 2012/02/16 17:32:45 hans Exp $ d5 1 a5 1 @@@@ -45,12 +45,20 @@@@ static char copyright[] = d17 1 d27 1 a27 1 @@@@ -73,6 +81,16 @@@@ int ttsetup (name) d44 1 a44 1 @@@@ -131,20 +149,19 @@@@ int ttsetup (name) d68 1 a68 1 @@@@ -203,10 +220,8 @@@@ static int tteof = 0; d81 1 a81 1 @@@@ -230,7 +245,7 @@@@ ttmatch (ANSI_DECL (int) tty, ANSI_DECL d90 1 a90 1 @@@@ -316,9 +331,7 @@@@ ttmatch (ANSI_DECL (int) tty, ANSI_DECL @ 1.5 log @Fix build on SunOS. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.4 2011/11/25 21:34:34 joerg Exp $ d5 1 a5 1 @@@@ -45,12 +45,19 @@@@ static char copyright[] = d17 1 d26 1 a26 1 @@@@ -73,6 +76,16 @@@@ int ttsetup (name) d43 1 a43 1 @@@@ -131,20 +144,19 @@@@ int ttsetup (name) d67 1 a67 1 @@@@ -203,10 +215,8 @@@@ static int tteof = 0; d80 10 a89 1 @@@@ -316,9 +326,7 @@@@ ttmatch (ANSI_DECL (int) tty, ANSI_DECL @ 1.4 log @Fix various missing includes. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.3 2007/10/10 16:53:58 rillig Exp $ d5 1 a5 1 @@@@ -45,12 +45,15 @@@@ static char copyright[] = d17 1 d19 3 @ 1.3 log @Fixed implicit function declarations. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.2 1998/08/07 10:36:44 agc Exp $ d4 9 a12 2 +++ common/ttio.c 2007-10-10 16:48:38.000000000 +0000 @@@@ -51,6 +51,7 @@@@ static char copyright[] = d17 1 d21 1 a21 1 @@@@ -73,6 +74,16 @@@@ int ttsetup (name) d38 48 @ 1.2 log @Add NetBSD RCS Ids. @ text @d1 1 a1 1 $NetBSD$ d3 11 a13 3 --- common/ttio.c.orig Sat Feb 22 00:06:09 1997 +++ common/ttio.c Tue Mar 3 17:19:06 1998 @@@@ -73,6 +73,16 @@@@ @ 1.1 log @Initial import of modemd package done by Ty Sarna with little cleanups/modifications by me. Closes pr 4678. @ text @d1 2 @