31 lines
972 B
Text
31 lines
972 B
Text
$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),
|