Package: vreng
Severity: normal
Tags: patch

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

../../src/wo/wo.h:678: error: non-local variable '<anonymous struct> 
putPropertyFunc [20][48]' uses anonymous type
../../src/wo/wo.h:678: error: non-local variable '<anonymous struct> 
getPropertyFunc [20][48]' uses anonymous type
make[4]: *** [ubwidgets.o] Error 1
make[4]: Leaving directory `/vreng-5.0.1/src/gui'

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

The attached patch includes a patch which was already necessary for gcc-3.4.

Regards
Andreas Jochens

diff -urN ../tmp-orig/vreng-5.0.1/src/wo/initobj.h ./src/wo/initobj.h
--- ../tmp-orig/vreng-5.0.1/src/wo/initobj.h    2003-08-17 23:28:25.000000000 
+0200
+++ ./src/wo/initobj.h  2005-02-09 14:36:49.000000000 +0100
@@ -26,7 +26,7 @@
 } PropertyFuncList[PROPSNUMBER][OBJECTSNUMBER+1];
 #define WO_PAYLOAD  (void (*)(Payload *pp))
 #else
-typedef struct {
+typedef struct PFL_struct {
   void (*pf) (WObject *po, Payload *pp);
 } PropertyFuncList[PROPSNUMBER][OBJECTSNUMBER+1];
 #define WO_PAYLOAD  (void (*)(WObject *po, Payload *pp))
diff -urN ../tmp-orig/vreng-5.0.1/src/vgl/render.cc ./src/vgl/render.cc
--- ../tmp-orig/vreng-5.0.1/src/vgl/render.cc   2003-09-21 22:36:22.000000000 
+0200
+++ ./src/vgl/render.cc 2005-02-09 14:49:49.334790288 +0100
@@ -155,7 +155,7 @@
       setMaterials();
       if (! pl->pobject->isBehavior(NO_SELECTABLE)) {
         glPopName();
-        glPushName((int32_t)pl);
+        glPushName((long)pl);
       }
       pl->pobject->render();
     }
@@ -165,7 +165,7 @@
       //error("specialRendering: still %s num=%d", 
pl->pobject->name.class_name, num);
       if (! pl->pobject->isBehavior(NO_SELECTABLE)) {
         glPopName();
-        glPushName((int32_t)pl);
+        glPushName((long)pl);
       }
       pl->pobject->render();
     }
@@ -175,7 +175,7 @@
       //error("specialRendering: invisible %s", pl->pobject->name.class_name);
       if (! pl->pobject->isBehavior(NO_SELECTABLE)) {
         glPopName();
-        glPushName((int32_t)pl);
+        glPushName((long)pl);
       }
       pl->pobject->render();
     }
@@ -249,7 +249,7 @@
     return 0;
   }
   glPopName();
-  glPushName((int32_t)this);
+  glPushName((long)this);
   glPushMatrix();
    M4_to_GL(gl_mat, &posmat);
    glMultMatrixf(gl_mat);
@@ -502,20 +502,20 @@
 {
   /* search for solids in solidlist */
   for (Solid *ps = first_solid; ps ; ps = ps->next) {
-    if (number == (int32_t)ps) {
+    if (number == (long)ps) {
       return ps;
     }
   }
   /* search for solids handled by specialRendering */
   for (ObjectList *pl = mobileList; pl ; pl = pl->next) {
-    if (pl->pobject && number == (int32_t)pl) {
+    if (pl->pobject && number == (long)pl) {
       trace(DBG_VGL, "getSolidByNumber: number=%d type=%s", number, 
pl->pobject->name.class_name);
       return pl->pobject->soh;
     }
   }
 #if 1 //pd
   for (ObjectList *pl = stillList; pl ; pl = pl->next) {
-    if (pl->pobject && number == (int32_t)pl) {
+    if (pl->pobject && number == (long)pl) {
       trace(DBG_VGL, "getSolidByNumber: number=%d type=%s", number, 
pl->pobject->name.class_name);
       return pl->pobject->soh;
     }
diff -urN ../tmp-orig/vreng-5.0.1/src/wo/model.cc ./src/wo/model.cc
--- ../tmp-orig/vreng-5.0.1/src/wo/model.cc     2003-09-04 12:39:22.000000000 
+0200
+++ ./src/wo/model.cc   2005-02-09 14:46:51.112229778 +0100
@@ -21,10 +21,10 @@
     
   while (t[1]) {
     if (!strcmp(t[1], str))
-      return (int32_t) t[2];
+      return (long) t[2];
     t += 3;
   }
-  return (int32_t) t[2];
+  return (long) t[2];
 }
 
 int Model::getModelTypeByExt(char *str)
@@ -37,11 +37,11 @@
     p++;
     while (t[0]) {
       if (!strcmp(t[0], p))
-        return (int32_t) t[2];
+        return (long) t[2];
       t += 3;
     }
   } 
-  return (int32_t) t[2];
+  return (long) t[2];
 }
 
 WObject * Model::creator(char *l)
diff -urN ../tmp-orig/vreng-5.0.1/src/wo/wobject.cc ./src/wo/wobject.cc
--- ../tmp-orig/vreng-5.0.1/src/wo/wobject.cc   2003-09-21 22:35:37.000000000 
+0200
+++ ./src/wo/wobject.cc 2005-02-09 14:35:03.000000000 +0100
@@ -394,7 +394,7 @@
 void Solid::specialAction(int action_id, void *data, time_t sec, time_t usec)
 {
   WObject *po = (this==NULL) ? worlds->plocaluser : getObjectFromSolid();
-  if (this && (int) object < 1000) { // HACK! when objbar already stuck
+  if (this && (long) object < 1000) { // HACK! when objbar already stuck
     error("solid corrupted");
     return;
   }
diff -urN ../tmp-orig/vreng-5.0.1/src/vgl/bones/boneVect3d.h 
./src/vgl/bones/boneVect3d.h
--- ../tmp-orig/vreng-5.0.1/src/vgl/bones/boneVect3d.h  2003-02-18 
22:01:50.000000000 +0100
+++ ./src/vgl/bones/boneVect3d.h        2005-02-09 14:45:22.602322795 +0100
@@ -29,13 +29,6 @@
   z = oz;
 }
 
-inline Vect3D(Vect3D & op)
-{
-  x = op.x;
-  y = op.y;
-  z = op.z;
-}
-
 inline Vect3D(Vect3D * op)
 {
   x = op->x;



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

Reply via email to