|
From: Per P. <per...@ma...> - 2005-05-15 18:31:20
|
On May 11, 2005, at 21:18, Hans-Bernhard Broeker wrote: > Brendan Burns wrote: > >> In file included from term.h:400, >> from term.c:1205: >> ../term/pslatex.trm:120: error: static declaration of >> 'epslatex_header' follows non-static declaration >> ../term/post.h:88: error: previous declaration of >> 'epslatex_header' was here >> > > That's strange --- this is usually just a warning, not an error. > Did GCC change its behaviour on this? > > >> Changing >> "static char *epslatex_header..." -> "char *epslatex_header..." >> in pslatex.trm fixed the compile error. >> > > It's quite probably the wrong direction of change, though. Making > the declaration in post.h 'static' makes more sense. Actually, it > should probably be TERM_PUBLIC, which evaluates to static. I'm on 10.4 now and the following change to post.h seems to fix the build problems: Index: term/post.h =================================================================== RCS file: /cvsroot/gnuplot/gnuplot/term/post.h,v retrieving revision 1.7 diff -u -d -b -w -r1.7 post.h --- term/post.h 2 Mar 2005 19:44:57 -0000 1.7 +++ term/post.h 15 May 2005 18:20:22 -0000 @@ -85,6 +85,6 @@ #define EPSLATEX_HCHAR (11*PS_SC*6/10) /* additional LaTeX header information for epslatex terminal */ -extern char *epslatex_header; +TERM_PUBLIC char *epslatex_header; #endif /* TERM_POST_H */ Am I right in assuming that using the 'extern' qualifier in post.h, which will be pulled into term.c with the rest of the terminal stuff, was never strictly correct and that gcc 4.0 now returns an error? Should I commit this change? /Per |