Introduction
Introduction Statistics Contact Development Disclaimer Help
tSPEC.md - clic - Clic is an command line interactive client for gopher written…
git clone git://bitreich.org/clic/ git://hg6vgqziawt5s4dj.onion/clic/
Log
Files
Refs
Tags
LICENSE
---
tSPEC.md (2342B)
---
1 TRIVIAL-FEATURES
2 ================
3
4 This is a first *draft* of a description of what symbols should be
5 present in `CL:*FEATURES*` for various platforms. A possible future
6 direction of this documentation might be a CDR document, if it turns
7 out to be a good idea. (Making the language of this document much
8 more precise will be necessary then.)
9
10 We will start by limiting ourselves to OS, CPU and endianness features
11 on Windows and POSIX platforms.
12
13 There are various possible implementation strategies ranging from null
14 implementations (when the host Lisp already pushes the wanted feature)
15 to using FFI (e.g. calling uname() to grab system information.
16
17
18 Specification
19 -------------
20
21 ### ENDIANNESS
22
23 Either `:LITTLE-ENDIAN` or `:BIG-ENDIAN` should present in
24 `\*FEATURES\*`. For the time being, we will not concern ourselves
25 with other orderings, switchable endianness, etc.
26
27
28 ### OPERATING SYSTEM
29
30 On Windows, `:WINDOWS` should be present in `*FEATURES*`.
31
32 On POSIX systems, the "sysname" information from uname(3) should be
33 used to push the appropriate symbol to `*FEATURES*` by upcasing that
34 string (or downcasing for the "modern" lisps) and interning it in the
35 keyword package.
36
37 Examples:
38
39 - `:DARWIN`
40 - `:LINUX`
41 - `:NETBSD`
42 - `:OPENBSD`
43 - `:FREEBSD`
44
45 For convenience, `:UNIX` should be pushed when running on
46 POSIX/UNIX-like operating system (that doesn't include Windows) and
47 `:BSD` should be present when running on BSD-based systems (that
48 includes Darwin)
49
50 [add `:MACH` too?]
51
52
53 ### CPU
54
55 These features should be mutually exclusive:
56
57 - `:X86`
58 - `:X86-64`
59 - `:PPC`
60 - `:PPC64`
61 - `:MIPS`
62 - `:ALPHA`
63 - `:SPARC`
64 - `:SPARC64`
65 - `:HPPA`
66 - `:HPPA64`
67
68 [add more ...]
69
70 [note: it's debatable whether `:X86` shouldn't also be exported on
71 x86-64, and `:PPC` on ppc64. SBCL doesn't. Other ways
72 to handle, for example, the x86/x86-64 case would be to export
73 something like `:PC386` in both cases or have an additional `:X86-32`. Or
74 finally, have just `:X86`, `:PPC`, etc, and add `:32-BIT-CPU` and
75 `:64-BIT-CPU` features.]
76
77
78 Unreferenced References
79 -----------------------
80
81 * [CLHS: Variable \*FEATURES\*][1]
82 * [Maintaining Portable Lisp Programs][2], by Christophe Rhodes
83
84
85 [1]: http://www.lispworks.com/documentation/HyperSpec/Body/v_featur.htm
86 [2]: http://www-jcsu.jesus.cam.ac.uk/~csr21/papers/features.pdf
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.