all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Giorgos Keramidas <keramida@ceid.upatras.gr>
To: emacs-devel@gnu.org
Subject: utmp.h obsoleted in FreeBSD 9.0
Date: Mon, 18 Jan 2010 22:16:27 +0200	[thread overview]
Message-ID: <87ljfvqick.fsf@kobe.laptop> (raw)

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)

%%%




             reply	other threads:[~2010-01-18 20:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-18 20:16 Giorgos Keramidas [this message]
2010-01-23 20:06 ` utmp.h obsoleted in FreeBSD 9.0 Giorgos Keramidas
2010-01-23 22:15   ` Chong Yidong
2010-01-24 10:37     ` Giorgos Keramidas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ljfvqick.fsf@kobe.laptop \
    --to=keramida@ceid.upatras.gr \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.