1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-20 04:02:27 +00:00

Fix build with gcc-3.4

This commit is contained in:
Kirill Ponomarev 2004-08-22 19:16:00 +00:00
parent cd820ee6a3
commit 87d71cf966
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=117050
12 changed files with 366 additions and 0 deletions

View File

@ -0,0 +1,41 @@
$FreeBSD$
--- src/lib/txt/lib/PrintTable.cpp.orig Sun Aug 22 21:13:07 2004
+++ src/lib/txt/lib/PrintTable.cpp Sun Aug 22 21:13:50 2004
@@ -85,7 +85,7 @@
d_cols = 1;
d_rows = 0;
// initialize the data table
- p_data = new (String*)[d_size];
+ p_data = new String*[d_size];
for (long i = 0; i < d_size; i++) p_data[i] = nilp;
// initialize the format size and column width
p_csiz = new long [d_cols];
@@ -107,7 +107,7 @@
d_cols = cols;
d_rows = 0;
// initialize the data table
- p_data = new (String*)[d_size];
+ p_data = new String*[d_size];
for (long i = 0; i < d_size; i++) p_data[i] = nilp;
// initialize the format size and column width
p_csiz = new long [d_cols];
@@ -129,7 +129,7 @@
d_cols = cols;
d_rows = 0;
// initialize the data table
- p_data = new (String*)[d_size];
+ p_data = new String*[d_size];
for (long i = 0; i < d_size; i++) p_data[i] = nilp;
// initialize the format size and column width
p_csiz = new long [d_cols];
@@ -362,7 +362,7 @@
return;
}
// create a new table
- String** data = new (String*) [size];
+ String** data = new String* [size];
for (long i = 0; i < d_rows; i++) data[i] = p_data[i];
for (long i = d_rows; i < size; i++) data[i] = nilp;
// update table and remove old one

View File

@ -0,0 +1,14 @@
$FreeBSD$
--- src/std/lib/Finalize.cpp.orig Sun Aug 22 21:06:42 2004
+++ src/std/lib/Finalize.cpp Sun Aug 22 21:06:51 2004
@@ -27,7 +27,7 @@
d_size = FIFO_SIZE;
d_pos = FIFO_SIZE-1;
d_lock = false;
- p_fifo = new (Object*)[d_size];
+ p_fifo = new Object*[d_size];
for (long i = 0; i < d_size; i++) p_fifo[i] = nilp;
}

View File

@ -0,0 +1,32 @@
$FreeBSD$
--- src/std/lib/HashTable.cpp.orig Sun Aug 22 21:07:04 2004
+++ src/std/lib/HashTable.cpp Sun Aug 22 21:07:46 2004
@@ -90,7 +90,7 @@
d_size = c_prime (0);
d_thrs = (d_size * 7) / 10;
d_count = 0;
- p_table = new (s_bucket*)[d_size];
+ p_table = new s_bucket*[d_size];
// initialize the table with null pointers
for (long i = 0; i < d_size; i++)
@@ -104,7 +104,7 @@
d_size = c_prime (size);
d_thrs = (size * 7) / 10;
d_count = 0;
- p_table = new (s_bucket*)[d_size];
+ p_table = new s_bucket*[d_size];
// initialize the table with null pointers
for (long i = 0; i < d_size; i++)
@@ -248,7 +248,7 @@
if (size < d_size) return;
// initialize the new table
- s_bucket** table = new (s_bucket*)[size];
+ s_bucket** table = new s_bucket*[size];
for (long i = 0; i < size; i++) table[i] = nilp;
// rebuild the table

View File

@ -0,0 +1,32 @@
$FreeBSD$
--- src/std/lib/QuarkTable.cpp.orig Sun Aug 22 21:08:41 2004
+++ src/std/lib/QuarkTable.cpp Sun Aug 22 21:09:12 2004
@@ -86,7 +86,7 @@
d_size = c_prime (0);
d_thrs = (d_size * 7) / 10;
d_count = 0;
- p_table = new (s_quanode*)[d_size];
+ p_table = new s_quanode*[d_size];
for (long i = 0; i < d_size; i++) p_table[i] = nilp;
}
@@ -97,7 +97,7 @@
d_size = c_prime (size);
d_thrs = (size * 7) / 10;
d_count = 0;
- p_table = new (s_quanode*)[d_size];
+ p_table = new s_quanode*[d_size];
for (long i = 0; i < d_size; i++) p_table[i] = nilp;
}
@@ -251,7 +251,7 @@
if (size < d_size) return;
// initialize the new table
- s_quanode** table = new (s_quanode*)[size];
+ s_quanode** table = new s_quanode*[size];
for (long i = 0; i < size; i++) table[i] = nilp;
// rebuild the table

View File

@ -0,0 +1,23 @@
$FreeBSD$
--- src/std/lib/Reactor.cpp.orig Sun Aug 22 21:09:53 2004
+++ src/std/lib/Reactor.cpp Sun Aug 22 21:10:10 2004
@@ -60,7 +60,7 @@
d_size = c_prime (0);
d_thrs = (d_size * 7) / 10;
d_count = 0;
- p_table = new (s_qnode*)[d_size];
+ p_table = new s_qnode*[d_size];
for (long i = 0; i < d_size; i++) p_table[i] = nilp;
p_vector = new Strvec (d_size);
p_vector->add ("");
@@ -111,7 +111,7 @@
// check for the size
if (size < d_size) return;
// initialize the table
- s_qnode** table = new (s_qnode*)[size];
+ s_qnode** table = new s_qnode*[size];
for (long i = 0; i < size; i++) table[i] = nilp;
// rebuild the table
for (long i = 0; i < d_size; i++) {

View File

@ -0,0 +1,41 @@
$FreeBSD$
--- src/std/lib/Vector.cpp.orig Sun Aug 22 21:10:59 2004
+++ src/std/lib/Vector.cpp Sun Aug 22 21:11:43 2004
@@ -56,7 +56,7 @@
if (size < 0) throw Exception ("size-error","in vector constructor");
d_size = size;
d_length = 0;
- p_vector = new (Object*)[d_size];
+ p_vector = new Object*[d_size];
for (long i = 0; i < d_size; i++) p_vector[i] = nilp;
}
@@ -65,7 +65,7 @@
Vector::Vector (const Vector& that) {
d_size = that.d_size;
d_length = that.d_length;
- p_vector = new (Object*)[d_size];
+ p_vector = new Object*[d_size];
for (long i = 0; i < d_length; i++)
p_vector[i] = Object::iref (that.p_vector[i]);
}
@@ -100,7 +100,7 @@
// copy old to new
d_size = that.d_size;
d_length = that.d_length;
- p_vector = new (Object*)[d_size];
+ p_vector = new Object*[d_size];
for (long i = 0; i < d_length; i++)
p_vector[i] = Object::iref (that.p_vector[i]);
return *this;
@@ -170,7 +170,7 @@
// check if we have to resize the vector
if (d_length >= d_size) {
long size = (d_size <= 0) ? 1 : d_size * 2;
- Object** vector = new (Object*)[size];
+ Object** vector = new Object*[size];
for (long i = 0; i < d_length; i++)
vector[i] = p_vector[i];
delete [] p_vector;

View File

@ -0,0 +1,41 @@
$FreeBSD$
--- src/lib/txt/lib/PrintTable.cpp.orig Sun Aug 22 21:13:07 2004
+++ src/lib/txt/lib/PrintTable.cpp Sun Aug 22 21:13:50 2004
@@ -85,7 +85,7 @@
d_cols = 1;
d_rows = 0;
// initialize the data table
- p_data = new (String*)[d_size];
+ p_data = new String*[d_size];
for (long i = 0; i < d_size; i++) p_data[i] = nilp;
// initialize the format size and column width
p_csiz = new long [d_cols];
@@ -107,7 +107,7 @@
d_cols = cols;
d_rows = 0;
// initialize the data table
- p_data = new (String*)[d_size];
+ p_data = new String*[d_size];
for (long i = 0; i < d_size; i++) p_data[i] = nilp;
// initialize the format size and column width
p_csiz = new long [d_cols];
@@ -129,7 +129,7 @@
d_cols = cols;
d_rows = 0;
// initialize the data table
- p_data = new (String*)[d_size];
+ p_data = new String*[d_size];
for (long i = 0; i < d_size; i++) p_data[i] = nilp;
// initialize the format size and column width
p_csiz = new long [d_cols];
@@ -362,7 +362,7 @@
return;
}
// create a new table
- String** data = new (String*) [size];
+ String** data = new String* [size];
for (long i = 0; i < d_rows; i++) data[i] = p_data[i];
for (long i = d_rows; i < size; i++) data[i] = nilp;
// update table and remove old one

View File

@ -0,0 +1,14 @@
$FreeBSD$
--- src/std/lib/Finalize.cpp.orig Sun Aug 22 21:06:42 2004
+++ src/std/lib/Finalize.cpp Sun Aug 22 21:06:51 2004
@@ -27,7 +27,7 @@
d_size = FIFO_SIZE;
d_pos = FIFO_SIZE-1;
d_lock = false;
- p_fifo = new (Object*)[d_size];
+ p_fifo = new Object*[d_size];
for (long i = 0; i < d_size; i++) p_fifo[i] = nilp;
}

View File

@ -0,0 +1,32 @@
$FreeBSD$
--- src/std/lib/HashTable.cpp.orig Sun Aug 22 21:07:04 2004
+++ src/std/lib/HashTable.cpp Sun Aug 22 21:07:46 2004
@@ -90,7 +90,7 @@
d_size = c_prime (0);
d_thrs = (d_size * 7) / 10;
d_count = 0;
- p_table = new (s_bucket*)[d_size];
+ p_table = new s_bucket*[d_size];
// initialize the table with null pointers
for (long i = 0; i < d_size; i++)
@@ -104,7 +104,7 @@
d_size = c_prime (size);
d_thrs = (size * 7) / 10;
d_count = 0;
- p_table = new (s_bucket*)[d_size];
+ p_table = new s_bucket*[d_size];
// initialize the table with null pointers
for (long i = 0; i < d_size; i++)
@@ -248,7 +248,7 @@
if (size < d_size) return;
// initialize the new table
- s_bucket** table = new (s_bucket*)[size];
+ s_bucket** table = new s_bucket*[size];
for (long i = 0; i < size; i++) table[i] = nilp;
// rebuild the table

View File

@ -0,0 +1,32 @@
$FreeBSD$
--- src/std/lib/QuarkTable.cpp.orig Sun Aug 22 21:08:41 2004
+++ src/std/lib/QuarkTable.cpp Sun Aug 22 21:09:12 2004
@@ -86,7 +86,7 @@
d_size = c_prime (0);
d_thrs = (d_size * 7) / 10;
d_count = 0;
- p_table = new (s_quanode*)[d_size];
+ p_table = new s_quanode*[d_size];
for (long i = 0; i < d_size; i++) p_table[i] = nilp;
}
@@ -97,7 +97,7 @@
d_size = c_prime (size);
d_thrs = (size * 7) / 10;
d_count = 0;
- p_table = new (s_quanode*)[d_size];
+ p_table = new s_quanode*[d_size];
for (long i = 0; i < d_size; i++) p_table[i] = nilp;
}
@@ -251,7 +251,7 @@
if (size < d_size) return;
// initialize the new table
- s_quanode** table = new (s_quanode*)[size];
+ s_quanode** table = new s_quanode*[size];
for (long i = 0; i < size; i++) table[i] = nilp;
// rebuild the table

View File

@ -0,0 +1,23 @@
$FreeBSD$
--- src/std/lib/Reactor.cpp.orig Sun Aug 22 21:09:53 2004
+++ src/std/lib/Reactor.cpp Sun Aug 22 21:10:10 2004
@@ -60,7 +60,7 @@
d_size = c_prime (0);
d_thrs = (d_size * 7) / 10;
d_count = 0;
- p_table = new (s_qnode*)[d_size];
+ p_table = new s_qnode*[d_size];
for (long i = 0; i < d_size; i++) p_table[i] = nilp;
p_vector = new Strvec (d_size);
p_vector->add ("");
@@ -111,7 +111,7 @@
// check for the size
if (size < d_size) return;
// initialize the table
- s_qnode** table = new (s_qnode*)[size];
+ s_qnode** table = new s_qnode*[size];
for (long i = 0; i < size; i++) table[i] = nilp;
// rebuild the table
for (long i = 0; i < d_size; i++) {

View File

@ -0,0 +1,41 @@
$FreeBSD$
--- src/std/lib/Vector.cpp.orig Sun Aug 22 21:10:59 2004
+++ src/std/lib/Vector.cpp Sun Aug 22 21:11:43 2004
@@ -56,7 +56,7 @@
if (size < 0) throw Exception ("size-error","in vector constructor");
d_size = size;
d_length = 0;
- p_vector = new (Object*)[d_size];
+ p_vector = new Object*[d_size];
for (long i = 0; i < d_size; i++) p_vector[i] = nilp;
}
@@ -65,7 +65,7 @@
Vector::Vector (const Vector& that) {
d_size = that.d_size;
d_length = that.d_length;
- p_vector = new (Object*)[d_size];
+ p_vector = new Object*[d_size];
for (long i = 0; i < d_length; i++)
p_vector[i] = Object::iref (that.p_vector[i]);
}
@@ -100,7 +100,7 @@
// copy old to new
d_size = that.d_size;
d_length = that.d_length;
- p_vector = new (Object*)[d_size];
+ p_vector = new Object*[d_size];
for (long i = 0; i < d_length; i++)
p_vector[i] = Object::iref (that.p_vector[i]);
return *this;
@@ -170,7 +170,7 @@
// check if we have to resize the vector
if (d_length >= d_size) {
long size = (d_size <= 0) ? 1 : d_size * 2;
- Object** vector = new (Object*)[size];
+ Object** vector = new Object*[size];
for (long i = 0; i < d_length; i++)
vector[i] = p_vector[i];
delete [] p_vector;