Module Name: src
Committed By: joerg
Date: Thu Apr 23 00:03:41 UTC 2020
Modified Files:
src/libexec/telnetd: ext.h global.c
Log Message:
Don't play #define games with extern, just have a separate list to avoid commons
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/libexec/telnetd/ext.h
cvs rdiff -u -r1.8 -r1.9 src/libexec/telnetd/global.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/libexec/telnetd/ext.h
diff -u src/libexec/telnetd/ext.h:1.22 src/libexec/telnetd/ext.h:1.23
--- src/libexec/telnetd/ext.h:1.22 Tue Jan 10 23:39:11 2012
+++ src/libexec/telnetd/ext.h Thu Apr 23 00:03:40 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ext.h,v 1.22 2012/01/10 23:39:11 joerg Exp $ */
+/* $NetBSD: ext.h,v 1.23 2020/04/23 00:03:40 joerg Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -179,7 +179,7 @@ extern char *nclearto;
* The following are some clocks used to decide how to interpret
* the relationship between various variables.
*/
-extern struct {
+extern struct clockstate {
int
system, /* what the current time is */
echotoggle, /* last time user entered echo character */
Index: src/libexec/telnetd/global.c
diff -u src/libexec/telnetd/global.c:1.8 src/libexec/telnetd/global.c:1.9
--- src/libexec/telnetd/global.c:1.8 Thu Aug 7 09:46:51 2003
+++ src/libexec/telnetd/global.c Thu Apr 23 00:03:40 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: global.c,v 1.8 2003/08/07 09:46:51 agc Exp $ */
+/* $NetBSD: global.c,v 1.9 2020/04/23 00:03:40 joerg Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)global.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: global.c,v 1.8 2003/08/07 09:46:51 agc Exp $");
+__RCSID("$NetBSD: global.c,v 1.9 2020/04/23 00:03:40 joerg Exp $");
#endif
#endif /* not lint */
@@ -47,5 +47,50 @@ __RCSID("$NetBSD: global.c,v 1.8 2003/08
*/
#include <defs.h>
-#define extern
#include <ext.h>
+
+char options[256];
+char do_dont_resp[256];
+char will_wont_resp[256];
+int linemode; /* linemode on/off */
+#ifdef LINEMODE
+int uselinemode; /* what linemode to use (on/off) */
+int editmode; /* edit modes in use */
+int useeditmode; /* edit modes to use */
+int alwayslinemode; /* command line option */
+# ifdef KLUDGELINEMODE
+int lmodetype; /* Client support for linemode */
+# endif /* KLUDGELINEMODE */
+#endif /* LINEMODE */
+int flowmode; /* current flow control state */
+int restartany; /* restart output on any character state */
+#ifdef DIAGNOSTICS
+int diagnostic; /* telnet diagnostic capabilities */
+#endif /* DIAGNOSTICS */
+#ifdef SECURELOGIN
+int require_secure_login;
+#endif
+#ifdef AUTHENTICATION
+int auth_level;
+#endif
+
+slcfun slctab[NSLC + 1]; /* slc mapping table */
+char terminaltype[41];
+
+/*
+ * I/O data buffers, pointers, and counters.
+ */
+char ptyobuf[BUFSIZ+NETSLOP], *pfrontp, *pbackp;
+char netibuf[BUFSIZ], *netip;
+char netobuf[BUFSIZ+NETSLOP], *nfrontp, *nbackp;
+char *neturg; /* one past last bye of urgent data */
+int pcc, ncc;
+int pty, net;
+char *line;
+int SYNCHing; /* we are in TELNET SYNCH mode */
+
+#ifdef ENCRYPTION
+char *nclearto;
+#endif /* ENCRYPTION */
+
+struct clockstate clocks;