FreeBSD mods, mostly in comments

This commit is contained in:
bdc 1995-11-04 21:13:42 +00:00
parent 4a47a768c6
commit 702f0126c5
9 changed files with 41 additions and 39 deletions

View File

@ -2,7 +2,8 @@
;;; Copyright (c) 1993 by Olin Shivers.
;;; Copyright (c) 1994 by Brian D. Carlstrom.
;;; These are the correct values for NetBSD 1.0 systems.
;;; These are the correct values for BSD4.4-Lite-based systems
;;; such as NetBSD 1.0 and FreeBSD 2.0.
(define-syntax define-errnos
(syntax-rules ()
@ -23,14 +24,14 @@
(noexec 8) ; Exec format error
(badf 9) ; Bad file descriptor
(child 10) ; No child processes
;; NetBSD
;; BSD4.4-Lite
(deadlk 11) ; Resource deadlock avoided
;; POSIX:
(nomem 12) ; Not enough space
(acces 13) ; Permission denied
(fault 14) ; Bad address
;; NetBSD
;; BSD4.4-Lite
(notblk 15) ; Block device required
;; POSIX
@ -44,7 +45,7 @@
(nfile 23) ; Too many open files in system
(mfile 24) ; Too many open files
(notty 25) ; Inappropriate I/O control operation
;; NetBSD
;; BSD4.4-Lite
(txtbsy 26) ; Text file busy
;; POSIX
(fbig 27) ; File too large
@ -62,7 +63,7 @@
;; POSIX
(again 35) ; Resource temporarily unavaile (note overlap)
;; NetBSD
;; BSD4.4-Lite
;; non-blocking and interrupt i/o
(wouldblock 35) ; Operation would block
(inprogress 36) ; Operation now in progress
@ -103,14 +104,14 @@
;; POSIX:
(nametoolong 63) ; File name too long
;; NetBSD
;; BSD4.4-Lite
(hostdown 64) ; Host is down
(hostunreach 65) ; No route to host
;; POSIX:
(notempty 66) ; Directory not empty
;; NetBSD
;; BSD4.4-Lite
;; quotas & mush
(proclim 67) ; Too many processes
(users 68) ; Too many users
@ -130,7 +131,7 @@
;; POSIX
(nosys 78) ; Function not implemented
;; NetBSD
;; BSD4.4-Lite
(ftype 79) ; Inappropriate file type or format
(auth 80) ; Authentication error
(needauth 81) ; Need authenticator

View File

@ -15,7 +15,7 @@
(nonblocking #x0004) ; no delay
(append #x0008) ; set append mode
;; NetBSD
;; BSD4.4-Lite
(shlock #x0010) ; open with shared file lock
(exlock #x0020) ; open with exclusive file lock
(async #x0040) ; signal pgrep when data ready

View File

@ -113,7 +113,7 @@
socket/broadcast
socket/use-loop-back
socket/oob-inline
socket/reuse-port ;netbsd
socket/reuse-port ;BSD4.4-Lite
; socket/use-privileged
; socket/cant-signal
tcp/no-delay))

View File

@ -1,8 +1,8 @@
;;; Interfaces and packages for the NetBSD specific parts of scsh.
;;; Interfaces and packages for the BSD4.4-Lite specific parts of scsh.
;;; Copyright (c) 1994 by Olin Shivers.
;;; Copyright (c) 1994 by Brian D. Carlstrom.
(define-interface netbsd-fdflags-extras-interface
(define-interface bsd44lite-fdflags-extras-interface
(export open/shlock
open/exlock
open/async
@ -10,7 +10,7 @@
fcntl/get-owner
fcntl/set-owner))
(define-interface netbsd-errno-extras-interface
(define-interface bsd44lite-errno-extras-interface
(export errno/deadlk
errno/notblk
errno/txtbsy
@ -59,7 +59,7 @@
errno/needauth
errno/last))
(define-interface netbsd-signals-extras-interface
(define-interface bsd44lite-signals-extras-interface
(export signal/trap
signal/emt
signal/bus
@ -74,7 +74,7 @@
signal/winch
signal/info))
(define-interface netbsd-network-extras-interface
(define-interface bsd44lite-network-extras-interface
(export socket/debug
socket/accept-connect
socket/reuse-address
@ -84,7 +84,7 @@
socket/use-loop-back
socket/linger
socket/oob-inline
socket/reuse-port ;netbsd
socket/reuse-port ;bsd44lite
; socket/use-privileged
; socket/cant-signal
socket/send-buffer
@ -95,7 +95,7 @@
socket/receive-timeout
socket/error
socket/type
;;; all ip/* but ip/options and ip/time-to-live netbsd only
;;; all ip/* but ip/options and ip/time-to-live bsd44lite only
ip/options
ip/header-included
ip/type-of-service
@ -117,22 +117,22 @@
message/wait-all
message/dont-wait))
(define-interface netbsd-extras-interface
(compound-interface netbsd-errno-extras-interface
netbsd-fdflags-extras-interface
netbsd-network-extras-interface
netbsd-signals-extras-interface))
(define-interface bsd44lite-extras-interface
(compound-interface bsd44lite-errno-extras-interface
bsd44lite-fdflags-extras-interface
bsd44lite-network-extras-interface
bsd44lite-signals-extras-interface))
(define-interface netbsd-defs-interface
(compound-interface netbsd-extras-interface
(define-interface bsd44lite-defs-interface
(compound-interface bsd44lite-extras-interface
sockets-network-interface
posix-errno-interface
posix-fdflags-interface
posix-signals-interface))
(define-structure netbsd-defs netbsd-defs-interface
(define-structure bsd44lite-defs bsd44lite-defs-interface
(open scheme bitwise defenum-package)
(files fdflags errno signals netconst))
(define-interface os-extras-interface netbsd-extras-interface)
(define os-dependent netbsd-defs)
(define-interface os-extras-interface bsd44lite-extras-interface)
(define os-dependent bsd44lite-defs)

View File

@ -1,4 +1,4 @@
;;; Signal constant definitions for NetBSD
;;; Signal constant definitions for BSD4.4-Lite
;;; Copyright (c) 1994 by Olin Shivers.
;;; Copyright (c) 1994 by Brian D. Carlstrom.
@ -14,27 +14,27 @@
(quit 3) ; quit
(ill 4) ; illegal instruction (not reset when caught)
;; NetBSD
;; BSD4.4-Lite
(trap 5) ; trace trap (not reset when caught)
;; POSIX
(iot 6) ; IOT instruction
(abrt 6) ; used by abort, replace SIGIOT in the future
;; NetBSD
;; BSD4.4-Lite
(emt 7) ; EMT instruction
;; POSIX
(fpe 8) ; floating point exception
(kill 9) ; kill (cannot be caught or ignored)
;; NetBSD
;; BSD4.4-Lite
(bus 10) ; bus error
;; POSIX
(segv 11) ; segmentation violation
;; NetBSD
;; BSD4.4-Lite
(sys 12) ; bad argument to system call
;; POSIX
@ -42,7 +42,7 @@
(alrm 14) ; alarm clock
(term 15) ; software termination signal from kill
;; NetBSD
;; BSD4.4-Lite
(urg 16) ; urgent condition on IO channel
;; POSIX
@ -51,14 +51,14 @@
(cont 19) ; continue a stopped process
(chld 20) ; to parent on child stop or exit
;; NetBSD
;; BSD4.4-Lite
(cld 20) ; System V name for SIGCHLD
;; POSIX
(ttin 21) ; to readers pgrp upon background tty read
(ttou 22) ; like TTIN for output if (tp->t_local&LTOSTOP)
;; NetBSD
;; BSD4.4-Lite
(io 23) ; input/output possible signal
(xcpu 24) ; exceeded CPU time limit
(xfsz 25) ; exceeded file size limit

View File

@ -4,7 +4,8 @@
;;; Constants from NetBSD header files substituted by Bill Sommerfeld
;;; These constants are for NetBSD 1.1 pre-alpha
;;; and are taken from /usr/include/sys/termios.h.
;;; and are taken from /usr/include/sys/termios.h. These should
;;; work with any BSD4.4-Lite derived system (such as FreeBSD).
;;; Non-standard (POSIX, SVR4, 4.3+BSD) things:
;;; - Some of the baud rates.

View File

@ -4,7 +4,7 @@
;;; To port these to a new OS, consult /usr/include/sys/wait.h,
;;; and check the WIFEXITED, WEXITSTATUS, WIFSTOPPED, WSTOPSIG,
;;; WIFSIGNALED, and WTERMSIG macros for the magic fields they use.
;;; These definitions are for NetBSD.
;;; These definitions are for BSD4.4-Lite.
;;;
;;; I could have done a portable version by making C calls for this,
;;; but it's such overkill.

View File

@ -1 +1 @@
4.1
4.2

2
unix.c
View File

@ -175,7 +175,7 @@ char_ready_p( FILE* stream )
#elif defined(__linux__)
if (stream->_IO_read_ptr < stream->_IO_read_end)
return 1;
#elif defined(__NetBSD__)
#elif defined(BSD) && (BSD >= 199306)
if (stream->_r)
return 1;
#else