From fc24e31ac3da542db1c295759d6e02ea5bcf1e49 Mon Sep 17 00:00:00 2001 From: tonnerre Date: Fri, 4 Apr 2008 21:09:16 +0000 Subject: Include curses header for screen configure script when testing tgetent in order to prevent crash on 64-bit architectures. Otherwise the result of termcap/terminfo detection is wrong, causing the infamous "bad format 'p'" messages, or "OOPSOOPSOOPS" when SSHing from MacOS. Fixes PR 33808 Approved-by: joerg --- misc/screen/patches/patch-aj | 17 ++++++++++++++--- misc/screen/patches/patch-ak | 18 +++++++++++++++--- 2 files changed, 29 insertions(+), 6 deletions(-) (limited to 'misc/screen/patches') diff --git a/misc/screen/patches/patch-aj b/misc/screen/patches/patch-aj index b537141a3a7..c4b5214402d 100644 --- a/misc/screen/patches/patch-aj +++ b/misc/screen/patches/patch-aj @@ -1,10 +1,21 @@ -$NetBSD: patch-aj,v 1.4 2005/09/28 19:35:36 rillig Exp $ +$NetBSD: patch-aj,v 1.5 2008/04/04 21:09:16 tonnerre Exp $ Detect getutent correctly on NetBSD with utmpx. +Include curses header when testing tgetent in order to prevent +crash on 64-bit architectures. --- configure.in.orig 2003-06-03 07:58:24.000000000 -0400 +++ configure.in 2004-06-16 16:11:55.000000000 -0400 -@@ -815,9 +815,15 @@ +@@ -664,6 +664,8 @@ + AC_MSG_ERROR(!!! no tgetent - no screen)))))) + + AC_TRY_RUN([ ++#include ++ + main() + { + exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); +@@ -815,9 +817,15 @@ AC_TRY_LINK([ #include /* to get time_t on SCO */ #include @@ -21,7 +32,7 @@ Detect getutent correctly on NetBSD with utmpx. #else #include #endif -@@ -1209,6 +1215,7 @@ +@@ -1209,6 +1217,7 @@ AC_TRY_LINK(,[vsprintf(0,0,0);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no)) AC_HEADER_DIRENT diff --git a/misc/screen/patches/patch-ak b/misc/screen/patches/patch-ak index 37f91156241..cb5b24060cb 100644 --- a/misc/screen/patches/patch-ak +++ b/misc/screen/patches/patch-ak @@ -1,8 +1,20 @@ -$NetBSD: patch-ak,v 1.3 2004/06/16 21:35:00 christos Exp $ +$NetBSD: patch-ak,v 1.4 2008/04/04 21:09:16 tonnerre Exp $ + +Include curses header when testing tgetent in order to prevent +crash on 64-bit architectures. --- configure.orig 2003-12-05 08:46:53.000000000 -0500 +++ configure 2004-06-16 16:12:06.000000000 -0400 -@@ -5572,9 +5572,15 @@ +@@ -4925,6 +4925,8 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + ++#include ++ + main() + { + exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); +@@ -5572,9 +5574,15 @@ #include /* to get time_t on SCO */ #include @@ -19,7 +31,7 @@ $NetBSD: patch-ak,v 1.3 2004/06/16 21:35:00 christos Exp $ #else #include #endif -@@ -7502,6 +7508,148 @@ +@@ -7502,6 +7510,148 @@ fi -- cgit v1.2.3