redefinition of `yylineno', When compiling 3.5b4 on linux.

James W. Laferriere (babydr@nwrain.net)
Fri, 24 Jan 1997 00:45:47 -0800 (PST)


uname -a
Linux filesrv1 2.0.24 #23 Fri Nov 22 12:13:24 PST 1996 i586

cd obj.Linux-2.0.24-i586
make all
make[1]: Entering directory
`/home/archive/gated-R3_5Beta_4/src/obj.Linux-2.0.24-i586'
Make started at Fri Jan 24 00:16:07 PST 1997 with:
CC = cc
CFLAGS = -O
CWFLAGS =
IFLAGS =

Compiling: lexer.c
In file included from include.h:150,
from lexer.l:17:
/usr/include/paths.h:55: warning: `_PATH_HEQUIV' redefined
/usr/include/netdb.h:70: warning: this is the location of the previous definition
lexer.l:117: redefinition of `yylineno'
lexer.c:271: `yylineno' previously defined here
make[1]: *** [lexer.o] Error 1

--- obj.*/lexer.c --- portion thereof actually

/* A lexical scanner generated by flex */

/* Scanner skeleton version:
* $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.89 96/05/25 21:02:21 vern Exp $
*/

...snip...

#define YY_USES_REJECT
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
#define YY_FLEX_LEX_COMPAT
extern int yylineno;
int yylineno = 1;
extern char yytext[];

... snip ...

Just by commenting out the line

int yylineno = 1;

in the above, then the compile continues smoothly
although I am not sure if doing that was the
Right Thing (TM).

I am looking for a method on the line of how to modify
lexer.l to -not- allow the duplicated definition or to
#ifdef around the problem of its redefinition.

Tia, JimL
_________________________________________
| James W. Laferriere | Network Engineer |
| babydr@nwrain.net | System Techniques |
| 25416 - 22nd S. | Kent, WA 98032 |
| Give me VMS -or- Give me Linux |
| but only on AXP |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My libraries & programs status ( most are here now )

Linux-2.0.24 , eepro100.c/v0.12b/as module (the only one)
Gcc v. 2.7.2 ; binutils-2.6.0.14 ; sysvinit-2.62
ld.so.1.7.14 ; libc.so.5.3.12 ; libc.so.4.7.6
libg++.so.27.1.4 ;
proc-ps 0.99 ; net-tools 1.2.0 ; mount-2.5j
Modules 2.0.0 ; loadkeys 0.89 ;

--- Linux-Vax Port, Still in Progress . IE: No Progress To Report. ;-) ---