changeset 106962:d189e0755f30

Account for utmp.h availability. * configure.in: Check for utmp.h availability (FreeBSD 9.x lacks this header file). * filelock.c: Include utmp.h only when HAVE_UTMP_H (FreeBSD 9.x lacks this header file).
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 23 Jan 2010 17:15:22 -0500
parents 55db4345f5e3
children a1f2277cc409
files ChangeLog configure configure.in src/ChangeLog src/filelock.c
diffstat 5 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Jan 23 13:42:22 2010 +0100
+++ b/ChangeLog	Sat Jan 23 17:15:22 2010 -0500
@@ -1,3 +1,8 @@
+2010-01-23  Giorgos Keramidas  <keramida@ceid.upatras.gr>  (tiny change)
+
+	* configure.in: Check for utmp.h availability (FreeBSD 9.x lacks
+	this header file).
+
 2010-01-12  Juanma Barranquero  <lekktu@gmail.com>
 
 	* .bzrignore: Ignore all .exe, instead of individual files.
--- a/configure	Sat Jan 23 13:42:22 2010 +0100
+++ b/configure	Sat Jan 23 17:15:22 2010 -0500
@@ -6665,11 +6665,12 @@
 
 
 
+
 for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
   linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
   termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
   sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
-  sys/utsname.h pwd.h
+  sys/utsname.h pwd.h utmp.h
 do
 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--- a/configure.in	Sat Jan 23 13:42:22 2010 +0100
+++ b/configure.in	Sat Jan 23 17:15:22 2010 -0500
@@ -1106,7 +1106,7 @@
   linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
   termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
   sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
-  sys/utsname.h pwd.h)
+  sys/utsname.h pwd.h utmp.h)
 
 AC_MSG_CHECKING(if personality LINUX32 can be set)
 AC_TRY_COMPILE([#include <sys/personality.h>], [personality (PER_LINUX32)],
--- a/src/ChangeLog	Sat Jan 23 13:42:22 2010 +0100
+++ b/src/ChangeLog	Sat Jan 23 17:15:22 2010 -0500
@@ -1,3 +1,8 @@
+2010-01-23  Giorgos Keramidas  <keramida@ceid.upatras.gr>  (tiny change)
+
+	* filelock.c: Include utmp.h only when HAVE_UTMP_H (FreeBSD 9.x
+	lacks this header file).
+
 2010-01-23  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
 	* xdisp.c (draw_glyphs): Update `start' for left_overwritten case
--- a/src/filelock.c	Sat Jan 23 13:42:22 2010 +0100
+++ b/src/filelock.c	Sat Jan 23 17:15:22 2010 -0500
@@ -63,7 +63,9 @@
 
 #ifdef CLASH_DETECTION
 
+#ifdef HAVE_UTMP_H
 #include <utmp.h>
+#endif
 
 #if !defined (S_ISLNK) && defined (S_IFLNK)
 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)