GNU bug report logs - #6190
24.0.50; patch to configure emacs to use terminfo on recent NetBSD.

Previous Next

Package: emacs;

Reported by: enami tsugutomo <tsugutomo.enami <at> jp.sony.com>

Date: Fri, 14 May 2010 08:45:02 UTC

Severity: normal

Found in version 24.0.50

Fixed in version 24.0.50

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 6190 <at> debbugs.gnu.org (full text, mbox):

From: enami tsugutomo <tsugutomo.enami <at> jp.sony.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Chong Yidong <cyd <at> stupidchicken.com>, 6190 <at> debbugs.gnu.org
Subject: Re: bug#6190: 24.0.50;
	patch to configure emacs to use terminfo on recent NetBSD.
Date: 21 May 2010 10:32:37 +0900
Glenn Morris <rgm <at> gnu.org> 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 <at> 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 <at> sigfpe.sm.sony.co.jp:/home/enami/src/current/obj.amd64/sys/arch/amd64/compile/GENERIC amd64
enami <at> 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 <at> 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 <at> sigfpe.sm.sony.co.jp:/home/enami/src/netbsd-5/obj.i386/sys/arch/i386/compile/GENERIC i386
enami <at> 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




This bug report was last modified 15 years and 59 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.