aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/boot/ast.boot7
-rw-r--r--src/lisp/core.lisp.in11
3 files changed, 21 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2d4994b9..5af36bf9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-27 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * lisp/core.lisp.in ($ECLVersionNumber): New.
+ * boot/ast.boot (genECLnativeTranslation): Use it.
+
2009-02-22 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/compiler.boot (compAtom): Don't interpret 'nil' as empty
diff --git a/src/boot/ast.boot b/src/boot/ast.boot
index da023938..270b1221 100644
--- a/src/boot/ast.boot
+++ b/src/boot/ast.boot
@@ -1,6 +1,6 @@
-- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd.
-- All rights reserved.
--- Copyright (C) 2007-2008, Gabriel Dos Reis.
+-- Copyright (C) 2007-2009, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -1424,7 +1424,10 @@ genECLnativeTranslation(op,s,t,op') ==
isSimpleNativeType x => '""
[.,[c,y]] := x
c = "buffer" =>
- y = "char" or y = "byte" => '"->vector.self.ch"
+ y = "char" or y = "byte" =>
+ AxiomCore::$ECLVersionNumber < 90100 => '"->vector.self.ch"
+ y = "char" => '"->vector.self.i8"
+ '"->vector.self.b8"
y = "int" => '"->vector.self.fix"
y = "float" => '"->vector.self.sf"
y = "double" => '"->vector.self.df"
diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in
index 53643489..9d65d262 100644
--- a/src/lisp/core.lisp.in
+++ b/src/lisp/core.lisp.in
@@ -82,6 +82,7 @@
"$NativeTypeTable"
"$LispOptimizeOptions"
"$StandardLinking"
+ "$ECLVersionNumber"
"getOptionValue"
"getCommandLineArguments"
@@ -225,6 +226,16 @@
(setf custom:*foreign-encoding*
(ext:make-encoding :charset charset:iso-8859-1))))
+
+;; ECL is a moving target, especially, in its FII support. Track
+;; versions as poor man safeguard to portability chaos.
+(defconstant |$ECLVersionNumber|
+ #-:ecl -1
+ #+:ecl (cond ((find-symbol "+ECL-VERSION-NUMBER+" "EXT")
+ ext:+ecl-version-number+)
+ (t -1)))
+
+
;;
;; -*- OpenAxiom filesystem -*-
;;