lynx compilation with egcs compiler

Jean-Pierre Radley jpr@jpr.com
Fri Sep 18 02:04:00 GMT 1998


SCO OSR 5.0.5.
Cvs update was run a few hours ago, new gcc binary is in place.

Gcc is failing, whereas cc does fine, on the latest lynx2.8.1dev.28.tar.gz.

I get this:

gcc -DHAVE_CONFIG_H  -I. -I.. -Ichrtrans -I./chrtrans -I.. -I../src -I../WWW/Library/Implementation  -O3  -c ./LYClean.c
In file included from ./LYClean.c:2:
LYCurses.h:118: parse error before `*'

If I look at that .h file, the relevant area is:

   115  #ifdef VMS
   116  extern void VMSbox PARAMS((WINDOW *win, int height, int width));
   117  #else
   118  extern void LYbox PARAMS((WINDOW *win, BOOLEAN formfield));
   119  #endif /* VMS */
   120  #endif /* USE_SLANG */

I've traced through the include files, run -E compiles, gone back to
lynx release 24 (which I compiled back in August with the gcc then
current); I can't get past this error. 

With cc, at some point /usr/include/tinfo.h is read, and we get
	typedef struct _win_st  WINDOW

With gcc, there's a private gcc version of tinfo.h, and it just doesn't
define WINDOW in any way.  

Now I see that unlike most of the fixed files (which are usually edited
versions of the original file under /usr/include), the gcc private
version of tinfo.h is totally different; all it contains is:

	#ifndef _CURSES_H_WRAPPER
	#ifdef __cplusplus
	# define bool __curses_bool_t
	#endif
	#include_next <curses.h>
	#ifdef __cplusplus
	# undef bool
	#endif
	#define _CURSES_H_WRAPPER
	#endif /* _CURSES_H_WRAPPER */

(Same contents for the "fixed" version of term.h.)

And in curses.h, we don't get WINDOW defined...

So:  I moved /u/lib/gcc-lib/i586-pc-sco3.2v5.0/egcs-2.92.07/include/tinfo.h
out of the way.  Egcs-gcc then compiles Lynx perfectly well.

I think the changes in the gcc fixes of tinfo.h and term.h happened
in the last week or ten days.

-- 
Jean-Pierre Radley <jpr@jpr.com>  XC/XT Custodian   Sysop, CompuServe SCOForum



More information about the Gcc mailing list