[pushed] PR tui/16138, PR tui/17519, and misc failures to initialize the terminal
Pedro Alves
palves@redhat.com
Mon Nov 3 21:44:00 GMT 2014
Hi Simon,
On 11/03/2014 09:37 PM, Simon Marchi wrote:
> I just noticed this causes a segfault on SLED11, which is somewhat old. "zypper info libncurses5" gives version "5.6-90.55".
>
> Old ncurses' newterm doesn't like it when we pass NULL for ofp and ifp (the last two parameters). Passing NULL to name (the first parameter) is ok though.
>
> I just checked the difference in the source, and new ncurses' newterm has this:
>
> FILE *_ofp = ofp ? ofp : stdout;
> FILE *_ifp = ifp ? ifp : stdin;
>
> while the old one does not, which explains the difference in behavior. I tried to change the line for:
>
> s = newterm (NULL, stdout, stdin);
>
> and everything seems to work as usual.
>
> Do you want me to submit a patch, or are you going to take care of it yourself?
Sounds like an obvious fix then. If you could submit/push a patch, I'd
appreciate it. Just be sure to include the info above in the commit
log.
Thanks,
Pedro Alves
More information about the Gdb-patches
mailing list