Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 29179 Details for
Bug 43449
compile error building re2c dependency in php-cvs
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch to fix gcc 3.x issues
gcc3ify-pass5.patch (text/plain), 7.71 KB, created by
Beu
on 2004-04-12 20:21:00 UTC
(
hide
)
Description:
proposed patch to fix gcc 3.x issues
Filename:
MIME Type:
Creator:
Beu
Created:
2004-04-12 20:21:00 UTC
Size:
7.71 KB
patch
obsolete
>diff -Nrup re2c-0.9.1/Makefile re2c-0.9.1-gentoo/Makefile >--- re2c-0.9.1/Makefile 1999-08-27 03:46:32.000000000 +0000 >+++ re2c-0.9.1-gentoo/Makefile 2004-04-13 04:15:51.490805058 +0000 >@@ -3,13 +3,13 @@ > #Initial revision > # > >-BIN = /usr/local/bin >-MAN = /usr/local/man >+BIN = /usr/bin >+MAN = /usr/share/man > >-%.o : %.cc ; $(CC) -o $@ $(CFLAGS) -c $< >+%.o : %.cc ; $(CXX) -o $@ $(CXXFLAGS) -c $< >+%.o : %.c ; $(CC) -o $@ $(CFLAGS) -c $< > %.cc : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@ > %.cc : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@ >- > %.cc: %.re > re2c -s $< >$@ > >@@ -30,7 +30,8 @@ clean: > > parser.cc: parser.y > yacc -d parser.y >- mv -f y.tab.c parser.cc >+ grep -v '^char \* getenv' y.tab.c >y.tab.c.new >+ mv -f y.tab.c.new parser.cc > > re2c: $(OBJS) > $(CC) -o $@ $(OBJS) $(LDFLAGS) -lstdc++ >diff -Nrup re2c-0.9.1/actions.cc re2c-0.9.1-gentoo/actions.cc >--- re2c-0.9.1/actions.cc 1999-08-27 03:46:32.000000000 +0000 >+++ re2c-0.9.1-gentoo/actions.cc 2004-04-13 03:38:45.795861228 +0000 >@@ -1,7 +1,7 @@ > #include <time.h> > #include <string.h> >-#include <iostream.h> >-#include <iomanip.h> >+#include <iostream> >+#include <iomanip> > > #include "globals.h" > #include "parser.h" >diff -Nrup re2c-0.9.1/bootstrap/parser.cc re2c-0.9.1-gentoo/bootstrap/parser.cc >--- re2c-0.9.1/bootstrap/parser.cc 1999-08-27 03:46:32.000000000 +0000 >+++ re2c-0.9.1-gentoo/bootstrap/parser.cc 2004-04-13 03:53:38.914194583 +0000 >@@ -10,8 +10,9 @@ static char yysccsid[] = "@(#)yaccpar 1. > #define YYPREFIX "yy" > #line 2 "parser.y" > >+#include <stdlib.h> > #include <time.h> >-#include <iostream.h> >+#include <iostream> > #include <string.h> > #include <malloc.h> > #include "globals.h" >@@ -242,7 +243,6 @@ yyparse() > register int yym, yyn, yystate; > #if YYDEBUG > register char *yys; >- extern char *getenv(); > > if (yys = getenv("YYDEBUG")) > { >diff -Nrup re2c-0.9.1/bootstrap/scanner.cc re2c-0.9.1-gentoo/bootstrap/scanner.cc >--- re2c-0.9.1/bootstrap/scanner.cc 1999-08-27 03:46:32.000000000 +0000 >+++ re2c-0.9.1-gentoo/bootstrap/scanner.cc 2004-04-13 03:42:41.180051638 +0000 >@@ -2,7 +2,7 @@ > #line 1 "scanner.re" > #include <stdlib.h> > #include <string.h> >-#include <iostream.h> >+#include <iostream> > #include <unistd.h> > #include "scanner.h" > #include "parser.h" >diff -Nrup re2c-0.9.1/code.cc re2c-0.9.1-gentoo/code.cc >--- re2c-0.9.1/code.cc 1999-08-27 03:46:32.000000000 +0000 >+++ re2c-0.9.1-gentoo/code.cc 2004-04-13 03:38:53.875597712 +0000 >@@ -1,9 +1,10 @@ > #include <stdlib.h> > #include <string.h> > #include <ctype.h> >-#include <iomanip.h> >-#include "substr.h" >+#include <iomanip> >+ > #include "globals.h" >+#include "substr.h" > #include "dfa.h" > > // there must be at least one span in list; all spans must cover >diff -Nrup re2c-0.9.1/dfa.cc re2c-0.9.1-gentoo/dfa.cc >--- re2c-0.9.1/dfa.cc 1999-08-27 03:46:32.000000000 +0000 >+++ re2c-0.9.1-gentoo/dfa.cc 2004-04-13 03:35:46.100962078 +0000 >@@ -1,6 +1,7 @@ > #include <stdlib.h> > #include <ctype.h> > #include <string.h> >+ > #include "globals.h" > #include "substr.h" > #include "dfa.h" >diff -Nrup re2c-0.9.1/dfa.h re2c-0.9.1-gentoo/dfa.h >--- re2c-0.9.1/dfa.h 1999-08-27 03:46:32.000000000 +0000 >+++ re2c-0.9.1-gentoo/dfa.h 2004-04-13 03:39:21.297309480 +0000 >@@ -1,7 +1,7 @@ > #ifndef _dfa_h > #define _dfa_h > >-#include <iostream.h> >+#include <iostream> > #include "re.h" > > extern void prtCh(ostream&, uchar); >diff -Nrup re2c-0.9.1/examples/rexx/rexx.l re2c-0.9.1-gentoo/examples/rexx/rexx.l >--- re2c-0.9.1/examples/rexx/rexx.l 1999-08-27 03:46:32.000000000 +0000 >+++ re2c-0.9.1-gentoo/examples/rexx/rexx.l 2004-04-13 03:46:20.398770018 +0000 >@@ -1,3 +1,4 @@ >+#include "globals.h" > #include "scanio.h" > #include "scanner.h" > >diff -Nrup re2c-0.9.1/globals.h re2c-0.9.1-gentoo/globals.h >--- re2c-0.9.1/globals.h 1999-08-27 03:46:32.000000000 +0000 >+++ re2c-0.9.1-gentoo/globals.h 2004-04-13 03:57:53.226425008 +0000 >@@ -12,4 +12,15 @@ extern uchar ebc2asc[256]; > > extern uchar *xlat, *talx; > >+/* Need to use a few pieces from the `std' namespace */ >+using namespace std; >+ >+#ifdef __cplusplus >+# define BEGIN_C_DECLS() extern "C" { >+# define END_C_DECLS() } >+#else >+# define BEGIN_C_DECLS() >+# define END_C_DECLS() >+#endif /* ! __cplusplus */ >+ > #endif >diff -Nrup re2c-0.9.1/ins.h re2c-0.9.1-gentoo/ins.h >--- re2c-0.9.1/ins.h 1999-08-27 03:46:32.000000000 +0000 >+++ re2c-0.9.1-gentoo/ins.h 2004-04-13 03:39:27.514337256 +0000 >@@ -1,7 +1,7 @@ > #ifndef _ins_h > #define _ins_h > >-#include <iostream.h> >+#include <iostream> > #include "basics.h" > > const uint nChars = 256; >diff -Nrup re2c-0.9.1/main.cc re2c-0.9.1-gentoo/main.cc >--- re2c-0.9.1/main.cc 1999-08-27 03:46:32.000000000 +0000 >+++ re2c-0.9.1-gentoo/main.cc 2004-04-13 03:39:10.277032841 +0000 >@@ -1,7 +1,7 @@ >-#include <fstream.h> > #include <stdlib.h> > #include <fcntl.h> > #include <unistd.h> >+#include <fstream> > > #include "globals.h" > #include "parser.h" >diff -Nrup re2c-0.9.1/parser.y re2c-0.9.1-gentoo/parser.y >--- re2c-0.9.1/parser.y 1999-08-27 03:46:32.000000000 +0000 >+++ re2c-0.9.1-gentoo/parser.y 2004-04-13 04:12:28.852493819 +0000 >@@ -1,15 +1,23 @@ > %{ > >+#include <stdlib.h> > #include <time.h> >-#include <iostream.h> >+#include <iostream> > #include <string.h> > #include <malloc.h> >+ > #include "globals.h" > #include "parser.h" >+#include "scanner.h" >+ >+BEGIN_C_DECLS() >+ > int yyparse(); > int yylex(); > void yyerror(char*); > >+END_C_DECLS() >+ > static uint accept; > static RegExp *spec; > static Scanner *in; >diff -Nrup re2c-0.9.1/re.h re2c-0.9.1-gentoo/re.h >--- re2c-0.9.1/re.h 1999-08-27 03:46:32.000000000 +0000 >+++ re2c-0.9.1-gentoo/re.h 2004-04-13 03:39:33.966328288 +0000 >@@ -1,7 +1,7 @@ > #ifndef _re_h > #define _re_h > >-#include <iostream.h> >+#include <iostream> > #include "token.h" > #include "ins.h" > >diff -Nrup re2c-0.9.1/scanner.h re2c-0.9.1-gentoo/scanner.h >--- re2c-0.9.1/scanner.h 1999-08-27 03:46:32.000000000 +0000 >+++ re2c-0.9.1-gentoo/scanner.h 2004-04-13 03:32:35.648745166 +0000 >@@ -6,10 +6,10 @@ > class Scanner { > private: > int in; >- uchar *bot, *tok, *ptr, *cur, *pos, *lim, *top, *eof; >+ char *bot, *tok, *ptr, *cur, *pos, *lim, *top, *eof; > uint tchar, tline, cline; > private: >- uchar *fill(uchar*); >+ char *fill(char*); > public: > Scanner(int); > int echo(ostream&); >diff -Nrup re2c-0.9.1/scanner.re re2c-0.9.1-gentoo/scanner.re >--- re2c-0.9.1/scanner.re 1999-08-27 03:46:32.000000000 +0000 >+++ re2c-0.9.1-gentoo/scanner.re 2004-04-13 03:55:45.524395166 +0000 >@@ -1,6 +1,6 @@ > #include <stdlib.h> > #include <string.h> >-#include <iostream.h> >+#include <iostream> > #include <unistd.h> > #include "scanner.h" > #include "parser.h" >@@ -10,7 +10,7 @@ extern YYSTYPE yylval; > > #define BSIZE 8192 > >-#define YYCTYPE uchar >+#define YYCTYPE char > #define YYCURSOR cursor > #define YYLIMIT lim > #define YYMARKER ptr >@@ -25,7 +25,7 @@ Scanner::Scanner(int i) : in(i), > ; > } > >-uchar *Scanner::fill(uchar *cursor){ >+char *Scanner::fill(char *cursor){ > if(!eof){ > uint cnt = tok - bot; > if(cnt){ >@@ -37,7 +37,7 @@ uchar *Scanner::fill(uchar *cursor){ > lim -= cnt; > } > if((top - lim) < BSIZE){ >- uchar *buf = new uchar[(lim - bot) + BSIZE]; >+ char *buf = new char[(lim - bot) + BSIZE]; > memcpy(buf, tok, lim - tok); > tok = buf; > ptr = &buf[ptr - bot]; >@@ -68,7 +68,7 @@ digit = [0-9]; > */ > > int Scanner::echo(ostream &out){ >- uchar *cursor = cur; >+ char *cursor = cur; > tok = cursor; > echo: > /*!re2c >@@ -85,7 +85,7 @@ echo: > > > int Scanner::scan(){ >- uchar *cursor = cur; >+ char *cursor = cur; > uint depth; > > scan: >diff -Nrup re2c-0.9.1/substr.h re2c-0.9.1-gentoo/substr.h >--- re2c-0.9.1/substr.h 1999-08-27 03:46:32.000000000 +0000 >+++ re2c-0.9.1-gentoo/substr.h 2004-04-13 04:11:24.262594445 +0000 >@@ -1,7 +1,8 @@ > #ifndef _substr_h > #define _substr_h > >-#include <iostream.h> >+#include <iostream> >+#include "globals.h" > #include "basics.h" > > class SubStr {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 43449
: 29179 |
32143