On Thu, 2008-05-01 at 22:59 +0300, S.Çağlar Onur wrote:
> Hi;
>
> Following patch makes ballista test suite compile with gcc-4.3, without this
> it completely fails because of C++ cleanups introduced with gcc-4.3.
>
Thanks for the update. This has been merged/applied.
Regards--
Subrata
> buildhouse ballista # gcc --version
> gcc (Pardus Linux) 4.3.0
> Copyright (C) 2008 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> buildhouse ballista # make
> make -i -C ballista
> make[1]:`/var/pisi/ltp-20080430-2/work/ltp-full-20080430/testcases/ballista/ballista'
> dizinine giriliyor
> g++ -Wno-deprecated -O callGen.cpp -o callGen
> callGen.cpp:20:22: error: iostream.h: No such file or directory
> callGen.cpp:21:21: error: fstream.h: No such file or directory
> callGen.cpp: In function 'int main(int, char**)':
> callGen.cpp:35: error: 'ofstream' was not declared in this scope
> callGen.cpp:35: error: expected `;' before 'os'
> callGen.cpp:36: error: expected `;' before 'def'
> callGen.cpp:43: error: 'cout' was not declared in this scope
> callGen.cpp:43: error: 'endl' was not declared in this scope
> callGen.cpp:51: error: 'cout' was not declared in this scope
> callGen.cpp:54: error: 'cout' was not declared in this scope
> [...]
>
> buildhouse ltp-full-20080430 # patch -p1 < /root/asd
> patching file testcases/ballista/ballista/ballista.cpp
> patching file testcases/ballista/ballista/ballistaUtil.cpp
> patching file testcases/ballista/ballista/callGen.cpp
> patching file testcases/ballista/ballista/callGen_standAlone.cpp
> patching file testcases/ballista/ballista/compile/bparser.cpp
> patching file testcases/ballista/ballista/create_code.pl
> patching file testcases/ballista/ballista/create_code_standAlone.pl
> patching file testcases/ballista/ballista/executeTestCase.cpp
> patching file testcases/ballista/ballista/executeTestCase.fresh
> patching file testcases/ballista/ballista/genCode.cpp
> patching file testcases/ballista/ballista/genCodeCreator.cpp
> patching file testcases/ballista/ballista/line.cpp
> patching file testcases/ballista/ballista/line.h
> patching file testcases/ballista/ballista/match.cpp
> patching file testcases/ballista/ballista/parseArguments.cpp
> patching file testcases/ballista/ballista/replacer.cpp
> patching file testcases/ballista/ballista/selfHost.cpp
> patching file testcases/ballista/ballista/serverCommunication.cpp
> patching file testcases/ballista/ballista/templates/bTypes.cpp
> patching file testcases/ballista/ballista/testCaseIterator.cpp
> patching file testcases/ballista/ballista/testCaseIterator.h
>
> buildhouse ballista # make
> make -i -C ballista
> make[1]:`/var/pisi/ltp-20080430-2/work/ltp-full-20080430/testcases/ballista/ballista'
> dizinine giriliyor
> g++ -Wno-deprecated -O callGen.cpp -o callGen
> /tmp/cc7I0TsS.o: In function `global constructors keyed to temp':
> callGen.cpp:(.text+0x3e): warning: the use of `tempnam' is dangerous, better
> use `mkstemp'
> g++ -Wno-deprecated -O callGen_standAlone.cpp -o callGen_standAlone
> /tmp/cc9OG6ET.o: In function `global constructors keyed to temp':
> callGen_standAlone.cpp:(.text+0x3e): warning: the use of `tempnam' is
> dangerous, better use `mkstemp'
> g++ -Wno-deprecated -O genCodeCreator.cpp -o genCodeCreator
> g++ -Wno-deprecated -O replacer.cpp -o replacer
> g++ -Wno-deprecated -w -O -DB_SELFHOST -c match.cpp
> g++ -Wno-deprecated -w -O -DB_SELFHOST -c line.cpp
> g++ -Wno-deprecated -w -O -DB_SELFHOST -c selfHost.cpp
> g++ -Wno-deprecated -w -O -DB_SELFHOST -c ballistaUtil.cpp
> g++ -Wno-deprecated -w -O -DB_SELFHOST -c testCaseIterator.cpp
> g++ -Wno-deprecated -w -O -DB_SELFHOST -c serverCommunication.cpp
> g++ -Wno-deprecated -w -O -DB_SELFHOST -c parseArguments.cpp
> g++ -Wno-deprecated -w -O -DB_SELFHOST -lpthread -ldl -lnsl -rdynamic
> ballista.cpp match.o line.o hack.o ballistaRPC.o ballistaXDR.o selfHost.o
> ballistaUtil.o marshal.o testCaseIterator.o serverCommunication.o
> parseArguments.o ballistaError.o -o ballista
> make[1]:
> `/var/pisi/ltp-20080430-2/work/ltp-full-20080430/testcases/ballista/ballista'
> dizininden çıkılıyor
>
> Signed-off-by: S.Çağlar Onur <[EMAIL PROTECTED]>
>
> diff -ur ltp-full-20080430.orig/testcases/ballista/ballista/ballista.cpp
> ltp-full-20080430/testcases/ballista/ballista/ballista.cpp
> --- ltp-full-20080430.orig/testcases/ballista/ballista/ballista.cpp
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/ballista.cpp
> 2008-05-01 22:49:32.000000000 +0300
> @@ -17,10 +17,10 @@
>
>
> #include <errno.h>
> -#include <iostream.h>
> +#include <iostream>
> #include <stdio.h>
> #include <stdlib.h>
> -#include <fstream.h>
> +#include <fstream>
> #include <signal.h>
> #include <string.h>
> #include <sys/stat.h>
> @@ -48,6 +48,8 @@
> #include "testCaseIterator.h"
> #include "testManager.h"
>
> +using namespace std;
> +
> #ifdef B_VXWORKS
> #include "vxworks.h"
> #else
> diff -ur ltp-full-20080430.orig/testcases/ballista/ballista/ballistaUtil.cpp
> ltp-full-20080430/testcases/ballista/ballista/ballistaUtil.cpp
> --- ltp-full-20080430.orig/testcases/ballista/ballista/ballistaUtil.cpp
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/ballistaUtil.cpp
> 2008-05-01 22:49:32.000000000 +0300
> @@ -19,12 +19,14 @@
> #include <assert.h>
> #include <string.h>
> #include <sys/time.h> //for get_time_in_microseconds
> -#include <iostream.h>
> +#include <iostream>
> #include <stdlib.h>
>
> #include "ballistaUtil.h"
> #include "ballista.h"
>
> +using namespace std;
> +
> /************************
> *
> * Function: safe_strncpy
> ltp-full-20080430.orig/testcases/ballista/ballista/bparser ve
> ltp-full-20080430/testcases/ballista/ballista/bparser dosyaları birbirinden
> farklı
> diff -ur ltp-full-20080430.orig/testcases/ballista/ballista/callGen.cpp
> ltp-full-20080430/testcases/ballista/ballista/callGen.cpp
> --- ltp-full-20080430.orig/testcases/ballista/ballista/callGen.cpp
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/callGen.cpp 2008-05-01
> 22:49:32.000000000 +0300
> @@ -17,11 +17,12 @@
>
> #include <stdio.h>
> #include <stdlib.h>
> -#include <iostream.h>
> -#include <fstream.h>
> +#include <iostream>
> +#include <fstream>
> #include <string.h>
> #define qt (char)34
>
> +using namespace std;
>
> char *temp=tempnam(NULL,"cg");
>
> diff -ur
> ltp-full-20080430.orig/testcases/ballista/ballista/callGen_standAlone.cpp
> ltp-full-20080430/testcases/ballista/ballista/callGen_standAlone.cpp
> --- ltp-full-20080430.orig/testcases/ballista/ballista/callGen_standAlone.cpp
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/callGen_standAlone.cpp
> 2008-05-01 22:49:32.000000000 +0300
> @@ -17,11 +17,12 @@
>
> #include <stdio.h>
> #include <stdlib.h>
> -#include <iostream.h>
> -#include <fstream.h>
> +#include <iostream>
> +#include <fstream>
> #include <string.h>
> #define qt (char)34
>
> +using namespace std;
>
> char *temp=tempnam(NULL,"cg");
>
> diff -ur
> ltp-full-20080430.orig/testcases/ballista/ballista/compile/bparser.cpp
> ltp-full-20080430/testcases/ballista/ballista/compile/bparser.cpp
> --- ltp-full-20080430.orig/testcases/ballista/ballista/compile/bparser.cpp
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/compile/bparser.cpp
> 2008-05-01 22:49:32.000000000 +0300
> @@ -22,7 +22,7 @@
> #include <stdio.h>
> #include <stdlib.h>
> #include <time.h>
> -//#include <vector.h>
> +//#include <vector>
> #include <vector>
> #include <unistd.h>
> #include "tokens.h"
> @@ -1076,7 +1076,7 @@
> h1<<"#include <iostream>"<<endl;
> h1<<"#include <stdio.h>"<<endl;
> h1<<"#include <stdlib.h>"<<endl;
> - h1<<"#include <stream.h>"<<endl;
> + h1<<"#include <fstream>"<<endl;
> h1<<"#include <string.h>"<<endl;
> h1<<"#include <sys/types.h>"<<endl;
> h1<<"#include <sys/stat.h>"<<endl;
> @@ -1228,7 +1228,7 @@
> cf<<"#include <iostream>"<<endl;
> cf<<"#include <stdio.h>"<<endl;
> cf<<"#include <stdlib.h>"<<endl;
> - cf<<"#include <stream.h>"<<endl;
> + cf<<"#include <fstream>"<<endl;
> cf<<"#include <string.h>"<<endl;
> cf<<"#include <sys/types.h>"<<endl;
> cf<<"#include <sys/stat.h>"<<endl;
> diff -ur ltp-full-20080430.orig/testcases/ballista/ballista/create_code.pl
> ltp-full-20080430/testcases/ballista/ballista/create_code.pl
> --- ltp-full-20080430.orig/testcases/ballista/ballista/create_code.pl
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/create_code.pl
> 2008-05-01 22:49:32.000000000 +0300
> @@ -175,7 +175,7 @@
> print OUTFILE '/* This code will work for most operating systems using g++ ';
> print OUTFILE 'You may have to add a couple #include lines, especially if ';
> print OUTFILE 'you are testing your own function */';
> -print OUTFILE "#include <stdio.h>\n#include <stdlib.h>\n#include
> <iostream.h>\n";
> +print OUTFILE "#include <stdio.h>\n#include <stdlib.h>\n#include
> <iostream>\n";
> #print OUTFILE "#include <unistd.h>\n\n\n";
>
> print OUTFILE '/* Includes from user */';
> diff -ur
> ltp-full-20080430.orig/testcases/ballista/ballista/create_code_standAlone.pl
> ltp-full-20080430/testcases/ballista/ballista/create_code_standAlone.pl
> ---
> ltp-full-20080430.orig/testcases/ballista/ballista/create_code_standAlone.pl
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/create_code_standAlone.pl
> 2008-05-01 22:49:32.000000000 +0300
> @@ -182,7 +182,7 @@
> print OUTFILE '/* This code will work for most operating systems using g++ ';
> print OUTFILE 'You may have to add a couple #include lines, especially if ';
> print OUTFILE 'you are testing your own function */';
> -print OUTFILE "#include <stdio.h>\n#include <stdlib.h>\n#include
> <iostream.h>\n";
> +print OUTFILE "#include <stdio.h>\n#include <stdlib.h>\n#include
> <iostream>\n";
> #print OUTFILE "#include <unistd.h>\n\n\n";
>
> print OUTFILE '/* Includes from user */';
> diff -ur
> ltp-full-20080430.orig/testcases/ballista/ballista/executeTestCase.cpp
> ltp-full-20080430/testcases/ballista/ballista/executeTestCase.cpp
> --- ltp-full-20080430.orig/testcases/ballista/ballista/executeTestCase.cpp
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/executeTestCase.cpp
> 2008-05-01 22:49:32.000000000 +0300
> @@ -17,7 +17,7 @@
>
> #include "executeTestCase.h"
> #include <stdio.h>
> -#include <iostream.h>
> +#include <iostream>
> #include <signal.h>
> #include "unmarshal.h"
>
> diff -ur
> ltp-full-20080430.orig/testcases/ballista/ballista/executeTestCase.fresh
> ltp-full-20080430/testcases/ballista/ballista/executeTestCase.fresh
> --- ltp-full-20080430.orig/testcases/ballista/ballista/executeTestCase.fresh
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/executeTestCase.fresh
> 2008-05-01 22:49:32.000000000 +0300
> @@ -17,7 +17,7 @@
>
> #include "executeTestCase.h"
> #include <stdio.h>
> -#include <iostream.h>
> +#include <iostream>
> #include <signal.h>
> #include "unmarshal.h"
>
> diff -ur ltp-full-20080430.orig/testcases/ballista/ballista/genCode.cpp
> ltp-full-20080430/testcases/ballista/ballista/genCode.cpp
> --- ltp-full-20080430.orig/testcases/ballista/ballista/genCode.cpp
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/genCode.cpp 2008-05-01
> 22:49:32.000000000 +0300
> @@ -15,8 +15,8 @@
> // along with this program; if not, write to the Free Software
> // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
> USA.
>
> -#include <iostream.h>
> -#include <fstream.h>
> +#include <iostream>
> +#include <fstream>
> #include <stdio.h>
> #include <stdlib.h>
>
> diff -ur
> ltp-full-20080430.orig/testcases/ballista/ballista/genCodeCreator.cpp
> ltp-full-20080430/testcases/ballista/ballista/genCodeCreator.cpp
> --- ltp-full-20080430.orig/testcases/ballista/ballista/genCodeCreator.cpp
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/genCodeCreator.cpp
> 2008-05-01 22:49:32.000000000 +0300
> @@ -23,13 +23,15 @@
> // is useful for bug reports.
>
> //-------------------------------------------------------------------------------------------
>
> -#include <iostream.h>
> -#include <fstream.h>
> +#include <iostream>
> +#include <fstream>
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> #include "ballista.h"
>
> +using namespace std;
> +
> int main(int argc, char *argv[])
> {
> if (argc < 5)
> diff -ur ltp-full-20080430.orig/testcases/ballista/ballista/line.cpp
> ltp-full-20080430/testcases/ballista/ballista/line.cpp
> --- ltp-full-20080430.orig/testcases/ballista/ballista/line.cpp
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/line.cpp 2008-05-01
> 22:49:32.000000000 +0300
> @@ -15,12 +15,14 @@
> // along with this program; if not, write to the Free Software
> // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
> USA.
>
> -#include <iostream.h>
> +#include <iostream>
> #include <stdlib.h>
> -#include <stream.h>
> +#include <fstream>
> #include <string.h>
> #include "line.h"
>
> +using namespace std;
> +
> line::line()
> {
> p=NULL;
> diff -ur ltp-full-20080430.orig/testcases/ballista/ballista/line.h
> ltp-full-20080430/testcases/ballista/ballista/line.h
> --- ltp-full-20080430.orig/testcases/ballista/ballista/line.h 2008-05-01
> 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/line.h 2008-05-01
> 22:49:32.000000000 +0300
> @@ -18,8 +18,10 @@
> #ifndef _LINE_H_
> #define _LINE_H_
>
> -#include <iostream.h>
> -#include <stream.h>
> +#include <iostream>
> +#include <fstream>
> +
> +using namespace std;
>
> class line
> {
> diff -ur ltp-full-20080430.orig/testcases/ballista/ballista/match.cpp
> ltp-full-20080430/testcases/ballista/ballista/match.cpp
> --- ltp-full-20080430.orig/testcases/ballista/ballista/match.cpp
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/match.cpp 2008-05-01
> 22:49:32.000000000 +0300
> @@ -21,10 +21,11 @@
> #include <regex.h>
> #include <sys/types.h>
> #include <sys/stat.h>
> -#include <fstream.h>
> +#include <fstream>
>
> #include "match.h"
>
> +using namespace std;
>
> /************************
> *
> diff -ur
> ltp-full-20080430.orig/testcases/ballista/ballista/parseArguments.cpp
> ltp-full-20080430/testcases/ballista/ballista/parseArguments.cpp
> --- ltp-full-20080430.orig/testcases/ballista/ballista/parseArguments.cpp
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/parseArguments.cpp
> 2008-05-01 22:49:32.000000000 +0300
> @@ -17,12 +17,14 @@
> */
>
> #include <stdlib.h>
> -#include <iostream.h>
> +#include <iostream>
> #include <ctype.h>
> #include <assert.h>
> #include "parseArguments.h"
> #include "ballistaUtil.h"
>
> +using namespace std;
> +
> /************************
> *
> * Function: Parse_arguments
> diff -ur ltp-full-20080430.orig/testcases/ballista/ballista/replacer.cpp
> ltp-full-20080430/testcases/ballista/ballista/replacer.cpp
> --- ltp-full-20080430.orig/testcases/ballista/ballista/replacer.cpp
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/replacer.cpp
> 2008-05-01 22:49:32.000000000 +0300
> @@ -15,12 +15,14 @@
> // along with this program; if not, write to the Free Software
> // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
> USA.
>
> -#include <iostream.h>
> -#include <fstream.h>
> +#include <iostream>
> +#include <fstream>
> #include <stdio.h>
> #include <string.h>
> #include <stdlib.h>
>
> +using namespace std;
> +
> // From: John Peter DeVale <[EMAIL PROTECTED]>
> // To: [EMAIL PROTECTED]
> // Message-ID: <[EMAIL PROTECTED]>
> diff -ur ltp-full-20080430.orig/testcases/ballista/ballista/selfHost.cpp
> ltp-full-20080430/testcases/ballista/ballista/selfHost.cpp
> --- ltp-full-20080430.orig/testcases/ballista/ballista/selfHost.cpp
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/selfHost.cpp
> 2008-05-01 22:49:32.000000000 +0300
> @@ -18,7 +18,7 @@
>
> #include <assert.h> //for asserts in manage_test
> #include <dlfcn.h> //for dynamic loading in constructor
> -#include <iostream.h> //for cout and cerr
> +#include <iostream> //for cout and cerr
> #include <signal.h> //for SIGKILL
> #include <stdio.h> //generally needed
> #include <stdlib.h> //generally needed
> @@ -35,6 +35,8 @@
> #include "marshal.h"
> #include "selfHost.h"
>
> +using namespace std;
> +
> extern "C" int execute_test_case (char *marshalled_parameters);
>
> #ifdef SUN
> diff -ur
> ltp-full-20080430.orig/testcases/ballista/ballista/serverCommunication.cpp
> ltp-full-20080430/testcases/ballista/ballista/serverCommunication.cpp
> ---
> ltp-full-20080430.orig/testcases/ballista/ballista/serverCommunication.cpp
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/serverCommunication.cpp
> 2008-05-01 22:49:32.000000000 +0300
> @@ -30,6 +30,7 @@
> #include "ballistaRPC.h"
> #include "ballistaUtil.h"
>
> +using namespace std;
>
> #ifdef HP
> extern "C" CLIENT * clnt_create(char *, u_long, u_long, char*);
> @@ -58,9 +59,9 @@
> * Notes:
> *
> ************************/
> -#include <iostream.h>
> +#include <iostream>
> #include <netdb.h>
> -#include <fstream.h>
> +#include <fstream>
> #include <signal.h>
> #include <string.h>
>
> diff -ur
> ltp-full-20080430.orig/testcases/ballista/ballista/templates/bTypes.cpp
> ltp-full-20080430/testcases/ballista/ballista/templates/bTypes.cpp
> --- ltp-full-20080430.orig/testcases/ballista/ballista/templates/bTypes.cpp
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/templates/bTypes.cpp
> 2008-05-01 22:49:32.000000000 +0300
> @@ -42,8 +42,8 @@
> //---------------------------------------------------------------------------
> #include <stdio.h>
> #include <stdlib.h>
> -#include <stream.h>
> -#include <iostream.h>
> +#include <fstream>
> +#include <iostream>
> #include <string.h>
> #include <sys/types.h>
> #include <sys/stat.h>
> diff -ur
> ltp-full-20080430.orig/testcases/ballista/ballista/testCaseIterator.cpp
> ltp-full-20080430/testcases/ballista/ballista/testCaseIterator.cpp
> --- ltp-full-20080430.orig/testcases/ballista/ballista/testCaseIterator.cpp
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/testCaseIterator.cpp
> 2008-05-01 22:49:32.000000000 +0300
> @@ -21,6 +21,8 @@
> #include "ballista.h"
> #include "testCaseIterator.h"
>
> +using namespace std;
> +
> /************************
> *
> * Function: Test_case_iterator
> diff -ur
> ltp-full-20080430.orig/testcases/ballista/ballista/testCaseIterator.h
> ltp-full-20080430/testcases/ballista/ballista/testCaseIterator.h
> --- ltp-full-20080430.orig/testcases/ballista/ballista/testCaseIterator.h
> 2008-05-01 15:09:30.000000000 +0300
> +++ ltp-full-20080430/testcases/ballista/ballista/testCaseIterator.h
> 2008-05-01 22:49:32.000000000 +0300
> @@ -22,10 +22,12 @@
>
>
> #include "ballistaRPC.h"
> -#include <vector.h>
> +#include <vector>
> #include "line.h"
> #include "serverCommunication.h"
>
> +using namespace std;
> +
> class Test_case_iterator {
> three_dim *result_1;
> info get_array_1_arg;
>
> Cheers
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list