Next Prev Up Top Contents Index

*features*

Variable
Summary

The features list.

Package

common-lisp

Initial Value

A list containing :lispworks . The actual value varies depending on the platform.

Description

The following features can be used to distinguish between platforms or characteristics of the platform.

:solaris2

Solaris2

:osf/1

OSF/1

:hp-ux

HP-UX

:aix

IBM AIX

:svr4

System 5 Release 4 machine (for example Solaris2)

:linux

Linux

:darwin

The variant of FreeBSD underlying Mac OS X.

:unix

Unix, including all of the above.

:win32

32-bit versions of Microsoft Windows (including Windows 95 and Windows NT)

:little-endian

The compiler targets a little endian machine, for instance DEC Alpha and x86.

Code can distinguish the four current LispWorks implementations like this:

#+:win32 "LispWorks for Windows"
#+:linux "LispWorks for Linux"
#+:darwin "LispWorks for Macintosh"
#+(and :unix (not :linux) (not :darwin)) "LispWorks for Unix"

The following features can be used to distinguish between versions of LispWorks:

:lispworks4

All major version 4 releases.

:lispworks4.3

Release 4.3.

: lispworks5

All major version 5 releases.

The following features are present in LispWorks with the meanings defined for ANSI CL:

:ansi-cl

:common-lisp

:ieee-floating-point

Note that sometimes it is necessary to write code that examines *features* at load time or run time. For example this is true when you put platform-dependent code in fasl files that are shared between multiple platforms.

For a LispWorks image with the CAPI loaded, : capi will appear on *features* .

Note: LispWorks for Macintosh supports the native Mac OS Cocoa-based GUI and the X11/Motif GUI. If you need to test for which of these libraries is loaded, check for the features :cocoa and :x11-motif respectively.


LispWorks Reference Manual - 25 Jul 2003

Next Prev Up Top Contents Index