I have found that the following is requireed to compile
with gcc 3.0. Also attached as a text file (unix line
ends, UTF-8).
diff -ru dbdesigner/dbdesign/fldcolors.cpp
dbdesigner.orig/dbdesign/fldcolors.cpp
--- dbdesigner/dbdesign/fldcolors.cpp Wed Jun 13
14:27:17 2001
+++ dbdesigner.orig/dbdesign/fldcolors.cpp Sat
Sep 15 12:17:41 2001
@@ -20,12 +20,12 @@
#include <stdlib.h>
QColor fldcolors(int idx){
- srandom(idx+1);
- int r = (int)(255.0*random()/(RAND_MAX+1.0));
- random();
- int g = (int)(255.0*random()/(RAND_MAX+1.0));
- random();
- int b = (int)(255.0*random()/(RAND_MAX+1.0));
+ std::srand(idx+1);
+ int r = (int)(255.0*std::rand()/
(RAND_MAX+1.0));
+ std::rand();
+ int g = (int)(255.0*std::rand()/
(RAND_MAX+1.0));
+ std::rand();
+ int b = (int)(255.0*std::rand()/
(RAND_MAX+1.0));
//cerr << r << "," << g << "," << b <<endl;
diff -ru dbdesigner/dbdesign/fldcolors.h
dbdesigner.orig/dbdesign/fldcolors.h
--- dbdesigner/dbdesign/fldcolors.h Wed Jun 13
14:27:17 2001
+++ dbdesigner.orig/dbdesign/fldcolors.h Sat
Sep 15 12:13:23 2001
@@ -18,6 +18,7 @@
#define FLDCOLORS_H
#include <qcolor.h>
+#include <stdlib.h>
QColor fldcolors(int idx);
Logged In: NO
This gets it to compile, but I've only managed to link with
gcc-2.x
Logged In: YES
user_id=1376638
I don't understand how this patches work??? Can u help me
please.