lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] lynx-2.8.8rel2 bugfix for ncursesw on NetBSD


From: Thomas Dickey
Subject: Re: [Lynx-dev] lynx-2.8.8rel2 bugfix for ncursesw on NetBSD
Date: Sun, 14 Sep 2014 13:39:07 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Fri, Sep 12, 2014 at 11:29:27PM +0200, Thomas Klausner wrote:
> Hi!
> 
> Leonard Schmidt reported a bug against lynx in pkgsrc when compiling
> with ncursesw, see http://gnats.netbsd.org/49200
> 
> I can confirm that without the patch below, I get the following
> compilation issue:

I see - but this is  not the root cause.  In lynx, LYStrings.c includes
LYStrings.h, which includes LYCurses.h, which _does_ include a properly
ifdef'd version of term.h -- for portable applications.

The bug report says that he is trying to build with ncursesw.

The header files for ncurses and ncursesw are "mostly" compatible,
allowing an application which compiles against ncurses to be compiled
against ncursesw (the reverse is not necessarily true: although "term.h"
is identical, ncurses.h is not).

I think that the problem (and ultimate solution) lies in the ncursesw
port, in which I see two problems:

a) ncursesw5-config is not installed

b) the header files are incomplete, with /usr/pkg/include/ncursesw
   containing only ncurses.h

   A portable application will not assume this directory layout.
   Instead, it will make one of these assumptions:

   1) All of the curses header files can be included like this:
      #include <curses.h>
      #include <term.h>
      #include <unctrl.h>

   2) All of the ncurses header files can be included like this:
      #include <ncurses/curses.h>
      #include <ncurses/term.h>
      #include <ncurses/unctrl.h>

   3) All of the ncurses header files can be included like this:
      #include <ncursesw/curses.h>
      #include <ncursesw/term.h>
      #include <ncursesw/unctrl.h>
 
> --- src/LYStrings.c.orig      2013-11-29 00:52:56.000000000 +0000
> +++ src/LYStrings.c
> @@ -40,6 +40,10 @@
>  #include <LYrcFile.h>
>  #endif
>  
> +#ifdef NCURSES
> +#include <ncurses/term.h>
> +#endif
> +
>  #include <LYShowInfo.h>
>  #include <LYLeaks.h>

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]