Replace use of ENSURE-SUBNET-MASK with ENSURE-NETMASK.
[iolib.git] / base / pkgdcl.lisp
blobeb4e5b0dd9fd9639fc32345952c29263736e9865
1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
2 ;;;
3 ;;; --- Package definition.
4 ;;;
6 (in-package :common-lisp-user)
8 (defpackage :iolib.base
9 (:use #:common-lisp :alexandria)
10 (:shadow #:defun #:defmethod #:defmacro #:define-compiler-macro)
11 (:export
12 ;; Conditions
13 #:bug
14 ;; Types
15 #:function-designator
16 ;; RETURN*
17 #:return* #:lambda* #:defun #:defmethod
18 #:defmacro #:define-compiler-macro
19 ;; DEFOBSOLETE
20 #:defobsolete
21 #:deprecation-warning
22 #:deprecation-warning-function-name
23 #:deprecation-warning-type
24 #:deprecation-warning-reason
25 ;; Reader utils
26 #:define-syntax
27 #:enable-reader-macro #:enable-reader-macro*
28 #:disable-reader-macro #:disable-reader-macro*
29 ;; SPLIT-SEQUENCE
30 #:split-sequence #:split-sequence-if #:split-sequence-if-not
31 ;; Misc
32 #:function-name #:function-name-p
33 #:check-bounds
34 ;; Matching
35 #:multiple-value-case #:flags-case
36 ;; Time
37 #:decode-timeout #:normalize-timeout #:clamp-timeout))
39 (flet ((gather-external-symbols (&rest packages)
40 (let (symbols)
41 (with-package-iterator (iterator packages :external)
42 (loop (multiple-value-bind (morep symbol) (iterator)
43 (unless morep (return))
44 (pushnew (intern (string symbol) :iolib.base)
45 symbols))))
46 symbols)))
47 (export (gather-external-symbols :common-lisp :alexandria :iolib.base)
48 :iolib.base))
51 ;;;-------------------------------------------------------------------------
52 ;;; GRAY stream symbols
53 ;;;-------------------------------------------------------------------------
55 #+cmu
56 (eval-when (:compile-toplevel :load-toplevel :execute)
57 (require :gray-streams))
59 #+allegro
60 (eval-when (:compile-toplevel :load-toplevel :execute)
61 (unless (fboundp 'stream:stream-write-string)
62 (require "streamc.fasl")))
64 (eval-when (:compile-toplevel :load-toplevel :execute)
65 (defvar *gray-stream-symbols*
66 '(#:fundamental-stream #:fundamental-input-stream
67 #:fundamental-output-stream #:fundamental-character-stream
68 #:fundamental-binary-stream #:fundamental-character-input-stream
69 #:fundamental-character-output-stream
70 #:fundamental-binary-input-stream
71 #:fundamental-binary-output-stream #:stream-read-char
72 #:stream-unread-char #:stream-read-char-no-hang
73 #:stream-peek-char #:stream-listen #:stream-read-line
74 #:stream-clear-input #:stream-write-char #:stream-line-column
75 #:stream-start-line-p #:stream-write-string #:stream-terpri
76 #:stream-fresh-line #:stream-finish-output #:stream-force-output
77 #:stream-clear-output #:stream-advance-to-column
78 #:stream-read-byte #:stream-write-byte))
80 (defparameter *gray-stream-package*
81 #+allegro :excl
82 #+cmu :ext
83 #+scl :ext
84 #+clisp :gray
85 #+ecl :gray
86 #+(or ccl openmcl) :ccl
87 #+lispworks :stream
88 #+sbcl :sb-gray
89 #-(or allegro cmu clisp ecl ccl openmcl lispworks sbcl scl)
90 (error "Your CL implementation isn't supported.")))
92 (import (mapcar #'(lambda (s) (find-symbol (string s) *gray-stream-package*))
93 *gray-stream-symbols*)
94 :iolib.base)
96 (export (mapcar (lambda (s) (intern (string s) :iolib.base))
97 (list* '#:trivial-gray-stream-mixin
98 '#:stream-read-sequence
99 '#:stream-write-sequence
100 '#:stream-file-position
101 *gray-stream-symbols*))
102 :iolib.base)