Package: glcpu
Version: 1.0.1
Author: Guillem Jover <guillem@hadrons.org>
Status: applied
Description:
 New C++ Std compiliing failure.

diff -aur glcpu-1.0.1/main.cc glcpu-1.0.1-patched/main.cc
--- glcpu-1.0.1/main.cc	2003-03-15 20:09:44.000000000 +0100
+++ glcpu-1.0.1-patched/main.cc	2003-03-15 20:52:54.000000000 +0100
@@ -20,7 +20,7 @@
  **/
 
 #include <iostream>
-#include <strstream>
+#include <sstream>
 #include <string>
 #include <list>
 #include <vector>
@@ -557,7 +557,7 @@
 
 int parse_int(string v)
 {
-        istrstream tmp1(v.c_str());
+        istringstream tmp1(v.c_str());
         int tmp2;
         tmp1 >> tmp2;
         return tmp2;
@@ -569,7 +569,7 @@
 
 double parse_double(string v)
 {
-        istrstream tmp1(v.c_str());
+        istringstream tmp1(v.c_str());
         double tmp2;
         tmp1 >> tmp2;
         return tmp2;
diff -aur glcpu-1.0.1/Makefile glcpu-1.0.1-patched/Makefile
--- glcpu-1.0.1/Makefile	2003-03-15 20:09:44.000000000 +0100
+++ glcpu-1.0.1-patched/Makefile	2003-03-15 20:53:30.000000000 +0100
@@ -4,9 +4,10 @@
 OBJSSTATD = statd.o cpu.o
 CCFLAGS = $(CFLAGS)
 CCFLAGS += -D_GNU_SOURCE -ansi -Wall -DOS_$(shell uname) -I/usr/X11R6/include
+CCFLAGS += -I$(shell ccgnu-config --includes)
 # CommonC++ headers fail -pedantic checking
 LIBS = -L/usr/X11R6/lib -lX11 -lXext -lXmu
-DLIBS = -lccgnu -lGL -lGLU -lglut -lpthread
+DLIBS = $(shell ccgnu-config --gnulibs) -lGL -lGLU -lglut -lpthread
 SLIBS = -ldl /usr/lib/libccgnu.a /usr/lib/libpthread.a /usr/lib/libglut.a /usr/lib/libGL.a /usr/lib/libGLU.a
 PREFIX = /usr/local
 
diff -aur glcpu-1.0.1/parser.cc glcpu-1.0.1-patched/parser.cc
--- glcpu-1.0.1/parser.cc	2003-03-15 20:09:44.000000000 +0100
+++ glcpu-1.0.1-patched/parser.cc	2003-03-09 06:27:30.000000000 +0100
@@ -93,22 +93,22 @@
 		switch (state) {
 		case 0: // leading space
 			if (!isspace(*i)) {
-				tmp.append(i, 1);
+				tmp.push_back(*i);
 				state = 1;
 			}
 			break;
 		case 1: // keyname
 			if (*i == '=') {
-				tmp.append(i, 1);
+				tmp.push_back(*i);
 				state = 2;
 			} else if (!isspace(*i))
-				tmp.append(i, 1);
+				tmp.push_back(*i);
 			else
 				state = 6;
 			break;
 		case 6: // after space after keyname
 			if (*i == '=') {
-				tmp.append(i, 1);
+				tmp.push_back(*i);
 				state = 2;
 			} else if (isspace(*i))
 				throw(string("illegal space in key name"));
@@ -118,7 +118,7 @@
 			if (*i == '"')
 				state = 4;
 			else if (!isspace(*i)) {
-				tmp.append(i, 1);
+				tmp.push_back(*i);
 				state = 3;
 			}
 			break;
@@ -128,14 +128,14 @@
 			else if (isspace(*i))
 				state = 5;
 			else
-				tmp.append(i, 1);
+				tmp.push_back(*i);
 			break;
 			
 		case 4: // inside quoted value
 			if (*i == '"')
 				state = 5;
 			else
-				tmp.append(i, 1);
+				tmp.push_back(*i);
 			break;
 		case 5: // after value
 			if (!isspace(*i))
diff -aur glcpu-1.0.1/parser.h glcpu-1.0.1-patched/parser.h
--- glcpu-1.0.1/parser.h	2002-01-07 07:13:10.000000000 +0100
+++ glcpu-1.0.1-patched/parser.h	2003-03-09 06:47:33.000000000 +0100
@@ -26,9 +26,9 @@
 
 class Parser {
  private:
-	static void parse_line(string /* line */, unsigned /* line number */,
+	static void parse_line(std::string /* line */, unsigned /* line number */,
 			       Config*);
-	static string subparse_line(string);
+	static std::string subparse_line(std::string);
 	
  public:
 	static Config* parse(string /* filename */);
