emacs-devel
[Top][All Lists]
Advanced

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

utmp.h obsoleted in FreeBSD 9.0


From: Giorgos Keramidas
Subject: utmp.h obsoleted in FreeBSD 9.0
Date: Mon, 18 Jan 2010 22:16:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (berkeley-unix)

Hi all,

utmp.h has been removed from FreeBSD 9.0-CURRENT.  This means Emacs from
trunk can no longer build on FreeBSD 9.X or newer because src/filelock.c
tries to include <utmp.h>.

The filelock.c code uses the sysctl interface in FreeBSD, so we don't
really need utmp.h to have a working Emacs version.  So I patched
configure.in to check for availability of utmp.h and then filelock.c to
use HAVE_UTMP_H around the include statement.

This seems to work fine, but before updating the packages of Emacs on
FreeBSD I thought I'd ask: does this seem like a reasonable fix?  Should
we patch the Emacs trunk too?

The following patch should apply cleanly on the bzr-trunk of Emacs at
revision address@hidden

Then 'configure' has to be regenerated too, and we should be set :-)

%%%
=== modified file 'ChangeLog'
--- ChangeLog   2010-01-13 08:35:10 +0000
+++ ChangeLog   2010-01-18 20:12:39 +0000
@@ -1,3 +1,8 @@
+2010-01-18  Giorgos Keramidas  <address@hidden>  (tiny change)
+
+       * configure.in: Check for utmp.h availability, since some
+       systems don't have one (e.g. FreeBSD 9.X and later versions).
+
 2010-01-12  Juanma Barranquero  <address@hidden>
 
        * .bzrignore: Ignore all .exe, instead of individual files.

=== modified file 'configure.in'
--- configure.in        2010-01-13 08:35:10 +0000
+++ configure.in        2010-01-18 18:10:31 +0000
@@ -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)],

=== modified file 'src/ChangeLog'
--- src/ChangeLog       2010-01-16 20:20:32 +0000
+++ src/ChangeLog       2010-01-18 20:11:39 +0000
@@ -1,3 +1,9 @@
+2010-01-18  Giorgos Keramidas  <address@hidden>  (tiny change)
+
+       * filelock.c: Include utmp.h only when HAVE_UTMP_H is true,
+       since some systems don't have one (e.g. FreeBSD 9.X and later
+       versions).
+
 2010-01-16  Stefan Monnier  <address@hidden>
 
        * xterm.c (event_handler_gdk): Block input (Bug#5037).

=== modified file 'src/filelock.c'
--- src/filelock.c      2010-01-13 08:35:10 +0000
+++ src/filelock.c      2010-01-18 20:09:52 +0000
@@ -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)

%%%




reply via email to

[Prev in Thread] Current Thread [Next in Thread]