From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: enami tsugutomo Newsgroups: gmane.emacs.bugs Subject: bug#6190: 24.0.50; patch to configure emacs to use terminfo on recent NetBSD. Date: 21 May 2010 10:32:37 +0900 Organization: Sony Corp. Message-ID: References: <9dk4r0berp.fsf@fencepost.gnu.org> <877hn09bce.fsf@stupidchicken.com> <0jmxvv6pqa.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1274407034 17181 80.91.229.12 (21 May 2010 01:57:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 21 May 2010 01:57:14 +0000 (UTC) Cc: Chong Yidong , 6190@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 21 03:57:11 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OFHU6-0005LY-Ay for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 May 2010 03:57:10 +0200 Original-Received: from localhost ([127.0.0.1]:58145 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFHU5-0006xB-Mi for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 May 2010 21:57:09 -0400 Original-Received: from [140.186.70.92] (port=38155 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFHTy-0006wF-R9 for bug-gnu-emacs@gnu.org; Thu, 20 May 2010 21:57:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OFHTx-0003Fu-Iv for bug-gnu-emacs@gnu.org; Thu, 20 May 2010 21:57:02 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55389) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFHTx-0003Fm-GJ for bug-gnu-emacs@gnu.org; Thu, 20 May 2010 21:57:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OFH6k-0002lk-BT; Thu, 20 May 2010 21:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: enami tsugutomo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 May 2010 01:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6190 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6190-submit@debbugs.gnu.org id=B6190.127440556910638 (code B ref 6190); Fri, 21 May 2010 01:33:02 +0000 Original-Received: (at 6190) by debbugs.gnu.org; 21 May 2010 01:32:49 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFH6W-0002lX-OI for submit@debbugs.gnu.org; Thu, 20 May 2010 21:32:48 -0400 Original-Received: from ms6.sony.co.jp ([211.125.136.204]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFH6T-0002lS-1w for 6190@debbugs.gnu.org; Thu, 20 May 2010 21:32:47 -0400 Original-Received: from mta6.sony.co.jp (mta6.Sony.CO.JP [137.153.71.9]) by ms6.sony.co.jp (R8/Sony) with ESMTP id o4L1Wcp8011728; Fri, 21 May 2010 10:32:38 +0900 (JST) Original-Received: from mta6.sony.co.jp (localhost [127.0.0.1]) by mta6.sony.co.jp (R8/Sony) with ESMTP id o4L1Wb5b015093; Fri, 21 May 2010 10:32:37 +0900 (JST) Original-Received: from smail3.sm.sony.co.jp (smail3.sm.sony.co.jp [43.15.151.2]) by mta6.sony.co.jp (R8/Sony) with ESMTP id o4L1WbdE015088; Fri, 21 May 2010 10:32:37 +0900 (JST) Original-Received: from email.sm.sony.co.jp (email.sm.sony.co.jp [43.15.151.3]) by smail3.sm.sony.co.jp (8.11.6p3/8.11.6) with ESMTP id o4L1xnk21851; Fri, 21 May 2010 10:59:49 +0900 (JST) Original-Received: from memory-leak.sm.sony.co.jp (memory-leak.sm.sony.co.jp [43.15.152.83]) by email.sm.sony.co.jp (8.13.3/8.13.3) with ESMTP id o4L1WbLi023484; Fri, 21 May 2010 10:32:37 +0900 (JST) Original-Received: from memory-leak.sm.sony.co.jp (localhost [127.0.0.1]) by memory-leak.sm.sony.co.jp (8.13.5.20060614/8.13.3) with ESMTP id o4L1WbE0022626; Fri, 21 May 2010 10:32:37 +0900 (JST) Original-Received: (from enami@localhost) by memory-leak.sm.sony.co.jp (8.13.5.20060614/8.13.3) id o4L1Wbgk015810; Fri, 21 May 2010 10:32:37 +0900 (JST) In-Reply-To: Glenn Morris's message of "Thu, 20 May 2010 02:39:57 -0400" Original-Lines: 62 X-Mailer: Gnus v5.7/Emacs 20.7 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 20 May 2010 21:33:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37130 Archived-At: Glenn Morris writes: > I've installed it in the trunk. emacs-23 will need a different patch, > since there terminfo is not set by configure, but hard-coded in > src/s/netbsd.h. I don't know how to write that patch (some check of > the netbsd version number? Blech.) The terminfo library is commited to netbsd trunk on 2010 feb. 03 and that is between netbsd 5.99.24 (2010 jan 19) and 5.99.25 (2010 mar 29). The version symbol __NetBSD_Version__ is defined in sys/param.h like this: #define __NetBSD_Version__ 599002600 /* NetBSD 5.99.26 */ but the header file isn't handy as FreeBSD's osreldate.h (it includes some other header files and not suitable to create Makefile.) Instead, I've found that we can use HAVE_TERM_H. /usr/include/term.h is is header file for terminfo. I built emacs-23.2 on following two systems with applied patch below. The former has terminfo but the latter doesn't. enami@rplaca% uname -a NetBSD rplaca.sm.sony.co.jp 5.99.26 NetBSD 5.99.26 (GENERIC) #0: Thu Apr 8 15:59:25 JST 2010 enami@sigfpe.sm.sony.co.jp:/home/enami/src/current/obj.amd64/sys/arch/amd64/compile/GENERIC amd64 enami@rplaca% ldd src/emacs src/emacs: -lossaudio.1 => /usr/lib/libossaudio.so.1 -lc.12 => /usr/lib/libc.so.12 -lterminfo.1 => /usr/lib/libterminfo.so.1 -lm.0 => /usr/lib/libm.so.0 enami@memory-leak% uname -a NetBSD memory-leak.sm.sony.co.jp 5.0_STABLE NetBSD 5.0_STABLE (GENERIC) #1: Wed Oct 14 11:57:28 JST 2009 enami@sigfpe.sm.sony.co.jp:/home/enami/src/netbsd-5/obj.i386/sys/arch/i386/compile/GENERIC i386 enami@memory-leak% ldd src/emacs src/emacs: -lc.12 => /usr/lib/libc.so.12 -lossaudio.0 => /usr/lib/libossaudio.so.0 -lpthread.0 => /usr/lib/libpthread.so.0 -ldbus-1.3 => /usr/pkg/lib/libdbus-1.so.3 -ltermcap.0 => /usr/lib/libtermcap.so.0 -lm.0 => /usr/lib/libm387.so.0 -lm.0 => /usr/lib/libm.so.0 enami. diff -ur ../org/emacs-23.2/src/s/netbsd.h ./src/s/netbsd.h --- ../org/emacs-23.2/src/s/netbsd.h 2010-04-04 07:26:08.000000000 +0900 +++ ./src/s/netbsd.h 2010-05-21 10:08:39.000000000 +0900 @@ -45,7 +45,12 @@ #define LIBS_DEBUG /* -lutil is not needed for NetBSD >0.9. */ /* #define LIBS_SYSTEM -lutil */ +#ifdef HAVE_TERM_H +#define TERMINFO +#define LIBS_TERMCAP -lterminfo +#else #define LIBS_TERMCAP -ltermcap +#endif #define NEED_ERRNO #define SYSV_SYSTEM_DIR