Package: stklos
Severity: normal
Tags: patch

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

gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -c `test -f 'print.c' || echo 
'./'`print.c
print.c: In function 'printstring':
print.c:90: warning: pointer targets in passing argument 1 of 'strlen' differ 
in signedness
print.c: In function 'print_cycle':
print.c:244: error: invalid lvalue in assignment
make[3]: *** [print.o] Error 1
make[3]: Leaving directory `/stklos-0.55/src'

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

Regards
Andreas Jochens

diff -urN ../tmp-orig/stklos-0.55/gtklos/gtk-glue.c ./gtklos/gtk-glue.c
--- ../tmp-orig/stklos-0.55/gtklos/gtk-glue.c   2002-05-08 21:17:32.000000000 
+0200
+++ ./gtklos/gtk-glue.c 2005-03-03 20:29:18.034323966 +0100
@@ -207,7 +207,7 @@
   SCM z;
   if (w) {
     NEWCELL(z, widget);
-    WIDGET_ID(z)      = w;
+    ((struct widget_obj *) (z))->id = w;
     WIDGET_PLIST(z)   = STk_nil;
     //    WIDGET_SCMOBJ(z)  = scm_obj;
     //    WIDGET_SIGNALS(z) = STk_nil;
diff -urN ../tmp-orig/stklos-0.55/gtklos/gtk-menu.c ./gtklos/gtk-menu.c
--- ../tmp-orig/stklos-0.55/gtklos/gtk-menu.c   2003-02-11 00:07:53.000000000 
+0100
+++ ./gtklos/gtk-menu.c 2005-03-03 20:29:46.566816668 +0100
@@ -186,7 +186,7 @@
 
   if (w) {
     NEWCELL(z, widget);
-    WIDGET_ID(z)      = w;
+    ((struct widget_obj *) (z))->id = w;
     //    WIDGET_SIGNALS(z) = STk_nil;
     WIDGET_PLIST(z)   = STk_nil;
     /* Add a pointer to the STklos object in the GTK widget */
diff -urN ../tmp-orig/stklos-0.55/src/print.c ./src/print.c
--- ../tmp-orig/stklos-0.55/src/print.c 2002-05-08 21:14:39.000000000 +0200
+++ ./src/print.c       2005-03-03 20:17:45.004091587 +0100
@@ -241,7 +241,8 @@
   SCM value, tmp;
 
   if ((tmp = STk_assv(exp, cycles)) != STk_false) {
-    if (INTP(value = CDR(tmp))) {
+    value = CDR(tmp);
+    if (INTP(value)) {
       STk_fprintf(port, "#%ld#", INT_VAL(value));
       return;
     }
diff -urN ../tmp-orig/stklos-0.55/src/vm.c ./src/vm.c
--- ../tmp-orig/stklos-0.55/src/vm.c    2003-05-09 16:13:37.000000000 +0200
+++ ./src/vm.c  2005-03-03 20:19:32.717300950 +0100
@@ -213,7 +213,7 @@
   /* Push an activation record on the stack */         \
   sp -= ACT_RECORD_SIZE;                               \
   fp  = sp;                                            \
-  ACT_SAVE_FP(fp) = fp_save;                           \
+  fp[4] = fp_save;                             \
   /* Other fields will be initialized later */         \
 }
 
@@ -495,9 +495,9 @@
        PUSH_ENV(nargs, val, CLOSURE_ENV(val));
       
        /* Finish initialisation of current activation record */
-       ACT_SAVE_ENV(fp) = env;
-       ACT_SAVE_PC(fp)  = pc;
-       ACT_SAVE_CST(fp) = constants;
+       fp[1] = env;
+       fp[2] = pc;
+       fp[3] = constants;
       }
 
       /* Do the call */


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

Reply via email to