Mail Archives: cygwin/2002/12/17/06:57:25
This thread has a lot of misinformation and just plain confusion.
For starters, term.h != termcap.h. Some messages in this thread talk
about term.h, others about termcap.h -- and seem to mean one when
they're talking about the other. Sigh.
Also, /usr/include/termcap.h is NOT the ncurses version (on a stock
cygwin system). The ncurses termcap compatibility header file is
/usr/include/ncurses/termcapn.h (note the extra 'n')
No, the standard ncurses package doesn't put a term.h -> ncurses/term.h
symlink. It probably should; my linux box includes these symlinks that
the ncurses cygwin package doesn't:
/usr/include/term.h -> ncurses/term.h
/usr/include/eti.h -> ncurses/eti.h
For now, do it yourself. I've added this change to my ncurses TODO
list, so the next ncurses release will do this for you.
As far as Frederic's problem goes, I'd create the new symlinks, and
re-run configure (after deleting config.cache). Hopefully that will
make the changes to lftp_tinfo.cc unnecessary.
-----------------------------------------------------
[[ ONLY for the brave; NO FURTHER support for this variant will be
forthcoming ]]
If you want to use ncurses as a complete replacement for libtermcap
(when compiling; this procedure will NOT change the runtime behavior of
already-compiled programs), then you need to:
rename
/usr/include/ncurses/termcapn.h to
/usr/include/ncurses/termcap.h
Do NOT copy it into /usr/include -- the "real" termcap.h should live
there. [DON'T DO THIS: You'd want to uninstall the termcap package BUT
YOU CAN'T]. The problem is, the termcap package includes the header and
library *as well as* /etc/termcap. You want to keep /etc/termcap; so
you must manually delete /usr/include/termcap.h, /usr/lib/libtermcap.a,
and /usr/man/man3/termcap.3. And they'll reappear the next time you
update the termcap package.
Once you've done all this, if the package you are compiling is set up
properly, it will see termcap.h in /usr/include/ncurses, and use it (and
will automatically link using -lcurses or -lncurses instead of
-ltermcap. But only if your autoconfigury stuff is handled properly.
If it is not, then it's a bug in the package you're trying to compile --
go talk to them about it.
-----------------------------------------------------
--Chuck
Frédéric L. W. Meunier wrote:
> On Mon, 16 Dec 2002, elfyn-cygwin AT mail DOT exposure DOT org DOT uk wrote:
>
>
>>The setupterm() function lives in the ncurses package
>>(/usr/include/ncurses/term.h). The problem happens in the if pre-processor
>>clause on line 26 of lftp_tinfo.cc. I got around that by changing the order
>>and switching an if to an elif statement like this:
>>
>>#if defined(__CYGWIN__)
>># include <ncurses/term.h>
>># include <curses.h>
>>#elif defined(HAVE_CURSES_H)
>># include <curses.h>
>># if defined(HAVE_TERM_H)
>># include <term.h>
>># endif
>>#elif defined(HAVE_NCURSES_CURSES_H)
>>#include <ncurses/curses.h>
>># if defined(HAVE_NCURSES_TERM_H)
>># include <ncurses/term.h>
>># endif
>>#endif
>>
>>May not have been the right thing to do but got past that
>>problem. Now I got a `undefined reference to `_WinMain AT 16''
>>error, probably because I dont have libsup++ installed
>>though.
>
>
> I don't have libsupc++. I'm using the latest gcc2.
>
> I think the right fix was to make the /usr/include/term.h
> symlink, which for some reason:
>
> 1- Isn't in ncurses 5.2-8
> or
> 2- Is removed when you uninstall libtermcap
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -