emacs-devel
[Top][All Lists]
Advanced

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

Re: utmp.h obsoleted in FreeBSD 9.0


From: Giorgos Keramidas
Subject: Re: utmp.h obsoleted in FreeBSD 9.0
Date: Sat, 23 Jan 2010 22:06:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (berkeley-unix)

After running a patched Emacs build or a couple of days, I've submitted
the patch below to the editors/emacs and editors/emacs-devel packages of
FreeBSD.  Since it's a good idea to keep the "local patches" as small
and few as possible, does anyone from the list feel like pushing this to
the bzr branch for the next pretest too?

Regards,
Giorgos

On Mon, 18 Jan 2010 22:16:27 +0200, Giorgos Keramidas <address@hidden> wrote:
> 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)
>
> %%%

Attachment: pgpyzLmgq7Cff.pgp
Description: PGP signature


reply via email to

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