Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/nvi Introduce HAVE_XXX macros to where they sho...



details:   https://anonhg.NetBSD.org/src/rev/47d46c0436b3
branches:  trunk
changeset: 357326:47d46c0436b3
user:      rin <rin%NetBSD.org@localhost>
date:      Mon Nov 06 03:27:34 2017 +0000

description:
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.

diffstat:

 external/bsd/nvi/dist/cl/cl_main.c    |   6 ++++--
 external/bsd/nvi/dist/ex/ex_script.c  |  12 ++++++------
 external/bsd/nvi/usr.bin/nvi/Makefile |   5 ++++-
 3 files changed, 14 insertions(+), 9 deletions(-)

diffs (104 lines):

diff -r 15b8aaec00ac -r 47d46c0436b3 external/bsd/nvi/dist/cl/cl_main.c
--- a/external/bsd/nvi/dist/cl/cl_main.c        Mon Nov 06 03:21:13 2017 +0000
+++ b/external/bsd/nvi/dist/cl/cl_main.c        Mon Nov 06 03:27:34 2017 +0000
@@ -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 @@
 h_winch(int signo)
 {
        GLOBAL_CLP;
+#ifdef HAVE_SIGTIMEDWAIT
        sigset_t sigset;
        struct timespec timeout;
 
@@ -308,6 +309,7 @@
        timeout.tv_nsec = 100 * 1000 * 1000;
        while (sigtimedwait(&sigset, NULL, &timeout) != -1)
                continue;
+#endif
 
        F_SET(clp, CL_SIGWINCH);
 
diff -r 15b8aaec00ac -r 47d46c0436b3 external/bsd/nvi/dist/ex/ex_script.c
--- a/external/bsd/nvi/dist/ex/ex_script.c      Mon Nov 06 03:21:13 2017 +0000
+++ b/external/bsd/nvi/dist/ex/ex_script.c      Mon Nov 06 03:27:34 2017 +0000
@@ -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 @@
 #include <string.h>
 #include <termios.h>
 #include <unistd.h>
-#ifdef __NetBSD__
+#ifdef HAVE_UTIL_H
 #include <util.h>
 #endif
 
@@ -58,7 +58,7 @@
 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 @@
        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 @@
 }
 
 #endif /* HAVE_SYS5_PTY */
-#endif /* !__NetBSD__ */
+#endif /* !HAVE_OPENPTY */
diff -r 15b8aaec00ac -r 47d46c0436b3 external/bsd/nvi/usr.bin/nvi/Makefile
--- a/external/bsd/nvi/usr.bin/nvi/Makefile     Mon Nov 06 03:21:13 2017 +0000
+++ b/external/bsd/nvi/usr.bin/nvi/Makefile     Mon Nov 06 03:27:34 2017 +0000
@@ -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 @@
 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



Home | Main Index | Thread Index | Old Index