Skip to content
Browse files

0.8.9.6.netbsd.1:

	Merge patch (Perry Metzger sbcl-devel 2004-03-27) for partial
	NetBSD support (some work also due to Valtteri Vuorikoski)
  • Loading branch information...
1 parent e9840c3 commit 074ba0606c687dbca4afc99e8e72e6f1a4486d24 @csrhodes csrhodes committed
View
1 base-target-features.lisp-expr
@@ -277,6 +277,7 @@
;; particular version of BSD we're intended to run under.)
;; :freebsd = We're intended to run under FreeBSD.
;; :openbsd = We're intended to run under OpenBSD.
+ ;; :netbsd = We're intended to run under NetBSD.
;; :sunos = We're intended to run under Solaris user environment
;; with the SunOS kernel.
;; :osf1 = We're intended to run under Tru64 (aka Digital Unix
View
4 make-config.sh
@@ -129,6 +129,10 @@ case `uname` in
sbcl_os="openbsd"
ln -s Config.$sbcl_arch-openbsd Config
;;
+ NetBSD)
+ printf ' :netbsd' >> $ltf
+ ln -s Config.$sbcl_arch-netbsd Config
+ ;;
*)
echo unsupported BSD variant: `uname`
exit 1
View
1 src/code/bsd-os.lisp
@@ -17,6 +17,7 @@
(the string ; (to force error in case of unsupported BSD variant)
#!+FreeBSD "FreeBSD"
#!+OpenBSD "OpenBSD"
+ #!+NetBSD "NetBSD"
#!+Darwin "Darwin"))
(defvar *software-version* nil)
View
6 src/code/foreign.lisp
@@ -52,7 +52,7 @@
;;; On any OS where we don't support foreign object file loading, any
;;; query of a foreign symbol value is answered with "no definition
;;; known", i.e. NIL.
-#-(or linux sunos FreeBSD OpenBSD darwin)
+#-(or linux sunos FreeBSD OpenBSD NetBSD darwin)
(defun get-dynamic-foreign-symbol-address (symbol)
(declare (type simple-string symbol) (ignore symbol))
nil)
@@ -62,7 +62,7 @@
;;; work on any ELF system with dlopen(3) and dlsym(3)
;;; It also works on OpenBSD, which isn't ELF, but is otherwise modern
;;; enough to have a fairly well working dlopen/dlsym implementation.
-#-(or linux sunos FreeBSD OpenBSD darwin)
+#-(or linux sunos FreeBSD OpenBSD NetBSD darwin)
(macrolet ((define-unsupported-fun (fun-name)
`(defun ,fun-name (&rest rest)
"unsupported on this system"
@@ -70,7 +70,7 @@
(error 'unsupported-operator :name ',fun-name))))
(define-unsupported-fun load-1-foreign)
(define-unsupported-fun load-foreign))
-#+(or linux sunos FreeBSD OpenBSD darwin)
+#+(or linux sunos FreeBSD OpenBSD NetBSD darwin)
(progn
;;; flags for dlopen()
View
2 src/code/load.lisp
@@ -401,7 +401,7 @@
;;; code for foreign symbol lookup should be here.
(defun find-foreign-symbol-in-table (name table)
(let ((prefixes
- #!+(or osf1 sunos linux freebsd darwin) #("" "ldso_stub__")
+ #!+(or osf1 sunos linux freebsd netbsd darwin) #("" "ldso_stub__")
#!+openbsd #("")))
(declare (notinline some)) ; to suppress bug 117 bogowarning
(some (lambda (prefix)
View
6 src/code/unix.lisp
@@ -293,14 +293,14 @@
;; a constant. Going the grovel_headers route doesn't seem to be
;; helpful, either, as Solaris doesn't export PATH_MAX from
;; unistd.h.
- #!-(or linux openbsd freebsd sunos osf1 darwin) (,stub,)
- #!+(or linux openbsd freebsd sunos osf1 darwin)
+ #!-(or linux openbsd freebsd netbsd sunos osf1 darwin) (,stub,)
+ #!+(or linux openbsd freebsd netbsd sunos osf1 darwin)
(or (newcharstar-string (alien-funcall (extern-alien "getcwd"
(function (* char)
(* char)
size-t))
nil
- #!+(or linux openbsd freebsd darwin) 0
+ #!+(or linux openbsd freebsd netbsd darwin) 0
#!+(or sunos osf1) 1025))
(simple-perror "getcwd")))
View
6 src/runtime/bsd-os.h
@@ -18,7 +18,11 @@
#include <sys/signal.h>
typedef caddr_t os_vm_address_t;
+#ifdef __NetBSD__
+typedef vsize_t os_vm_size_t;
+#else
typedef vm_size_t os_vm_size_t;
+#endif
typedef off_t os_vm_offset_t;
typedef int os_vm_prot_t;
typedef int os_context_register_t;
@@ -28,7 +32,7 @@ typedef int os_context_register_t;
* Linux sigaltstack(2) */
typedef struct sigaltstack stack_t;
#elif defined __FreeBSD__
-/* FreeBSD 4.6 already has stack_t defined. */
+/* FreeBSD 4.6 and NetBSD 1.6 already have stack_t defined. */
#endif
#if defined __FreeBSD__
View
2 src/runtime/gencgc.c
@@ -69,7 +69,7 @@ boolean interrupt_maybe_gc_int(int, siginfo_t *, void *);
boolean enable_page_protection = 1;
/* Should we unmap a page and re-mmap it to have it zero filled? */
-#if defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
/* comment from cmucl-2.4.8: This can waste a lot of swap on FreeBSD
* so don't unmap there.
*
View
11 src/runtime/undefineds.h
@@ -38,7 +38,8 @@ F(brk)
#if defined(hpux) \
|| defined(SVR4) \
|| defined(__FreeBSD__) \
- || defined(__OpenBSD__)
+ || defined(__OpenBSD__) \
+ || defined(__NetBSD__)
F(cfgetospeed)
F(cfsetospeed)
F(cfgetispeed)
@@ -152,7 +153,7 @@ F(sigreturn)
#if !defined(SVR4)
F(sigsetmask)
#endif
-#if !defined(SVR4) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
+#if !defined(SVR4) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
F(sigstack)
F(sigvec)
#endif
@@ -177,6 +178,7 @@ F(readdir)
|| defined(SVR4) \
|| defined(__FreeBSD__) \
|| defined(__OpenBSD__) \
+ || defined(__NetBSD__) \
|| defined(__linux__)
F(tcgetattr)
F(tcsetattr)
@@ -194,7 +196,8 @@ F(umask)
&& !defined(parisc) \
&& !defined(SOLARIS) \
&& !defined(__OpenBSD__) \
- && !defined(__FreeBSD__)
+ && !defined(__FreeBSD__) \
+ && !defined(__NetBSD__)
F(umount)
#endif
F(unlink)
@@ -204,7 +207,7 @@ F(utimes)
#ifndef irix
F(vfork)
#endif
-#if !defined(osf1) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
+#if !defined(osf1) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
F(vhangup)
#endif
F(wait)
View
2 src/runtime/x86-arch.c
@@ -55,7 +55,7 @@ context_eflags_addr(os_context_t *context)
return &context->uc_mcontext.gregs[16];
#elif defined __FreeBSD__
return &context->uc_mcontext.mc_eflags;
-#elif defined __OpenBSD__
+#elif defined __OpenBSD__ || defined __NetBSD__
return &context->sc_eflags;
#else
#error unsupported OS
View
6 src/runtime/x86-assem.S
@@ -23,15 +23,15 @@
#include "genesis/thread.h"
/* Minimize conditionalization for different OS naming schemes. */
-#if defined __linux__ || defined __FreeBSD__ /* (but *not* OpenBSD) */
+#if defined __linux__ || defined __FreeBSD__ || defined __NetBSD__ /* (but *not* OpenBSD) */
#define GNAME(var) var
#else
#define GNAME(var) _##var
#endif
-/* Get the right type of alignment. Linux and FreeBSD (but not OpenBSD)
+/* Get the right type of alignment. Linux, FreeBSD and NetBSD (but not OpenBSD)
* want alignment in bytes. */
-#if defined(__linux__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
#define align_4byte 4
#define align_8byte 8
#define align_16byte 16
View
2 tools-for-build/grovel-headers.c
@@ -76,7 +76,7 @@ main(int argc, char *argv[])
DEFTYPE("uid-t", uid_t);
printf("\n");
- printf(";;; fcntl.h (or unistd.h on OpenBSD)\n");
+ printf(";;; fcntl.h (or unistd.h on OpenBSD and NetBSD)\n");
defconstant("r_ok", R_OK);
defconstant("w_ok", W_OK);
defconstant("x_ok", X_OK);
View
2 version.lisp-expr
@@ -17,4 +17,4 @@
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.9.6"
+"0.8.9.6.netbsd.1"

0 comments on commit 074ba06

Please sign in to comment.
Something went wrong with that request. Please try again.