;; 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
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
(the string ; (to force error in case of unsupported BSD variant)
#!+FreeBSD "FreeBSD"
#!+OpenBSD "OpenBSD"
+ #!+NetBSD "NetBSD"
#!+Darwin "Darwin"))
(defvar *software-version* nil)
;;; 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)
;;; 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"
(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()
;;; 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)
;; 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")))
#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;
* 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__
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.
*
#if defined(hpux) \
|| defined(SVR4) \
|| defined(__FreeBSD__) \
- || defined(__OpenBSD__)
+ || defined(__OpenBSD__) \
+ || defined(__NetBSD__)
F(cfgetospeed)
F(cfsetospeed)
F(cfgetispeed)
#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
|| defined(SVR4) \
|| defined(__FreeBSD__) \
|| defined(__OpenBSD__) \
+ || defined(__NetBSD__) \
|| defined(__linux__)
F(tcgetattr)
F(tcsetattr)
&& !defined(parisc) \
&& !defined(SOLARIS) \
&& !defined(__OpenBSD__) \
- && !defined(__FreeBSD__)
+ && !defined(__FreeBSD__) \
+ && !defined(__NetBSD__)
F(umount)
#endif
F(unlink)
#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)
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
#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
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);
;;; 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"