aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lang/ficl/Makefile7
-rw-r--r--lang/ficl/files/patch-dictionary.c14
-rw-r--r--lang/ficl/files/patch-double.c29
-rw-r--r--lang/ficl/files/patch-ficl.h8
-rw-r--r--lang/ficl/files/patch-float.c6
-rw-r--r--lang/ficl/files/patch-primitives.c8
-rw-r--r--lang/ficl/files/patch-tools.c16
-rw-r--r--lang/ficl/files/patch-vm.c46
-rw-r--r--lang/ficl/pkg-descr1
9 files changed, 103 insertions, 32 deletions
diff --git a/lang/ficl/Makefile b/lang/ficl/Makefile
index 35fa81c5c26a..7a059c68cd16 100644
--- a/lang/ficl/Makefile
+++ b/lang/ficl/Makefile
@@ -3,7 +3,7 @@
PORTNAME= ficl
PORTVERSION= 4.1.0
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= lang
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-all/${PORTNAME}${PORTVERSION:C/([[:digit:]]+\.[[:digit:]]+)\.0/\1/}
@@ -15,10 +15,7 @@ LICENSE_NAME= BSD-style
LICENSE_TEXT= Description of the license can be obtained from the following URL: http://ficl.sourceforge.net/license.html
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
-OPTIONS_DEFINE= DATA DOCS
-OPTIONS_DEFAULT= DATA
-
-MAKE_JOBS_UNSAFE= YES
+OPTIONS_DEFINE= DOCS
ONLY_FOR_ARCHS= i386 amd64
ONLY_FOR_ARCHS_REASON= this port is not tested on anything other than i386 and amd64
diff --git a/lang/ficl/files/patch-dictionary.c b/lang/ficl/files/patch-dictionary.c
index 2981587b9294..237b1288b461 100644
--- a/lang/ficl/files/patch-dictionary.c
+++ b/lang/ficl/files/patch-dictionary.c
@@ -1,6 +1,6 @@
---- dictionary.c.orig 2010-09-12 19:14:52.000000000 +0400
-+++ dictionary.c 2012-03-20 19:19:53.000000000 +0400
-@@ -662,7 +662,7 @@
+--- dictionary.c.orig 2010-09-12 15:14:52 UTC
++++ dictionary.c
+@@ -662,7 +662,7 @@ void ficlDictionarySee(ficlDictionary *d
*trace++ = '>';
else
*trace++ = ' ';
@@ -9,7 +9,7 @@
if (ficlDictionaryIsAWord(dictionary, word))
{
-@@ -676,7 +676,7 @@
+@@ -676,7 +676,7 @@ void ficlDictionarySee(ficlDictionary *d
break;
case FICL_WORDKIND_INSTRUCTION_WITH_ARGUMENT:
c = *++cell;
@@ -18,7 +18,7 @@
break;
case FICL_WORDKIND_INSTRUCTION_WORD:
sprintf(trace, "%s :: executes %s (instruction word %ld)", word->name, ficlDictionaryInstructionNames[(long)word->code], (long)word->code);
-@@ -687,20 +687,20 @@
+@@ -687,20 +687,20 @@ void ficlDictionarySee(ficlDictionary *d
{
ficlWord *word = (ficlWord *)c.p;
sprintf(trace, "%.*s ( %#lx literal )",
@@ -43,7 +43,7 @@
break;
#endif /* FICL_WANT_FLOAT */
case FICL_WORDKIND_STRING_LITERAL:
-@@ -719,32 +719,32 @@
+@@ -719,32 +719,32 @@ void ficlDictionarySee(ficlDictionary *d
break;
case FICL_WORDKIND_BRANCH0:
c = *++cell;
@@ -83,7 +83,7 @@
break;
default:
sprintf(trace, "%.*s", word->length, word->name);
-@@ -754,7 +754,7 @@
+@@ -754,7 +754,7 @@ void ficlDictionarySee(ficlDictionary *d
}
else /* probably not a word - punt and print value */
{
diff --git a/lang/ficl/files/patch-double.c b/lang/ficl/files/patch-double.c
new file mode 100644
index 000000000000..ce78019f172a
--- /dev/null
+++ b/lang/ficl/files/patch-double.c
@@ -0,0 +1,29 @@
+--- double.c.orig 2010-09-12 15:18:07 UTC
++++ double.c
+@@ -157,7 +157,7 @@ ficl2Integer ficl2IntegerMultiply(ficlIn
+
+ ficl2Integer ficl2IntegerDecrement(ficl2Integer x)
+ {
+- if (x.low == INT_MIN)
++ if (x.low == INTMAX_MIN)
+ x.high--;
+ x.low--;
+
+@@ -168,16 +168,11 @@ ficl2Integer ficl2IntegerDecrement(ficl2
+ ficl2Unsigned ficl2UnsignedAdd(ficl2Unsigned x, ficl2Unsigned y)
+ {
+ ficl2Unsigned result;
+- int carry;
+
+ result.high = x.high + y.high;
+ result.low = x.low + y.low;
+
+-
+- carry = ((x.low | y.low) & FICL_CELL_HIGH_BIT) && !(result.low & FICL_CELL_HIGH_BIT);
+- carry |= ((x.low & y.low) & FICL_CELL_HIGH_BIT);
+-
+- if (carry)
++ if (result.low < y.low)
+ {
+ result.high++;
+ }
diff --git a/lang/ficl/files/patch-ficl.h b/lang/ficl/files/patch-ficl.h
index 556f0ae5bf42..175a4032097b 100644
--- a/lang/ficl/files/patch-ficl.h
+++ b/lang/ficl/files/patch-ficl.h
@@ -1,6 +1,6 @@
---- ficl.h.orig Mon Dec 8 18:33:42 2003
-+++ ficl.h Mon Dec 8 18:33:58 2003
-@@ -163,6 +163,8 @@
+--- ficl.h.orig 2010-10-03 09:52:12 UTC
++++ ficl.h
+@@ -163,6 +163,8 @@ extern "C" {
#include "ficlplatform/ansi.h"
#elif defined(_WIN32)
#include "ficlplatform/win32.h"
@@ -8,4 +8,4 @@
+ #include "ficlplatform/unix.h"
#elif defined (FREEBSD_ALPHA)
#include "ficlplatform/alpha.h"
- #elif defined(linux)
+ #elif defined(unix) || defined(__unix__) || defined(__unix)
diff --git a/lang/ficl/files/patch-float.c b/lang/ficl/files/patch-float.c
index 718bb8b29e02..2df2cb870ead 100644
--- a/lang/ficl/files/patch-float.c
+++ b/lang/ficl/files/patch-float.c
@@ -1,6 +1,6 @@
---- float.c.orig 2010-09-13 22:43:04.000000000 +0400
-+++ float.c 2012-03-20 19:09:18.000000000 +0400
-@@ -159,7 +159,7 @@
+--- float.c.orig 2010-09-13 18:43:04 UTC
++++ float.c
+@@ -159,7 +159,7 @@ static ficlInteger ficlFloatStackDisplay
{
struct stackContext *context = (struct stackContext *)c;
char buffer[64];
diff --git a/lang/ficl/files/patch-primitives.c b/lang/ficl/files/patch-primitives.c
index 5dedf4e1836c..86ac7c73bc1a 100644
--- a/lang/ficl/files/patch-primitives.c
+++ b/lang/ficl/files/patch-primitives.c
@@ -1,6 +1,6 @@
---- primitives.c.orig 2014-01-05 15:25:11.000000000 +0400
-+++ primitives.c 2014-01-05 16:00:30.000000000 +0400
-@@ -487,7 +487,7 @@
+--- primitives.c.orig 2010-09-13 18:43:04 UTC
++++ primitives.c
+@@ -487,7 +487,7 @@ static void ficlPrimitiveSprintf(ficlVm
ficlStackPushPointer(vm->dataStack, bufferStart);
ficlStackPushInteger(vm->dataStack, buffer - bufferStart);
@@ -9,7 +9,7 @@
}
-@@ -1350,7 +1350,7 @@
+@@ -1350,7 +1350,7 @@ static void ficlPrimitiveSetObjectFlag(f
static void ficlPrimitiveIsObject(ficlVm *vm)
{
diff --git a/lang/ficl/files/patch-tools.c b/lang/ficl/files/patch-tools.c
index daf7d9d8df40..e3b6dd9edb1e 100644
--- a/lang/ficl/files/patch-tools.c
+++ b/lang/ficl/files/patch-tools.c
@@ -1,6 +1,6 @@
---- tools.c.orig 2010-08-12 17:57:22.000000000 +0400
-+++ tools.c 2012-03-20 19:08:11.000000000 +0400
-@@ -236,24 +236,24 @@
+--- tools.c.orig 2010-08-12 13:57:22 UTC
++++ tools.c
+@@ -236,24 +236,24 @@ static void ficlPrimitiveSeeXT(ficlVm *v
break;
case FICL_WORDKIND_VARIABLE:
@@ -29,7 +29,7 @@
ficlVmTextOut(vm, vm->pad);
break;
-@@ -567,7 +567,7 @@
+@@ -567,7 +567,7 @@ static ficlInteger ficlStackDisplayCallb
{
struct stackContext *context = (struct stackContext *)c;
char buffer[64];
@@ -38,7 +38,7 @@
ficlVmTextOut(context->vm, buffer);
return FICL_TRUE;
}
-@@ -580,7 +580,7 @@
+@@ -580,7 +580,7 @@ void ficlStackDisplay(ficlStack *stack,
FICL_STACK_CHECK(stack, 0, 0);
@@ -47,7 +47,7 @@
ficlVmTextOut(vm, buffer);
if (callback == NULL)
-@@ -592,7 +592,7 @@
+@@ -592,7 +592,7 @@ void ficlStackDisplay(ficlStack *stack,
}
ficlStackWalk(stack, callback, context, FICL_FALSE);
@@ -56,7 +56,7 @@
ficlVmTextOut(vm, buffer);
return;
-@@ -612,7 +612,7 @@
+@@ -612,7 +612,7 @@ static ficlInteger ficlStackDisplaySimpl
{
struct stackContext *context = (struct stackContext *)c;
char buffer[32];
@@ -65,7 +65,7 @@
context->count++;
ficlVmTextOut(context->vm, buffer);
return FICL_TRUE;
-@@ -644,7 +644,7 @@
+@@ -644,7 +644,7 @@ static ficlInteger ficlReturnStackDispla
struct stackContext *context = (struct stackContext *)c;
char buffer[128];
diff --git a/lang/ficl/files/patch-vm.c b/lang/ficl/files/patch-vm.c
new file mode 100644
index 000000000000..7ca07989a136
--- /dev/null
+++ b/lang/ficl/files/patch-vm.c
@@ -0,0 +1,46 @@
+--- vm.c.orig 2010-09-13 18:43:04 UTC
++++ vm.c
+@@ -280,12 +280,12 @@ void ficlVmInnerLoop(ficlVm *vm, ficlWor
+ if (once)
+ count = 1;
+
+- LOCAL_VARIABLE_REFILL;
+-
+ oldExceptionHandler = vm->exceptionHandler;
+ vm->exceptionHandler = &exceptionHandler; /* This has to come before the setjmp! */
+ except = setjmp(exceptionHandler);
+
++ LOCAL_VARIABLE_REFILL;
++
+ if (except)
+ {
+ LOCAL_VARIABLE_SPILL;
+@@ -717,8 +717,8 @@ AGAIN:
+ i = dataTop->i;
+ if (i < 0)
+ continue;
+- CHECK_STACK(i + 1, i + 2);
+- *dataTop = dataTop[-i];
++ CHECK_STACK(i + 2, i + 3);
++ *dataTop = dataTop[-i - 1];
+ continue;
+ }
+
+@@ -1228,7 +1228,7 @@ COMPARE:
+ **************************************************************************/
+ case ficlInstructionRandom:
+ {
+- (++dataTop)->i = rand();
++ (++dataTop)->u = random();
+ continue;
+ }
+
+@@ -1239,7 +1239,7 @@ COMPARE:
+ **************************************************************************/
+ case ficlInstructionSeedRandom:
+ {
+- srand((dataTop--)->i);
++ srandom((dataTop--)->u);
+ continue;
+ }
+
diff --git a/lang/ficl/pkg-descr b/lang/ficl/pkg-descr
index 73536dea619c..c4863693d41d 100644
--- a/lang/ficl/pkg-descr
+++ b/lang/ficl/pkg-descr
@@ -5,4 +5,3 @@ can typically be found in /usr/src/sys/boot/ficl on FreeBSD with the
bindings needed by the OS loader.
WWW: http://ficl.sourceforge.net/
-