Re: Recompiling trn (was: Re: trn error!?)

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

 



On Wed, Nov 27, 2002 at 10:25:12AM +0100, Patrick Vervoorn wrote:
> I'm using my 'own' GNU curses lib (installed into my homedirectory), and
> everything compiles OK. However, when linking trn I run into difficulties:
> 
> gcc -L/usr/local/lib -L/home/cvs_guest/lib addng.o art.o artio.o artsrch.o
> autosub.o backpage.o bits.o cache.o charsubst.o datasrc.o decode.o
> edit_dist.o env.o final.o hash.o head.o help.o init.o intrp.o kfile.o
> last.o list.o mime.o ng.o ngdata.o ngsrch.o ngstuff.o only.o opt.o rcln.o
> rcstuff.o respond.o rthread.o rt-mt.o rt-ov.o rt-process.o rt-page.o
> rt-select.o rt-util.o rt-wumpus.o search.o sw.o term.o trn.o util.o
> util2.o uudecode.o parsedate.o nntpinit.o nntpclient.o nntpauth.o nntp.o
> wildmat.o color.o filter.o scan.o scmd.o sdisp.o smisc.o sorder.o spage.o
> scanart.o samain.o samisc.o sadisp.o sacmd.o sadesc.o sathread.o url.o
> mempool.o univ.o score.o scorefile.o scoresave.o score-easy.o tkstuff.o
> tktree.o -lm -lresolv -lnsl -lncurses -o trn
> /home/cvs_guest/lib/libncurses.a(lib_termcap.o)(.data+0x0): multiple
> definition of `UP'

I had to deal with this in my Debian package of trn4. Here's the patch:

--- trn4-4.0-test76.orig/term.h
+++ trn4-4.0-test76/term.h
@@ -109,8 +109,8 @@
 
 #ifdef HAS_TERMLIB
 EXT int GT;				/* hardware tabs */
-EXT char* BC INIT(NULL);		/* backspace character */
-EXT char* UP INIT(NULL);		/* move cursor up one line */
+extern char* BC;			/* backspace character */
+extern char* UP;			/* move cursor up one line */
 EXT char* CR INIT(NULL);		/* get to left margin, somehow */
 EXT char* VB INIT(NULL);		/* visible bell */
 EXT char* CL INIT(NULL);		/* home and clear screen */
@@ -135,7 +135,7 @@
 								 margins? */
 EXT bool XN INIT(FALSE);		/* does it eat 1st newline after
 							 automatic wrap? */
-EXT char PC INIT(0);			/* pad character for use by tputs() */
+extern char PC;				/* pad character for use by tputs() */
 
 #ifdef _POSIX_SOURCE
 EXT speed_t outspeed INIT(0);		/* terminal output speed, */
@@ -144,7 +144,7 @@
 #endif
 
 EXT int fire_is_out INIT(1);
-EXT int LINES INIT(0), COLS INIT(0);	/* size of screen */
+extern int LINES, COLS;			/* size of screen */
 EXT int term_line, term_col;		/* position of cursor */
 EXT int term_scrolled;			/* how many lines scrolled away */
 EXT int just_a_sec INIT(960);		/* 1 sec at current baud rate */

My changelog comment reads:

  * Quick fix to compile with ncurses >= 5.1 (closes: #89353). Whoever knows
    the terminal code upstream should sort out a neater solution.

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]


-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en

[Index of Archives]     [Photo]     [Yosemite]     [Epson Inkjet]     [Mhonarc]     [Nntpcache]

  Powered by Linux