Artifact
5403495e54118564e9e9cf6a011ecf415a3b8f91:
0000: 3b 3b 20 43 6f 70 79 72 69 67 68 74 20 28 63 29 ;; Copyright (c)
0010: 20 32 30 30 39 20 44 65 72 69 63 6b 20 45 64 64 2009 Derick Edd
0020: 69 6e 67 74 6f 6e 2e 20 20 41 6c 6c 20 72 69 67 ington. All rig
0030: 68 74 73 20 72 65 73 65 72 76 65 64 2e 0a 3b 3b hts reserved..;;
0040: 20 4c 69 63 65 6e 73 65 64 20 75 6e 64 65 72 20 Licensed under
0050: 61 6e 20 4d 49 54 2d 73 74 79 6c 65 20 6c 69 63 an MIT-style lic
0060: 65 6e 73 65 2e 20 20 4d 79 20 6c 69 63 65 6e 73 ense. My licens
0070: 65 20 69 73 20 69 6e 20 74 68 65 20 66 69 6c 65 e is in the file
0080: 0a 3b 3b 20 6e 61 6d 65 64 20 4c 49 43 45 4e 53 .;; named LICENS
0090: 45 20 66 72 6f 6d 20 74 68 65 20 6f 72 69 67 69 E from the origi
00a0: 6e 61 6c 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 74 nal collection t
00b0: 68 69 73 20 66 69 6c 65 20 69 73 20 64 69 73 74 his file is dist
00c0: 72 69 62 75 74 65 64 0a 3b 3b 20 77 69 74 68 2e ributed.;; with.
00d0: 20 20 49 66 20 74 68 69 73 20 66 69 6c 65 20 69 If this file i
00e0: 73 20 72 65 64 69 73 74 72 69 62 75 74 65 64 20 s redistributed
00f0: 77 69 74 68 20 73 6f 6d 65 20 6f 74 68 65 72 20 with some other
0100: 63 6f 6c 6c 65 63 74 69 6f 6e 2c 20 6d 79 0a 3b collection, my.;
0110: 3b 20 6c 69 63 65 6e 73 65 20 6d 75 73 74 20 61 ; license must a
0120: 6c 73 6f 20 62 65 20 69 6e 63 6c 75 64 65 64 2e lso be included.
0130: 0a 0a 23 21 72 36 72 73 0a 28 6c 69 62 72 61 72 ..#!r6rs.(librar
0140: 79 20 28 73 72 66 69 20 70 72 69 76 61 74 65 20 y (srfi private
0150: 70 6c 61 74 66 6f 72 6d 2d 66 65 61 74 75 72 65 platform-feature
0160: 73 29 0a 20 20 28 65 78 70 6f 72 74 0a 20 20 20 s). (export.
0170: 20 4f 53 2d 66 65 61 74 75 72 65 73 0a 20 20 20 OS-features.
0180: 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 2d implementation-
0190: 66 65 61 74 75 72 65 73 29 0a 20 20 28 69 6d 70 features). (imp
01a0: 6f 72 74 0a 20 20 20 20 28 72 6e 72 73 29 0a 20 ort. (rnrs).
01b0: 20 20 20 28 6f 6e 6c 79 20 28 73 63 68 65 6d 65 (only (scheme
01c0: 20 62 61 73 65 29 20 73 79 73 74 65 6d 2d 74 79 base) system-ty
01d0: 70 65 29 0a 20 20 20 20 28 73 72 66 69 20 70 72 pe). (srfi pr
01e0: 69 76 61 74 65 20 4f 53 2d 69 64 2d 66 65 61 74 ivate OS-id-feat
01f0: 75 72 65 73 29 29 0a 20 20 0a 20 20 28 64 65 66 ures)). . (def
0200: 69 6e 65 20 28 4f 53 2d 66 65 61 74 75 72 65 73 ine (OS-features
0210: 29 0a 20 20 20 20 28 4f 53 2d 69 64 2d 66 65 61 ). (OS-id-fea
0220: 74 75 72 65 73 0a 20 20 20 20 20 28 73 74 72 69 tures. (stri
0230: 6e 67 2d 61 70 70 65 6e 64 20 28 73 79 6d 62 6f ng-append (symbo
0240: 6c 2d 3e 73 74 72 69 6e 67 20 28 73 79 73 74 65 l->string (syste
0250: 6d 2d 74 79 70 65 20 27 6f 73 29 29 0a 20 20 20 m-type 'os)).
0260: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0270: 20 22 20 22 20 28 73 79 73 74 65 6d 2d 74 79 70 " " (system-typ
0280: 65 20 27 6d 61 63 68 69 6e 65 29 29 0a 20 20 20 e 'machine)).
0290: 20 20 27 28 28 22 6c 69 6e 75 78 22 20 6c 69 6e '(("linux" lin
02a0: 75 78 20 70 6f 73 69 78 29 0a 20 20 20 20 20 20 ux posix).
02b0: 20 28 22 6d 61 63 6f 73 78 22 20 6d 61 63 2d 6f ("macosx" mac-o
02c0: 73 2d 78 20 64 61 72 77 69 6e 20 70 6f 73 69 78 s-x darwin posix
02d0: 29 0a 20 20 20 20 20 20 20 28 22 73 6f 6c 61 72 ). ("solar
02e0: 69 73 22 20 73 6f 6c 61 72 69 73 20 70 6f 73 69 is" solaris posi
02f0: 78 29 0a 20 20 20 20 20 20 20 28 22 67 6e 75 22 x). ("gnu"
0300: 20 67 6e 75 29 0a 20 20 20 20 20 20 20 28 22 62 gnu). ("b
0310: 73 64 22 20 62 73 64 29 0a 20 20 20 20 20 20 20 sd" bsd).
0320: 28 22 66 72 65 65 62 73 64 22 20 66 72 65 65 62 ("freebsd" freeb
0330: 73 64 20 70 6f 73 69 78 29 0a 20 20 20 20 20 20 sd posix).
0340: 20 28 22 6f 70 65 6e 62 73 64 22 20 6f 70 65 6e ("openbsd" open
0350: 62 73 64 20 70 6f 73 69 78 29 0a 20 20 20 20 20 bsd posix).
0360: 20 20 28 22 77 69 6e 64 6f 77 73 22 20 77 69 6e ("windows" win
0370: 64 6f 77 73 29 29 29 29 0a 20 20 0a 20 20 28 64 dows)))). . (d
0380: 65 66 69 6e 65 20 28 69 6d 70 6c 65 6d 65 6e 74 efine (implement
0390: 61 74 69 6f 6e 2d 66 65 61 74 75 72 65 73 29 0a ation-features).
03a0: 20 20 20 20 27 28 6d 7a 73 63 68 65 6d 65 29 29 '(mzscheme))
03b0: 0a 29 0a .).