Module Name:    src
Committed By:   rin
Date:           Mon Nov  6 03:27:34 UTC 2017

Modified Files:
        src/external/bsd/nvi/dist/cl: cl_main.c
        src/external/bsd/nvi/dist/ex: ex_script.c
        src/external/bsd/nvi/usr.bin/nvi: Makefile

Log Message:
Introduce HAVE_XXX macros to where they should be.
No binary changes, but possibly improve portability for, e.g.,
sync with pkgsrc version in the near future.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/nvi/dist/cl/cl_main.c
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/nvi/dist/ex/ex_script.c
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/nvi/usr.bin/nvi/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/nvi/dist/cl/cl_main.c
diff -u src/external/bsd/nvi/dist/cl/cl_main.c:1.7 src/external/bsd/nvi/dist/cl/cl_main.c:1.8
--- src/external/bsd/nvi/dist/cl/cl_main.c:1.7	Mon Nov  6 03:10:26 2017
+++ src/external/bsd/nvi/dist/cl/cl_main.c	Mon Nov  6 03:27:34 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: cl_main.c,v 1.7 2017/11/06 03:10:26 rin Exp $ */
+/*	$NetBSD: cl_main.c,v 1.8 2017/11/06 03:27:34 rin Exp $ */
 /*-
  * Copyright (c) 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
@@ -16,7 +16,7 @@
 static const char sccsid[] = "Id: cl_main.c,v 10.54 2001/07/29 19:07:27 skimo Exp  (Berkeley) Date: 2001/07/29 19:07:27 ";
 #endif /* not lint */
 #else
-__RCSID("$NetBSD: cl_main.c,v 1.7 2017/11/06 03:10:26 rin Exp $");
+__RCSID("$NetBSD: cl_main.c,v 1.8 2017/11/06 03:27:34 rin Exp $");
 #endif
 
 #include <sys/types.h>
@@ -292,6 +292,7 @@ static void
 h_winch(int signo)
 {
 	GLOBAL_CLP;
+#ifdef HAVE_SIGTIMEDWAIT
 	sigset_t sigset;
 	struct timespec timeout;
 
@@ -308,6 +309,7 @@ h_winch(int signo)
 	timeout.tv_nsec = 100 * 1000 * 1000;
 	while (sigtimedwait(&sigset, NULL, &timeout) != -1)
 		continue;
+#endif
 
 	F_SET(clp, CL_SIGWINCH);
 

Index: src/external/bsd/nvi/dist/ex/ex_script.c
diff -u src/external/bsd/nvi/dist/ex/ex_script.c:1.7 src/external/bsd/nvi/dist/ex/ex_script.c:1.8
--- src/external/bsd/nvi/dist/ex/ex_script.c:1.7	Mon Dec 19 17:51:40 2016
+++ src/external/bsd/nvi/dist/ex/ex_script.c	Mon Nov  6 03:27:34 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ex_script.c,v 1.7 2016/12/19 17:51:40 rin Exp $ */
+/*	$NetBSD: ex_script.c,v 1.8 2017/11/06 03:27:34 rin Exp $ */
 /*-
  * Copyright (c) 1992, 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
@@ -19,7 +19,7 @@
 static const char sccsid[] = "Id: ex_script.c,v 10.38 2001/06/25 15:19:19 skimo Exp  (Berkeley) Date: 2001/06/25 15:19:19 ";
 #endif /* not lint */
 #else
-__RCSID("$NetBSD: ex_script.c,v 1.7 2016/12/19 17:51:40 rin Exp $");
+__RCSID("$NetBSD: ex_script.c,v 1.8 2017/11/06 03:27:34 rin Exp $");
 #endif
 
 #include <sys/types.h>
@@ -45,7 +45,7 @@ __RCSID("$NetBSD: ex_script.c,v 1.7 2016
 #include <string.h>
 #include <termios.h>
 #include <unistd.h>
-#ifdef __NetBSD__
+#ifdef HAVE_UTIL_H
 #include <util.h>
 #endif
 
@@ -58,7 +58,7 @@ static void	sscr_check __P((SCR *));
 static int	sscr_getprompt __P((SCR *));
 static int	sscr_init __P((SCR *));
 static int	sscr_insert __P((SCR *));
-#ifdef __NetBSD__
+#ifdef HAVE_OPENPTY
 #define	sscr_pty openpty
 #else
 static int	sscr_pty __P((int *, int *, char *, struct termios *, void *));
@@ -587,7 +587,7 @@ sscr_check(SCR *sp)
 	F_CLR(gp, G_SCRWIN);
 }
 
-#ifndef __NetBSD__
+#ifndef HAVE_OPENPTY
 #ifdef HAVE_SYS5_PTY
 static int ptys_open __P((int, char *));
 static int ptym_open __P((char *));
@@ -755,4 +755,4 @@ sscr_pty(amaster, aslave, name, termp, w
 }
 
 #endif /* HAVE_SYS5_PTY */
-#endif /* !__NetBSD__ */
+#endif /* !HAVE_OPENPTY */

Index: src/external/bsd/nvi/usr.bin/nvi/Makefile
diff -u src/external/bsd/nvi/usr.bin/nvi/Makefile:1.7 src/external/bsd/nvi/usr.bin/nvi/Makefile:1.8
--- src/external/bsd/nvi/usr.bin/nvi/Makefile:1.7	Sat Nov 28 13:20:03 2015
+++ src/external/bsd/nvi/usr.bin/nvi/Makefile	Mon Nov  6 03:27:34 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2015/11/28 13:20:03 christos Exp $
+#	$NetBSD: Makefile,v 1.8 2017/11/06 03:27:34 rin Exp $
 
 .include <bsd.own.mk>
 
@@ -7,6 +7,9 @@ USE_WIDECHAR?=yes
 CWARNFLAGS.clang+=	-Wno-uninitialized -Wno-format-security
 
 CPPFLAGS+=-I${DIST}/include -I${.CURDIR} -I. -DGTAGS
+CPPFLAGS+=-DHAVE_OPENPTY -DHAVE_UTIL_H
+CPPFLAGS+=-DHAVE_SIGTIMEDWAIT 
+
 #DBG=-g
 #CPPFLAGS+=-DLOGDEBUG -DTRACE
 #CPPFLAGS+=-DDBDEBUG -DTRACE

Reply via email to