Package: ivtools
Version: 1.1.3-4
Severity: normal
Tags: patch

When building 'ivtools' on amd64/unstable with gcc-4.0,
I get the following error:

make[4]: Entering directory `/ivtools-1.1.3/src/Attribute/LINUX'
g++   -gdwarf-2 -O2 -fPIC  -Dcplusplus_2_1 -Wno-deprecated    
-I/ivtools-1.1.3/src/Attribute/LINUX/.. 
-I/ivtools-1.1.3/src/Attribute/LINUX/../..  -I/ivtools-1.1.3/src  
-I/ivtools-1.1.3/src/include -I/ivtools-1.1.3/src/include/ivstd 
-I/usr/X11R6/include     -c /ivtools-1.1.3/src/Attribute/LINUX/../attrvalue.c
/ivtools-1.1.3/src/Attribute/LINUX/../attrvalue.c: In member function 
'osboolean AttributeValue::boolean_val()':
/ivtools-1.1.3/src/Attribute/LINUX/../attrvalue.c:285: error: cast from 'void*' 
to 'osboolean' loses precision
make[4]: *** [attrvalue.o] Error 1
make[4]: Leaving directory `/ivtools-1.1.3/src/Attribute/LINUX'

With the attached patch 'ivtools' can be compiled
on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/ivtools-1.1.3/src/Attribute/attrvalue.c 
./src/Attribute/attrvalue.c
--- ../tmp-orig/ivtools-1.1.3/src/Attribute/attrvalue.c 2003-10-22 
20:13:42.000000000 +0200
+++ ./src/Attribute/attrvalue.c 2005-06-17 13:34:55.000000000 +0200
@@ -282,7 +282,7 @@
     case AttributeValue::StringType:
        return (boolean) int_val()!=-1;
     case AttributeValue::ObjectType:
-       return (boolean) obj_val();
+       return (long) obj_val();
     case AttributeValue::StreamType:
        return stream_mode() != 0;
     default:
diff -urN ../tmp-orig/ivtools-1.1.3/src/ComTerp/comfunc.c 
./src/ComTerp/comfunc.c
--- ../tmp-orig/ivtools-1.1.3/src/ComTerp/comfunc.c     2003-10-22 
20:13:57.000000000 +0200
+++ ./src/ComTerp/comfunc.c     2005-06-17 19:55:37.000000000 +0200
@@ -440,7 +440,7 @@
   _command_symid = command_symid;
 }
 
-ComFuncState::ComFuncState(ComFuncState& cfs) {
+ComFuncState::ComFuncState(const ComFuncState& cfs) {
   *this = cfs;
 }
 
diff -urN ../tmp-orig/ivtools-1.1.3/src/ComTerp/comfunc.h 
./src/ComTerp/comfunc.h
--- ../tmp-orig/ivtools-1.1.3/src/ComTerp/comfunc.h     2003-10-22 
20:13:57.000000000 +0200
+++ ./src/ComTerp/comfunc.h     2005-06-17 19:55:05.000000000 +0200
@@ -225,7 +225,7 @@
   // keywords), number of keywords, an option post-eval depth (nesting
   // within blocks of post-evaluation commands), and an optional 
   // symbol id associated with the ComFunc.
-  ComFuncState(ComFuncState&);
+  ComFuncState(const ComFuncState&);
   // copy constructor.
 
   int& nargs() {return _nargs;}
diff -urN ../tmp-orig/ivtools-1.1.3/src/ComTerp/comterp.c 
./src/ComTerp/comterp.c
--- ../tmp-orig/ivtools-1.1.3/src/ComTerp/comterp.c     2004-02-13 
00:40:57.000000000 +0100
+++ ./src/ComTerp/comterp.c     2005-06-17 20:00:45.000000000 +0200
@@ -23,6 +23,16 @@
  * 
  */
 
+#include <ctype.h>
+#include <iostream.h>
+#include <string.h>
+#include <strstream>
+#include <unistd.h>
+
+#if __GNUC__>=3
+#include <fstream.h>
+#endif
+
 #include <ComTerp/comhandler.h>
 
 #include <ComTerp/_comterp.h>
@@ -55,15 +65,6 @@
 #include <Attribute/attribute.h>
 #include <OS/math.h>
 
-#include <ctype.h>
-#include <iostream.h>
-#include <string.h>
-#include <strstream>
-#include <unistd.h>
-#if __GNUC__>=3
-#include <fstream.h>
-#endif
-
 #define TITLE "ComTerp"
 #define STREAM_MECH
 
@@ -885,7 +886,7 @@
     fbuf.attach(fd);
   } else
     fbuf.attach(fileno(stdout));
-#elif __GNUC__==3 && __GNUC_MINOR__<1
+#elif (__GNUC__==3 && __GNUC_MINOR__<1) || __GNUC__>3
   fileptr_filebuf fbuf(handler() && handler()->wrfptr() 
               ? handler()->wrfptr() : stdout, 
               ios_base::out);
diff -urN ../tmp-orig/ivtools-1.1.3/src/ComTerp/comterpserv.c 
./src/ComTerp/comterpserv.c
--- ../tmp-orig/ivtools-1.1.3/src/ComTerp/comterpserv.c 2004-02-13 
00:42:33.000000000 +0100
+++ ./src/ComTerp/comterpserv.c 2005-06-17 19:47:53.000000000 +0200
@@ -152,7 +152,7 @@
     fbuf.attach(fd);
     istream in (&fbuf);
     in.gets(&instr);
-#elif __GNUC__==3 && __GNUC_MINOR__<1
+#elif (__GNUC__==3 && __GNUC_MINOR__<1) || __GNUC__>3
     char instr[BUFSIZ];
     FILE* ifptr = fdopen(fd, "r");
     fileptr_filebuf fbuf(ifptr, ios_base::in);
@@ -185,7 +185,7 @@
     /* append a null byte */
     outstr[outpos] = '\0';
 
-#if __GNUC__==3 && __GNUC_MINOR__<1
+#if (__GNUC__==3 && __GNUC_MINOR__<1) || __GNUC__>3
     if (ifptr) fclose(ifptr);
 #endif
 
@@ -202,7 +202,7 @@
 #if __GNUC__<3
     filebuf fbuf;
     fbuf.attach(fd);
-#elif __GNUC__==3 && __GNUC_MINOR__<1
+#elif (__GNUC__==3 && __GNUC_MINOR__<1) || __GNUC__>3
     FILE* ofptr = fdopen(fd, "w");
     fileptr_filebuf fbuf(ofptr, ios_base::out);
 #else
@@ -213,7 +213,7 @@
        out.put(s[outpos]);
     out.flush();
     outpos = 0;
-#if __GNUC__==3 && __GNUC_MINOR__<1
+#if (__GNUC__==3 && __GNUC_MINOR__<1) || __GNUC__>3
     if (ofptr) fclose(ofptr);
 #endif
     return 1;
@@ -320,7 +320,7 @@
                err_print( stderr, "comterp" );
 #if __GNUC__<3
                filebuf obuf(handler() ? handler()->get_handle() : 1);
-#elif __GNUC__==3 && __GNUC_MINOR__<1
+#elif (__GNUC__==3 && __GNUC_MINOR__<1) || __GNUC__>3
                 FILE* ofptr = fdopen(handler() ? handler()->get_handle() : 1, 
"w"); 
                fileptr_filebuf obuf(ofptr, ios_base::out);
 #else
@@ -330,7 +330,7 @@
 #endif
                ostream ostr(&obuf);
                ostr.flush();
-#if __GNUC__==3 && __GNUC_MINOR__<1
+#if (__GNUC__==3 && __GNUC_MINOR__<1) || __GNUC__>3
                 if (ofptr) fclose(ofptr);
 #endif
                status = -1;
@@ -345,7 +345,7 @@
          err_print( stderr, "comterp" );
 #if __GNUC__<3
          filebuf obuf(handler() ? handler()->get_handle() : 1);
-#elif __GNUC__==3 && __GNUC_MINOR__<1
+#elif (__GNUC__==3 && __GNUC_MINOR__<1) || __GNUC__>3
           FILE* ofptr = fdopen(handler() ? handler()->get_handle() : 1, "w"); 
          fileptr_filebuf obuf(ofptr, ios_base::out);
 #else
@@ -356,7 +356,7 @@
 #endif
          ostream ostr(&obuf);
          ostr.flush();
-#if __GNUC__==3 && __GNUC_MINOR__<1
+#if (__GNUC__==3 && __GNUC_MINOR__<1) || __GNUC__>3
           if (ofptr) fclose(ofptr);
 #endif
          status = -1;
diff -urN ../tmp-orig/ivtools-1.1.3/src/ComTerp/comvalue.c 
./src/ComTerp/comvalue.c
--- ../tmp-orig/ivtools-1.1.3/src/ComTerp/comvalue.c    2004-01-09 
22:55:50.000000000 +0100
+++ ./src/ComTerp/comvalue.c    2005-06-17 19:51:35.000000000 +0200
@@ -49,7 +49,7 @@
 
 const ComTerp* ComValue::_comterp = nil;
 
-ComValue::ComValue(ComValue& sv) {
+ComValue::ComValue(const ComValue& sv) {
     *this = sv;
 }
 
diff -urN ../tmp-orig/ivtools-1.1.3/src/ComTerp/comvalue.h 
./src/ComTerp/comvalue.h
--- ../tmp-orig/ivtools-1.1.3/src/ComTerp/comvalue.h    2003-10-22 
20:13:57.000000000 +0200
+++ ./src/ComTerp/comvalue.h    2005-06-17 19:51:11.000000000 +0200
@@ -43,8 +43,8 @@
 // interpretation.  
 class ComValue : public AttributeValue {
 public:
-    ComValue(ComValue&);
-    // copy constructor.
+    ComValue(const ComValue&);
+    // deep copy constructor.
     ComValue(ComValue*);
     // deep copy constructor.
     ComValue(AttributeValue&);
diff -urN ../tmp-orig/ivtools-1.1.3/src/ComTerp/ctrlfunc.c 
./src/ComTerp/ctrlfunc.c
--- ../tmp-orig/ivtools-1.1.3/src/ComTerp/ctrlfunc.c    2004-02-12 
01:01:26.000000000 +0100
+++ ./src/ComTerp/ctrlfunc.c    2005-06-17 19:54:27.000000000 +0200
@@ -21,13 +21,13 @@
  * 
  */
 
+#include <fstream.h>
 #include <ComTerp/comhandler.h>
 
 #include <ComTerp/ctrlfunc.h>
 #include <ComTerp/comterpserv.h>
 #include <ComTerp/comvalue.h>
 #include <Attribute/attrlist.h>
-#include <fstream.h>
 
 #ifdef HAVE_ACE
 #include <ace/SOCK_Connector.h>
diff -urN ../tmp-orig/ivtools-1.1.3/src/ComTerp/debugfunc.c 
./src/ComTerp/debugfunc.c
--- ../tmp-orig/ivtools-1.1.3/src/ComTerp/debugfunc.c   2003-11-18 
07:36:17.000000000 +0100
+++ ./src/ComTerp/debugfunc.c   2005-06-17 19:54:00.000000000 +0200
@@ -22,11 +22,6 @@
  * 
  */
 
-#include <ComTerp/comhandler.h>
-
-#include <ComTerp/debugfunc.h>
-#include <ComTerp/comterpserv.h>
-#include <strstream>
 #if __GNUC__==2 && __GNUC_MINOR__<=7
 #else
 #include <vector.h>
@@ -35,6 +30,12 @@
 #include <fstream.h>
 #endif
 
+#include <ComTerp/comhandler.h>
+
+#include <ComTerp/debugfunc.h>
+#include <ComTerp/comterpserv.h>
+#include <strstream>
+
 #define TITLE "DebugFunc"
 
 /*****************************************************************************/
diff -urN ../tmp-orig/ivtools-1.1.3/src/OverlayUnidraw/ovkit.h 
./src/OverlayUnidraw/ovkit.h
--- ../tmp-orig/ivtools-1.1.3/src/OverlayUnidraw/ovkit.h        2003-10-22 
20:16:21.000000000 +0200
+++ ./src/OverlayUnidraw/ovkit.h        2005-06-17 20:12:18.000000000 +0200
@@ -217,7 +217,7 @@
     const char* otherdisplay();
     // returns string that might specify an alternate X display.
 
-protected:
+public:
     void toolbar0();
     // switch to default toolbar
     void toolbar1();
diff -urN ../tmp-orig/ivtools-1.1.3/src/Unidraw/catalog.c 
./src/Unidraw/catalog.c
--- ../tmp-orig/ivtools-1.1.3/src/Unidraw/catalog.c     2003-11-18 
07:38:48.000000000 +0100
+++ ./src/Unidraw/catalog.c     2005-06-17 20:08:21.000000000 +0200
@@ -640,7 +640,7 @@
         int j = n_data - n_delim;
 
         for (int i = 0; i < n_delim; ++i, ++j) {
-            char c = (int) data[j];
+            char c = (long) data[j];
 
             if (delim[i] != c) {
                 found = false;
@@ -811,7 +811,7 @@
 
     } else {
         for (int i = 0; i < extra_data->Count(); ++i) {
-            char c = (int) (*extra_data)[i];
+            char c = (long) (*extra_data)[i];
             out << c;
         }
     }
diff -urN ../tmp-orig/ivtools-1.1.3/src/comterp_/main.c ./src/comterp_/main.c
--- ../tmp-orig/ivtools-1.1.3/src/comterp_/main.c       2004-01-30 
19:43:32.000000000 +0100
+++ ./src/comterp_/main.c       2005-06-17 20:01:26.000000000 +0200
@@ -30,9 +30,6 @@
 static const char *const SERVER_HOST = ACE_DEFAULT_SERVER_HOST;
 #endif
 
-#include <ComTerp/comterpserv.h>
-
-
 #include <fstream.h>
 
 #include <iostream.h>
@@ -43,6 +40,9 @@
 
 #include <version.h>
 
+#include <ComTerp/comterpserv.h>
+
+
 #if BUFSIZ>1024
 #undef BUFSIZ
 #define BUFSIZ 1024
diff -urN ../tmp-orig/ivtools-1.1.3/src/include/IV-2_6/InterViews/textdisplay.h 
./src/include/IV-2_6/InterViews/textdisplay.h
--- ../tmp-orig/ivtools-1.1.3/src/include/IV-2_6/InterViews/textdisplay.h       
2003-10-22 20:15:23.000000000 +0200
+++ ./src/include/IV-2_6/InterViews/textdisplay.h       2005-06-17 
19:43:21.000000000 +0200
@@ -42,6 +42,7 @@
 
 class Painter;
 class Canvas;
+class TextLine;
 
 //: basic text display (iv-2.6)
 // <a href=../man3.1/TextDisplay.html>man page</a>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to