all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* utmp.h obsoleted in FreeBSD 9.0
@ 2010-01-18 20:16 Giorgos Keramidas
  2010-01-23 20:06 ` Giorgos Keramidas
  0 siblings, 1 reply; 4+ messages in thread
From: Giorgos Keramidas @ 2010-01-18 20:16 UTC (permalink / raw)
  To: emacs-devel

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 lekktu@gmail.com-20100118044436-c8dozy11mbqky3qh

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  <keramida@ceid.upatras.gr>  (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  <lekktu@gmail.com>
 
 	* .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  <keramida@ceid.upatras.gr>  (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  <monnier@iro.umontreal.ca>
 
 	* 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)

%%%




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-01-24 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-18 20:16 utmp.h obsoleted in FreeBSD 9.0 Giorgos Keramidas
2010-01-23 20:06 ` Giorgos Keramidas
2010-01-23 22:15   ` Chong Yidong
2010-01-24 10:37     ` Giorgos Keramidas

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.