(This is particularly annoying because several Lisp functions like
PRINT *precede* their output with a newline, instead of following
it with a newline.)
+
+* (SUBTYPEP '(AND ZILCH INTEGER) 'ZILCH) => NIL, NIL
\ No newline at end of file
have been added.
* Raymond Wiker's patches to port dynamic loading from Linux to
FreeBSD have been added.
+?? $Header$ and other CVS tags have been removed from the sources,
+ because they have never saved me trouble and they've been a
+ nuisance working with patches and other diff-related operations.
?? The debugger now flushes standard output streams before it begins
its output ("debugger invoked" and so forth).
?? FINISH-OUTPUT now works better than it did before. (It used to
(options sb-c-call:int)
(rusage sb-c-call:int))
-(eval-when (load eval compile)
+(eval-when (:compile-toplevel :load-toplevel :execute)
(defconstant wait-wnohang #-svr4 1 #+svr4 #o100)
(defconstant wait-wuntraced #-svr4 2 #+svr4 4)
(defconstant wait-wstopped #-svr4 #o177 #+svr4 wait-wuntraced))
#+FreeBSD
(def-alien-type nil
- (struct sgttyb
- (sg-ispeed sb-c-call:char) ; input speed
- (sg-ospeed sb-c-call:char) ; output speed
- (sg-erase sb-c-call:char) ; erase character
- (sg-kill sb-c-call:char) ; kill character
- (sg-flags sb-c-call:short) ; mode flags
- ))
+ (struct sgttyb
+ (sg-ispeed sb-c-call:char) ; input speed
+ (sg-ospeed sb-c-call:char) ; output speed
+ (sg-erase sb-c-call:char) ; erase character
+ (sg-kill sb-c-call:char) ; kill character
+ (sg-flags sb-c-call:short))) ; mode flags
+#+OpenBSD
+(def-alien-type nil
+ (struct sgttyb
+ (sg-four sb-c-call:int)
+ (sg-chars (array sb-c-call:char 4))
+ (sg-flags sb-c-call:int)))
;;; Find a pty that is not in use. Return three values: the file
;;; descriptor for the master side of the pty, the file descriptor for
sb-unix:o_rdwr
#o666)))
(when slave-fd
- ; Maybe put a vhangup here?
- #-linux
+ ;; comment from classic CMU CL:
+ ;; Maybe put a vhangup here?
+ ;;
+ ;; FIXME: It seems as though this logic should be in
+ ;; OPEN-PTY, not FIND-A-PTY (both from the comments
+ ;; documenting DEFUN FIND-A-PTY, and from the
+ ;; connotations of the function names).
+ ;;
+ ;; FIXME: It would be nice to have a note, and/or a pointer
+ ;; to some reference material somewhere, explaining
+ ;; why we need this on *BSD and not on Linux.
+ #+bsd
(sb-alien:with-alien ((stuff (sb-alien:struct sgttyb)))
(let ((sap (sb-alien:alien-sap stuff)))
(sb-unix:unix-ioctl slave-fd sb-unix:TIOCGETP sap)
(setf (sb-alien:slot stuff 'sg-flags)
- #o300) ; EVENP|ODDP
+ ;; This is EVENP|ODDP, the same numeric code
+ ;; both on FreeBSD and on OpenBSD. -- WHN 20000929
+ #o300) ; EVENP|ODDP
(sb-unix:unix-ioctl slave-fd sb-unix:TIOCSETP sap)
(sb-unix:unix-ioctl master-fd sb-unix:TIOCGETP sap)
(setf (sb-alien:slot stuff 'sg-flags)
(logand (sb-alien:slot stuff 'sg-flags)
+ ;; This is ~ECHO, the same numeric
+ ;; code both on FreeBSD and on OpenBSD.
+ ;; -- WHN 20000929
(lognot 8))) ; ~ECHO
(sb-unix:unix-ioctl master-fd sb-unix:TIOCSETP sap)))
(return-from find-a-pty
(def-unix-error ESRCH 3 "No such process")
|#
(def-unix-error EINTR 4 "Interrupted system call")
-#|
(def-unix-error EIO 5 "I/O error")
+#|
(def-unix-error ENXIO 6 "No such device or address")
(def-unix-error E2BIG 7 "Arg list too long")
(def-unix-error ENOEXEC 8 "Exec format error")
"src/code/inspect" ; FIXME: should be byte compiled
"src/code/profile"
"src/code/ntrace"
+ #+nil ; REMOVEME (for debugging 0.6.7.6 on OpenBSD only)
"src/code/foreign"
+ #+nil ; REMOVEME (for debugging 0.6.7.6 on OpenBSD only)
"src/code/run-program"
;; Code derived from PCL's pre-ANSI DESCRIBE-OBJECT
;; facility is still used in our ANSI DESCRIBE
;;; Note: Mostly these values are black magic, inherited from CMU CL
;;; without any documentation. However, there have been a few changes
;;; since the fork:
-;;; * The non-Linux *TARGET-STATIC-SPACE-START* value was bumped up
-;;; from #x28000000 to #x30000000 when non-Linux ld.so dynamic linking
+;;; * The FreeBSD *TARGET-STATIC-SPACE-START* value was bumped up
+;;; from #x28000000 to #x30000000 when FreeBSD ld.so dynamic linking
;;; support was added for FreeBSD ca. 20000910. This was to keep from
;;; stomping on an address range that the dynamic libraries want to use.
;;; (They want to use this address range even if we try to reserve it
;;; with a call to validate() as the first operation in main().)
#!-linux (defparameter *target-read-only-space-start* #x10000000)
#!-linux (defparameter *target-static-space-start*
- ;; FIXME: was #x28000000 until RAW's RUN-PROGRAM
- ;; patches, why the change?
- #x30000000)
+ #!+freebsd #x30000000
+ #!+openbsd #x28000000)
#!-linux (defparameter *target-dynamic-space-start* #x48000000)
#!+linux (defparameter *target-read-only-space-start* #x01000000)
#!+linux (defparameter *target-static-space-start* #x05000000)
# worked fine for most things, but LOAD-FOREIGN & friends require
# dlopen() etc., which in turn depend on dynamic linking of the
# runtime.
-OS_LINK_FLAGS=-dynamic -export-dynamic
+#for OpenBSD:
+OS_LINK_FLAGS=-static
+#for FreeBSD:
+#OS_LINK_FLAGS=-dynamic -export-dynamic
OS_LIBS=-lm # -ldl
GC_SRC= gencgc.c
}
#endif /* !defined GENCGC */
+\f
+/*
+ * stuff to help work with dynamically linked libraries
+ */
/* feh!
*
* sbcl.nm).
*
* FIXME: This flag should be set in Config.bsd */
+#if defined __FreeBSD__
#define DL_WORKAROUND 1
+#elif defined __OpenBSD__
+/* SBCL doesn't (yet?) work at all with dynamic libs on OpenBSD, so we
+ * wouldn't get any use out of these stubs. -- WHN 20001001 */
+#define DL_WORKAROUND 0
+#else
+#error unsupported BSD variant
+#endif
#if DL_WORKAROUND
#include <unistd.h>
* 0x48000000->0xC8000000 2GB Dynamic Space.
* 0xE0000000-> 256M C stack - Alien stack.
*
+ * OpenBSD:
+ * almost the same as FreeBSD
+ *
* Linux: Note that this map has some problems and requires some further
* development so is not implemented below.
* 0x00000000->0x08000000 128M Unused.
#define READ_ONLY_SPACE_START (0x10000000)
#define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
+#if defined __FreeBSD__
#define STATIC_SPACE_START (0x30000000)
#define STATIC_SPACE_SIZE (0x07fff000) /* 128M - 1 page */
+#elif defined __OpenBSD__
+#define STATIC_SPACE_START (0x28000000)
+#define STATIC_SPACE_SIZE (0x0ffff000) /* 256M - 1 page */
+#else
+#error unsupported BSD variant
+#endif
+
#define BINDING_STACK_START (0x38000000)
#define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
;;; versions, and a string a la "0.6.5.12" is used for versions which
;;; aren't released but correspond only to CVS tags or snapshots.
-"0.6.7.5"
+"0.6.7.6"