Choose (hopefully) more informative return values for LISP-IMPLEMENTATION-VERSION.

The use of "-" as a separator for fields in imitation of GNU configure
would probably be better replaced with returning proper lists.
parent 904fc615
......@@ -48,14 +48,20 @@ public final class lisp_implementation_version extends Primitive
@Override
public LispObject execute()
{
String vendor = System.getProperty("java.vendor");
vendor = vendor.replace(" ", "_");
String jdkVersion = MessageFormat.format("{0}-{1}-{2})",
vendor,
System.getProperty("os.arch"),
System.getProperty("java.runtime.version"));
System.getProperty("java.vm.name"),
System.getProperty("java.vm.vendor"),
System.getProperty("java.runtime.version"))
.replace(" ", "_");
String osVersion = MessageFormat.format("{0}-{1}-{2})",
System.getProperty("os.arch"),
System.getProperty("os.name"),
System.getProperty("os.version"))
.replace(" ", "_");
return Primitives.VALUES.execute(new SimpleString(Version.getVersion()),
new SimpleString(jdkVersion));
new SimpleString(jdkVersion),
new SimpleString(osVersion));
}
private static final lisp_implementation_version LISP_IMPLEMENTATION_VERSION =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment