GNU bug report logs -
#6190
24.0.50; patch to configure emacs to use terminfo on recent NetBSD.
Previous Next
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6190 in the body.
You can then email your comments to 6190 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6190
; Package
emacs
.
(Fri, 14 May 2010 08:45:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
enami tsugutomo <tsugutomo.enami <at> jp.sony.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 14 May 2010 08:45:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
On earlier this year, NetBSD have introduced terminfo in its development
tree and termcap library is replaced with small library to provide
minimum compatibility. Specially, tgetent() is changed not to store
termcap entry in the supplied buffer. Since emacs termcap code expects
actual entry filled, emacs doesn't work anymore on such system (strlen
call on the buffer returns meaningless value).
I guess it is better to configure emacs to use terminfo instead on
NetBSD which has terminfo.
Here is a changes to configure.in to check availability of terminfo:
=== modified file 'configure.in'
--- configure.in 2010-05-14 03:05:00 +0000
+++ configure.in 2010-05-14 04:00:58 +0000
@@ -2620,7 +2620,7 @@
## Use terminfo instead of termcap?
## Note only system files NOT using terminfo are:
-## bsd-common, freebsd < 40000, ms-w32, msdos, netbsd, and
+## bsd-common, freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and
## darwin|gnu without ncurses.
TERMINFO=no
LIBS_TERMCAP=
@@ -2662,13 +2662,22 @@
fi
;;
+ netbsd)
+ if test $ac_cv_search_tputs = -lterminfo; then
+ TERMINFO=yes
+ LIBS_TERMCAP="-lterminfo"
+ else
+ LIBS_TERMCAP="-ltermcap"
+ fi
+ ;;
+
esac
case "$opsys" in
## hpux: Make sure we get select from libc rather than from libcurses
## because libcurses on HPUX 10.10 has a broken version of select.
## We used to use -lc -lcurses, but this may be cleaner.
- hpux*|netbsd) LIBS_TERMCAP="-ltermcap" ;;
+ hpux*) LIBS_TERMCAP="-ltermcap" ;;
openbsd) LIBS_TERMCAP="-lncurses" ;;
In GNU Emacs 24.0.50.5 (x86_64--netbsd)
of 2010-05-14 on rplaca.sm.sony.co.jp
configured using `configure 'x86_64--netbsd' '--with-x=no' 'build_alias=x86_64--netbsd' 'host_alias=x86_64--netbsd' 'target_alias=x86_64--netbsd''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: nil
value of $XMODIFIERS: nil
locale-coding-system: nil
default enable-multibyte-characters: t
Major mode: Fundamental
Minor modes in effect:
file-name-shadow-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Recent input:
ESC x r e p o r TAB RET
Recent messages:
("emacs")
For information about GNU Emacs and the GNU system, type C-h C-a.
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr message sendmail regexp-opt rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-utils
gmm-utils mailheader emacsbug japan-util ediff-hook vc-hooks
lisp-float-type lisp-mode register page menu-bar rfn-eshadow timer
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
loaddefs button minibuffer faces cus-face files text-properties overlay
md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process multi-tty emacs)
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6190
; Package
emacs
.
(Wed, 19 May 2010 06:14:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 6190 <at> debbugs.gnu.org (full text, mbox):
enami tsugutomo wrote:
> On earlier this year, NetBSD have introduced terminfo in its development
> tree and termcap library is replaced with small library to provide
> minimum compatibility.
[...]
> I guess it is better to configure emacs to use terminfo instead on
> NetBSD which has terminfo.
>
> Here is a changes to configure.in to check availability of terminfo:
Thank you. We can certainly install this on the trunk, but I wonder if
it (or the equivalent) should go in the emacs-23 branch?
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6190
; Package
emacs
.
(Wed, 19 May 2010 15:11:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 6190 <at> debbugs.gnu.org (full text, mbox):
Glenn Morris <rgm <at> gnu.org> writes:
> enami tsugutomo wrote:
>
>> On earlier this year, NetBSD have introduced terminfo in its development
>> tree and termcap library is replaced with small library to provide
>> minimum compatibility.
> [...]
>> I guess it is better to configure emacs to use terminfo instead on
>> NetBSD which has terminfo.
>>
>> Here is a changes to configure.in to check availability of terminfo:
>
> Thank you. We can certainly install this on the trunk, but I wonder if
> it (or the equivalent) should go in the emacs-23 branch?
Yes, I think so.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6190
; Package
emacs
.
(Thu, 20 May 2010 06:41:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 6190 <at> debbugs.gnu.org (full text, mbox):
Chong Yidong wrote:
>>> Here is a changes to configure.in to check availability of terminfo:
>>
>> Thank you. We can certainly install this on the trunk, but I wonder if
>> it (or the equivalent) should go in the emacs-23 branch?
>
> Yes, I think so.
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.)
bug Marked as fixed in versions 24.0.50.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 20 May 2010 18:00:04 GMT)
Full text and
rfc822 format available.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6190
; Package
emacs
.
(Fri, 21 May 2010 01:33:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 6190 <at> debbugs.gnu.org (full text, mbox):
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
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Fri, 21 May 2010 04:09:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
enami tsugutomo <tsugutomo.enami <at> jp.sony.com>
:
bug acknowledged by developer.
(Fri, 21 May 2010 04:09:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 6190-done <at> debbugs.gnu.org (full text, mbox):
Thanks; applied.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 18 Jun 2010 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 193 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.