summaryrefslogtreecommitdiff
path: root/misc/screen/patches/patch-aj
blob: b537141a3a72910989e70e8cff04df9ada2fcfa8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$NetBSD: patch-aj,v 1.4 2005/09/28 19:35:36 rillig Exp $

Detect getutent correctly on NetBSD with utmpx.

--- 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 @@
 AC_TRY_LINK([
 #include <time.h> /* to get time_t on SCO */
 #include <sys/types.h>
-#if defined(SVR4) && !defined(DGUX)
+#include <sys/param.h>
+#if (defined(SVR4) && !defined(DGUX)) \
+ || (defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106050000))
 #include <utmpx.h>
 #define utmp utmpx
+# ifdef __NetBSD__
+#  define pututline pututxline
+#  define getutent  getutxent
+# endif
 #else
 #include <utmp.h>
 #endif
@@ -1209,6 +1215,7 @@
 AC_TRY_LINK(,[vsprintf(0,0,0);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no))
 
 AC_HEADER_DIRENT
+AC_CHECK_HEADERS(sys/stropts.h)
 
 AC_MSG_CHECKING(for setenv)
 AC_TRY_LINK(,[setenv((char *)0,(char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes);AC_DEFINE(USESETENV),