Hi there,

I'm afraid math/sc doesn't work at all when compiled with gcc4:
1) Launch sc
2) Type '=1'
3) You'll get "syntax error: let A0<= = 1"

I have seen this problem with amd64, i386 and macppc. loongson seems
to be an exception. AFAIK, this problem exists since OpenBSD 4.8 (when
GCC was switched over to 4.2.1 for most architectures) and is still
here with -current.

Slackware had this problem some time ago, so I took the (trivial) patch
they used [1] (itself taken from Debian) and now everything is working
OK. You might want to pick more things from this patch, as it fixes the
numerous warnings produced during the build.

[1] http://slackware.osuosl.org/slackware-13.37/source/ap/sc/\
sc-7.16-3.diff.gz

Thanks for your good work,
Tsomi.

Index: ports/math/sc/patches/patch-lex_c
===================================================================
RCS file: /cvs/ports/math/sc/patches/patch-lex_c,v
retrieving revision 1.4
diff -u -p -r1.4 patch-lex_c
--- ports/math/sc/patches/patch-lex_c   28 May 2006 21:21:51 -0000      1.4
+++ ports/math/sc/patches/patch-lex_c   25 Jun 2011 13:58:41 -0000
@@ -1,6 +1,15 @@
 $OpenBSD: patch-lex_c,v 1.4 2006/05/28 21:21:51 weingart Exp $
---- lex.c.orig Thu May  4 09:52:42 2006
-+++ lex.c      Thu May  4 09:52:54 2006
+--- lex.c.orig Wed Aug 21 00:44:26 2002
++++ lex.c      Sat Jun 25 15:49:11 2011
+@@ -107,7 +107,7 @@ int
+ yylex()
+ {
+     char *p = line + linelim;
+-    int ret;
++    int ret = 0;
+     static int isfunc = 0;
+     static bool isgoto = 0;
+     static bool colstate = 0;
 @@ -642,7 +642,7 @@ nmgetch() 
  
  #endif

Reply via email to