The following features can be used to distinguish between platforms or characteristics of the platform.
Solaris2
OSF/1
HP-UX
IBM AIX
System 5 Release 4 machine (for example Solaris2)
Linux
The variant of FreeBSD underlying Mac OS X.
Unix, including all of the above.
32-bit versions of Microsoft Windows (including Windows 95 and Windows NT)
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:
All major version 4 releases.
Release 4.4.x
All major version 5 releases.
The following features are present in LispWorks with the meanings defined for ANSI CL:
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 X 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.