File scilab-fix-64bit-portability-issue.patch of Package scilab

Upstream bug: http://bugzilla.scilab.org/13267
Index: scilab-6.0.0/modules/graphics/src/c/getHandleProperty/get_tight_limits_property.c
===================================================================
--- scilab-6.0.0.orig/modules/graphics/src/c/getHandleProperty/get_tight_limits_property.c
+++ scilab-6.0.0/modules/graphics/src/c/getHandleProperty/get_tight_limits_property.c
@@ -47,6 +47,7 @@ void* get_tight_limits_property(void* _p
     int i = 0;
     int j = 0;
     void* status = NULL;
+    int err = -1;
 
     for (i = 0 ; i < 3 ; i++)
     {
@@ -55,7 +56,7 @@ void* get_tight_limits_property(void* _p
         if (piTightLimits == NULL)
         {
             Scierror(999, _("'%s' property does not exist for this handle.\n"), "tight_limits");
-            return -1;
+            return &err;
         }
 
         if (iTightLimits)
@@ -75,7 +76,7 @@ void* get_tight_limits_property(void* _p
             }
 
             Scierror(999, _("%s: No more memory.\n"), "get_tight_limits_property");
-            return -1;
+            return &err;
         }
 
     }
Index: scilab-6.0.0/modules/scicos/src/c/scicos.c
===================================================================
--- scilab-6.0.0.orig/modules/scicos/src/c/scicos.c
+++ scilab-6.0.0/modules/scicos/src/c/scicos.c
@@ -4073,7 +4073,7 @@ static void call_debug_scicos(scicos_blo
     // Temporarily replacing the block's computational function with DEBUG_BLOCK's so that sciblk4 will call %debug_scicos()
     block->scsptr = Blocks[deb_blk].scsptr;
     (*loc4)(block, *flag);
-    block->scsptr = C2F(scsptr).ptr;
+    block->scsptr = &C2F(scsptr).ptr;
 
     /* Implicit Solver & explicit block & flag==0 */
     /* adjust continuous state vector after call */
Index: scilab-6.0.0/modules/scicos/src/c/import.c
===================================================================
--- scilab-6.0.0.orig/modules/scicos/src/c/import.c
+++ scilab-6.0.0/modules/scicos/src/c/import.c
@@ -934,7 +934,7 @@ int C2F(getsciblockbylabel)(int*kfun, in
     }
     nblk = scicos_imp.nblk[0];
 
-    F2C(cvstr)(n, lab, *label, &job, *n);
+    F2C(cvstr)(n, label, *lab, &job, *n);
 
     *kfun = 0;
     for (k = 0; k < nblk; k++)
openSUSE Build Service is sponsored by