tag 455643 patch
thanks

On 28/02/2008, Hamish Moffatt wrote:
> That's ok. I usually don't mind NMUs particularly if I get some
> warning. If you want to prepare a fix for the other FTBFS, please
> upload that too. I could ever sponsor it (wouldn't that be weird?
> :-)).

Heh, thanks. :) I'd prefer you upload it yourself, there's no interest
in NMU'ing a package with maintainer's consent, unless that maintainer
explicitely requests to do so. Is that the case?

Please find attached a patch to fix the FTBFS with gcc/g++ 4.3.
Basically, it adds a <cstring> include (along with a blank line)
everywhere it's needed, after every other header includes, but in
t-dll.cc, where I moved it a bit higher in the chain, since there's a
lot of platform-dependent code, and it would be somehow hidden after
the last #endif.

Basically:
,----
| diffstat /home/kibi/public_html/patches/verilog-ftbfs.diff
|  elab_expr.cc   |    2 ++
|  elab_net.cc    |    2 ++
|  elab_scope.cc  |    2 ++
|  emit.cc        |    2 ++
|  load_module.cc |    2 ++
|  main.cc        |    2 ++
|  net_design.cc  |    2 ++
|  net_link.cc    |    2 ++
|  net_scope.cc   |    2 ++
|  parse.y        |    2 ++
|  pform.cc       |    2 ++
|  sys_funcs.cc   |    2 ++
|  t-dll-expr.cc  |    2 ++
|  t-dll-proc.cc  |    2 ++
|  t-dll.cc       |    2 ++
|  verireal.cc    |    2 ++
|  16 files changed, 32 insertions(+)
`----

BTW, I noticed that at the end of the build log:
,----
| dh_undocumented
| dh_undocumented: This program does nothing and should no longer be used.
`----


Cheers,

-- 
Cyril Brulebois
--- a/elab_expr.cc
+++ b/elab_expr.cc
@@ -28,6 +28,8 @@
 # include  "netmisc.h"
 # include  "util.h"
 
+#include <cstring>
+
 NetExpr* PExpr::elaborate_expr(Design*des, NetScope*, bool) const
 {
       cerr << get_line() << ": internal error: I do not know how to elaborate"
--- a/elab_net.cc
+++ b/elab_net.cc
@@ -29,6 +29,8 @@
 
 # include  <iostream>
 
+#include <cstring>
+
 /*
  * This is a state flag that determines whether an elaborate_net must
  * report an error when it encounters an unsized number. Normally, it
--- a/elab_scope.cc
+++ b/elab_scope.cc
@@ -45,6 +45,8 @@
 # include  <typeinfo>
 # include  <assert.h>
 
+#include <cstring>
+
 bool Module::elaborate_scope(Design*des, NetScope*scope) const
 {
       if (debug_scopes) {
--- a/emit.cc
+++ b/emit.cc
@@ -33,6 +33,8 @@
 # include  <typeinfo>
 # include  <cassert>
 
+#include <cstring>
+
 bool NetNode::emit_node(struct target_t*tgt) const
 {
       cerr << "EMIT: Gate type? " << typeid(*this).name() << endl;
--- a/load_module.cc
+++ b/load_module.cc
@@ -33,6 +33,8 @@
 # include  <ctype.h>
 # include  <assert.h>
 
+#include <cstring>
+
 /*
  * The module library items are maps of key names to file name within
  * the directory.
--- a/main.cc
+++ b/main.cc
@@ -72,6 +72,8 @@
 extern "C" const char*optarg;
 #endif
 
+#include <cstring>
+
 /* Count errors detected in flag processing. */
 unsigned flag_errors = 0;
 
--- a/net_design.cc
+++ b/net_design.cc
@@ -34,6 +34,8 @@
 # include  "compiler.h"
 # include  <sstream>
 
+#include <cstring>
+
 Design:: Design()
 : errors(0), nodes_(0), procs_(0), lcounter_(0)
 {
--- a/net_link.cc
+++ b/net_link.cc
@@ -32,6 +32,8 @@
 # include  <malloc.h>
 #endif
 
+#include <cstring>
+
 void connect(Nexus*l, Link&r)
 {
       assert(l);
--- a/net_scope.cc
+++ b/net_scope.cc
@@ -26,6 +26,8 @@
 # include  "netlist.h"
 # include  <sstream>
 
+#include <cstring>
+
 /*
  * The NetScope class keeps a scope tree organized. Each node of the
  * scope tree points to its parent, its right sibling and its leftmost
--- a/parse.y
+++ b/parse.y
@@ -29,6 +29,8 @@
 # include  "pform.h"
 # include  <sstream>
 
+#include <cstring>
+
 extern void lex_start_table();
 extern void lex_end_table();
 
--- a/pform.cc
+++ b/pform.cc
@@ -36,6 +36,8 @@
 # include  <typeinfo>
 # include  <sstream>
 
+#include <cstring>
+
 map<perm_string,Module*> pform_modules;
 map<perm_string,PUdp*> pform_primitives;
 
--- a/sys_funcs.cc
+++ b/sys_funcs.cc
@@ -25,6 +25,8 @@
 # include  <cstdlib>
 # include  <stdio.h>
 
+#include <cstring>
+
 /*
  * Manage the information about system functions. This information is
  * collected from the sources before elaboration and made available
--- a/t-dll-expr.cc
+++ b/t-dll-expr.cc
@@ -32,6 +32,8 @@
 #endif
 # include  <stdlib.h>
 
+#include <cstring>
+
 /*
  * This is a little convenience function for converting a NetExpr
  * expression type to the expression type used by ivl_expr_t objects.
--- a/t-dll-proc.cc
+++ b/t-dll-proc.cc
@@ -34,6 +34,8 @@
 #endif
 # include  <stdlib.h>
 
+#include <cstring>
+
 
 bool dll_target::process(const NetProcTop*net)
 {
--- a/t-dll.cc
+++ b/t-dll.cc
@@ -24,6 +24,8 @@
 
 # include  <iostream>
 
+#include <cstring>
+
 # include  <stdio.h>   // sprintf()
 # include  "compiler.h"
 # include  "t-dll.h"
--- a/verireal.cc
+++ b/verireal.cc
@@ -30,6 +30,8 @@
 # include  <math.h>
 # include  <assert.h>
 
+#include <cstring>
+
 verireal::verireal()
 {
       value_ = 0.0;

Attachment: pgpWYkyS1ihqh.pgp
Description: PGP signature

Reply via email to