Subject: Re: bug#6812: 24.0.50; Inadvertant name capture (more information)

From: Jan Djärv <[email-masked]>
Date: Fri, 06 Aug 2010 19:44:26 +0200

It is a monumental stupidity in the ncurses header file, almost criminal.
On Mandriva there is an #ifdef __INTERNAL_CAPS_VISIBLE around
these #defines, but I see not all distributions have them (Suse and Fedora
does not for example).

I checked in a fix.

Thanks for investigating this.

	Jan D.

John ff skrev 2010-08-06 17.32:
> Compiling from bzr repository
> gcc -c  -Demacs -DHAVE_CONFIG_H  -I. -I/jpff/GNU_21/emacs/trunk/src     -I/usr/include/alsa          -MMD -MF deps/sysdep.d  -Wimplicit-function-declaration -Wold-style-definition -Wdeclaration-after-statement -Wno-pointer-sign  -g -O2 -fno-optimize-sibling-calls sysdep.c
> In file included from termhooks.h:310:0,
>                   from sysdep.c:107:
> /usr/include/gpm.h:120:17: error: expected ?:?, ?,?, ?;?, ?}? or ?__attribute__? before ?->? token
> make[1]: *** [sysdep.o] Error 1
> make[1]: Leaving directory `/jpff/GNU_21/emacs/trunk/src'
> make: *** [src] Error 2
>
> Looking at /usr/include/gpm.h it says about line 120
>
> typedef struct Gpm_Event {
>    unsigned char buttons, modifiers;  /* try to be a multiple of 4 */
>    unsigned short vc;
>    short dx, dy, x, y;
>    enum Gpm_Etype type;
>    int clicks;
>    enum Gpm_Margin margin;
>    short wdx, wdy;
> }              Gpm_Event;
>
> Running -E on the compilation this becomes
>
> typedef struct Gpm_Event {
>    unsigned char cur_term->type. Numbers[30], modifiers;
>    unsigned short vc;
>    short dx, dy, x, y;
>    enum Gpm_Etype type;
>    int clicks;
>    enum Gpm_Margin margin;
>    short wdx, wdy;
> } Gpm_Event;
>
> and the buttons field has change to something unsyntactic.  Initial
> searching has not found where this comes from, but somehow "buttons"
> has become "cur_term->type. Numbers[30]".  It was OK yesterday
>
> Extra information...
>
> Just thought to look in /usr/include
> /usr/include/term.h:#define buttons                        CUR Numbers[30]
>
> That means the interaction is between<term.h>  and<gpm.h>
> This is not the area I understand
>
>
>
>
>
>
> In GNU Emacs 24.0.50.15 (x86_64-unknown-linux-gnu)
>   of 2010-08-05 on xenakis
> Windowing system distributor `The X.Org Foundation', version 11.0.10800000
> configured using `configure  'CFLAGS=-g -O2 -fno-optimize-sibling-calls''
>
> 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: en_GB.UTF-8
>    value of $XMODIFIERS: @im=local
>    locale-coding-system: utf-8-unix
>    default enable-multibyte-characters: t
>
> Major mode: Shell
>
> Minor modes in effect:
>    shell-dirtrack-mode: t
>    auto-image-file-mode: t
>    show-paren-mode: t
>    display-time-mode: t
>    tooltip-mode: t
>    mouse-wheel-mode: t
>    menu-bar-mode: t
>    file-name-shadow-mode: t
>    global-font-lock-mode: t
>    font-lock-mode: t
>    auto-composition-mode: t
>    auto-encryption-mode: t
>    auto-compression-mode: t
>    line-number-mode: t
>    transient-mark-mode: t
>
> Recent input:
> <down>  <down>  <down>  <down>  <down>  <down>  <down>  <down>
> <down>  <down>  <down>  <down>  <down>  <down>  <down>  <down>
> <down>  <down>  <down>  <down>  <down>  <down>  <down>  <down>
> <down>  <down>  C-s i n s t r C-c C-x C-f C-x C-f ~ /
> G N U<tab>  2<tab>  e<tab>  / t<tab>  s r<tab>  s y
> s<tab>  d<tab>  <return>  C-u 1 0 0 C-n<down>  <down>
> <down>  <down>  <down>  <down>  <down>  <down>  <down>  <down>
> <down>  <up>  <up>  <up>  <up>  <up>  C-x C-f y e r<tab>
> <backspace>  <backspace>  <backspace>  t e r<tab>  h<tab>
> <return>  C-v C-v C-v C-v C-v C-v<up>  <up>  <up>  <up>
> <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>
> C-x C-f / u s r / i n c<tab>  g<tab>  p<tab>  <return>
> C-u 1 2 0 C-n<right>  <up>  M-x s h e l l<return>  <down-mouse-2>
> <mouse-2>  C-a<left>  C-a<right>  <right>  <right>  <right>
> <right>  <right>  <backspace>  E<left>  <left>  <left>
> <left>  <left>  <left>  <return>  c d SPC<down-mouse-2>
> <mouse-2>  <up>  C-e C-d C-e<return>  <up>  <up>  <down>
> <down>  <down>  <help-echo>  <down-mouse-1>  <help-echo>
> <mouse-movement>  <mouse-movement>  <drag-mouse-1>  <help-echo>
> <down-mouse-2>  <mouse-2>  <return>  c d SPC s r c<return>
> <down-mouse-2>  <mouse-2>  <return>  <escape>  <  C-s g
> p m C-s C-s C-s C-v C-v<up>  <up>  <up>  <up>  <up>  <up>
> <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>
> <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>
> <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>
> <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>  <up>
> <up>  <up>  <up>  <down>  <down>  <down>  C-x 2 C-x C-f C-g
> C-x b<return>  <help-echo>  C-s 2 C-x o C-x 2 M-x r
> e p o r t = b<backspace>  <backspace>  - b<tab>  <r
> eturn>
>
> Recent messages:
> Making completion list...
> Note: file is write protected
> Auto-saving...done
> ~/GNU_21/emacs/trunk
> byte-code: End of buffer
> ~/GNU_21/emacs/trunk/src
> Mark set
> Mark saved where search started
> Quit
> Mark saved where search started
>
> Load-path shadows:
> /bigdisk/jpff/GNU_21/local-lisp/autotest-mode hides /usr/local/share/emacs/site-lisp/autotest-mode
> /bigdisk/jpff/GNU_21/local-lisp/autoconf-mode hides /usr/local/share/emacs/site-lisp/autoconf-mode
> /bigdisk/jpff/GNU_21/local-lisp/ruler-mode hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/ruler-mode
> /bigdisk/jpff/GNU_21/local-lisp/t-mouse hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/t-mouse
> /bigdisk/jpff/GNU_21/local-lisp/ses hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/ses
> /bigdisk/jpff/GNU_21/local-lisp/scroll-lock hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/scroll-lock
> /bigdisk/jpff/GNU_21/local-lisp/emerge hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/vc/emerge
> /bigdisk/jpff/GNU_21/local-lisp/url hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/url/url
> /bigdisk/jpff/GNU_21/local-lisp/url-file hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/url/url-file
> /bigdisk/jpff/GNU_21/local-lisp/url-news hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/url/url-news
> /bigdisk/jpff/GNU_21/local-lisp/url-cookie hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/url/url-cookie
> /bigdisk/jpff/GNU_21/local-lisp/url-gw hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/url/url-gw
> /bigdisk/jpff/GNU_21/local-lisp/url-http hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/url/url-http
> /bigdisk/jpff/GNU_21/local-lisp/url-nfs hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/url/url-nfs
> /bigdisk/jpff/GNU_21/local-lisp/url-cid hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/url/url-cid
> /bigdisk/jpff/GNU_21/local-lisp/url-auth hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/url/url-auth
> /bigdisk/jpff/GNU_21/local-lisp/url-parse hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/url/url-parse
> /bigdisk/jpff/GNU_21/local-lisp/url-vars hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/url/url-vars
> /bigdisk/jpff/GNU_21/local-lisp/url-ns hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/url/url-ns
> /bigdisk/jpff/GNU_21/local-lisp/url-irc hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/url/url-irc
> /bigdisk/jpff/GNU_21/local-lisp/url-cache hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/url/url-cache
> /bigdisk/jpff/GNU_21/local-lisp/url-ldap hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/url/url-ldap
> /bigdisk/jpff/GNU_21/local-lisp/url-misc hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/url/url-misc
> /bigdisk/jpff/GNU_21/local-lisp/socks hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/net/socks
> /bigdisk/jpff/GNU_21/local-lisp/feedmail hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/mail/feedmail
> /bigdisk/jpff/GNU_21/local-lisp/spam-stat hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/gnus/spam-stat
> /bigdisk/jpff/GNU_21/local-lisp/icalendar hides /bigdisk/jpff/GNU_21/emacs/trunk/lisp/calendar/icalendar
>
> Features:
> (shadow mailabbrev mailalias mailcrypt mail-extr mail-utils sendmail
> emacsbug ansi-color shell comint ring vc-bzr sha1 hex-util edmacro
> kmacro help-mode view debug multi-isearch parse-time vc-cvs imenu
> cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
> cc-defs eldoc package delsel image-file cus-start cus-load logger
> crypt crypt++ crypt+pgp-pub paren uniquify advice help-fns
> advice-preload holidays hol-loaddefs regexp-opt cal-menu easymenu
> calendar cal-loaddefs time tooltip ediff-hook vc-hooks lisp-float-type
> mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode
> register page menu-bar rfn-eshadow timer select scroll-bar mldrag
> mouse 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
> dynamic-setting x multi-tty emacs)
>
> ==John ffitch
>
>