From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.devel Subject: utmp.h obsoleted in FreeBSD 9.0 Date: Mon, 18 Jan 2010 22:16:27 +0200 Message-ID: <87ljfvqick.fsf@kobe.laptop> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1263845811 21552 80.91.229.12 (18 Jan 2010 20:16:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Jan 2010 20:16:51 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 18 21:16:44 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NWy1i-0001qL-FB for ged-emacs-devel@m.gmane.org; Mon, 18 Jan 2010 21:16:42 +0100 Original-Received: from localhost ([127.0.0.1]:43970 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWy1j-0008NL-BA for ged-emacs-devel@m.gmane.org; Mon, 18 Jan 2010 15:16:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NWy1e-0008N2-5N for emacs-devel@gnu.org; Mon, 18 Jan 2010 15:16:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NWy1Z-0008MY-8j for emacs-devel@gnu.org; Mon, 18 Jan 2010 15:16:37 -0500 Original-Received: from [199.232.76.173] (port=51233 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWy1Z-0008MV-3K for emacs-devel@gnu.org; Mon, 18 Jan 2010 15:16:33 -0500 Original-Received: from poseidon.ceid.upatras.gr ([150.140.141.169]:43245) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NWy1Y-0007v9-Ji for emacs-devel@gnu.org; Mon, 18 Jan 2010 15:16:33 -0500 Original-Received: from mail.ceid.upatras.gr (unknown [10.1.0.143]) by poseidon.ceid.upatras.gr (Postfix) with ESMTP id 3BAEAEB480A for ; Mon, 18 Jan 2010 22:16:30 +0200 (EET) Original-Received: from localhost (europa.ceid.upatras.gr [127.0.0.1]) by mail.ceid.upatras.gr (Postfix) with ESMTP id 2EBB0161086 for ; Mon, 18 Jan 2010 22:16:30 +0200 (EET) X-Virus-Scanned: amavisd-new at ceid.upatras.gr Original-Received: from mail.ceid.upatras.gr ([127.0.0.1]) by localhost (europa.ceid.upatras.gr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BYVJImUGz1Sb for ; Mon, 18 Jan 2010 22:16:30 +0200 (EET) Original-Received: from kobe.laptop (ppp-94-64-221-225.home.otenet.gr [94.64.221.225]) by mail.ceid.upatras.gr (Postfix) with ESMTP id D9E10161067 for ; Mon, 18 Jan 2010 22:16:29 +0200 (EET) Original-Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id o0IKGSRv038016 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 18 Jan 2010 22:16:28 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Original-Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id o0IKGRKS038013; Mon, 18 Jan 2010 22:16:28 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (berkeley-unix) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:120220 Archived-At: 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 . 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 (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 * .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 ], [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 (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 * 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 +#endif #if !defined (S_ISLNK) && defined (S_IFLNK) #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) %%%