Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for OpenBSD. #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ https://github.com/sionescu/libfixposix - and its headers in order to
compile. LibFixPOSIX can either be installed manually, for which there
are instructions in the source code, or through distro repositories.

As of Debian 9.0 Stable, the libfixposix package uses code from 2011,
which is incompatible with the current IOlib and will cause a SEGFAULT
on load. Don't use it.

* Tests
Some of the socket tests require an echo server, the default being
one on the Internet. If you can't use that, set
Expand Down
4 changes: 3 additions & 1 deletion src/grovel/grovel.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ int main(int argc, char**argv) {
(defparameter *cxx*
(fcase
(:freebsd "clang++")
(:openbsd "eg++")
((or :cygwin (not (or :windows :freebsd))) "g++")
((and :windows (not :cygwin)) "c:/msys/1.0/bin/g++.exe")))

Expand All @@ -291,8 +292,9 @@ int main(int argc, char**argv) {
(:darwin '("-I" "/opt/local/include/"))
;; FreeBSD non-base header files
;; DragonFly Dports install software in /usr/local
;; OpenBSD install lfp in /usr/local/include
;; And what about pkgsrc?
((or :freebsd :dragonfly) '("-I" "/usr/local/include/"))
((or :freebsd :dragonfly :openbsd) '("-I" "/usr/local/include/"))
(t '()))))

;;; FIXME: is there a better way to detect whether these flags
Expand Down
1 change: 1 addition & 0 deletions src/sockets/conditions.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
(define-socket-error socket-network-down-error :enetdown)
(define-socket-error socket-network-reset-error :enetreset)
(define-socket-error socket-network-unreachable-error :enetunreach)
#-openbsd
(define-socket-error socket-no-network-error :enonet)
(define-socket-error socket-connection-aborted-error :econnaborted)
(define-socket-error socket-connection-reset-error :econnreset)
Expand Down
1 change: 1 addition & 0 deletions src/sockets/grovel.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
(:eprototype "EPROTOTYPE")
(:enoprotoopt "ENOPROTOOPT")
(:eremote "EREMOTE")
#-openbsd
(:enolink "ENOLINK")
(:epfnosupport "EPFNOSUPPORT")
(:eafnosupport "EAFNOSUPPORT")
Expand Down
36 changes: 36 additions & 0 deletions src/syscalls/ffi-types-unix.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,19 @@
(:eaddrnotavail "EADDRNOTAVAIL")
(:eadv "EADV" :optional t)
(:eafnosupport "EAFNOSUPPORT")
#+openbsd
(:eagain "EAGAIN")
(:ealready "EALREADY")
#+openbsd
(:eauth "EAUTH" :optional t)
(:ebade "EBADE" :optional t)
(:ebadf "EBADF")
(:ebadfd "EBADFD" :optional t)
#-openbsd
(:ebadmsg "EBADMSG")
(:ebadr "EBADR" :optional t)
#+openbsd
(:ebadrpc "EBADRPC" :optional t)
(:ebadrqc "EBADRQC" :optional t)
(:ebadslt "EBADSLT" :optional t)
(:ebfont "EBFONT" :optional t)
Expand All @@ -96,7 +103,12 @@
(:eexist "EEXIST")
(:efault "EFAULT")
(:efbig "EFBIG")
#+openbsd
(:eftype "FTYPE" :optional t)
#-openbsd
(:ehostdown "EHOSTDOWN")
#+openbsd
(:ehostdown "EHOSTDOWN" :optional t)
(:ehostunreach "EHOSTUNREACH")
(:ehwpoison "EHWPOISON" :optional t)
(:eidrm "EIDRM")
Expand All @@ -105,6 +117,8 @@
(:eintr "EINTR")
(:einval "EINVAL")
(:eio "EIO")
#+openbsd
(:eipsec "EIPSEC" :optional t)
(:eisconn "EISCONN")
(:eisdir "EISDIR")
(:eisnam "EISNAM" :optional t)
Expand All @@ -115,6 +129,8 @@
(:el2nsync "EL2NSYNC" :optional t)
(:el3hlt "EL3HLT" :optional t)
(:el3rst "EL3RST" :optional t)
#+openbsd
(:elast "ELAST" :optional t)
(:elibacc "ELIBACC" :optional t)
(:elibbad "ELIBBAD" :optional t)
(:elibexec "ELIBEXEC" :optional t)
Expand All @@ -126,14 +142,19 @@
(:emfile "EMFILE")
(:emlink "EMLINK")
(:emsgsize "EMSGSIZE")
#-openbsd
(:emultihop "EMULTIHOP")
(:enametoolong "ENAMETOOLONG")
(:enavail "ENAVAIL" :optional t)
#+openbsd
(:eneedauth "ENEEDAUTH" :optional t)
(:enetdown "ENETDOWN")
(:enetreset "ENETRESET")
(:enetunreach "ENETUNREACH")
(:enfile "ENFILE")
(:enoano "ENOANO" :optional t)
#+openbsd
(:enoattr "ENOATTR" :optional t)
(:enobufs "ENOBUFS")
(:enocsi "ENOCSI" :optional t)
(:enodata "ENODATA" :optional t)
Expand All @@ -142,6 +163,7 @@
(:enoexec "ENOEXEC")
(:enokey "ENOKEY" :optional t)
(:enolck "ENOLCK")
#-openbsd
(:enolink "ENOLINK")
(:enomedium "ENOMEDIUM" :optional t)
(:enomem "ENOMEM")
Expand Down Expand Up @@ -170,6 +192,15 @@
(:eperm "EPERM")
(:epfnosupport "EPFNOSUPPORT" :optional t)
(:epipe "EPIPE")
#+openbsd
(:eproclim "EPROCLIM" :optional t)
#+openbsd
(:eprocunavail "EPROCUNAVAIL" :optional t)
#+openbsd
(:eprogmismatch "EPROGMISMATCH" :optional t)
#+openbsd
(:eprogunavail "EPROGUNAVAIL" :optional t)
#-openbsd
(:eproto "EPROTO")
(:eprotonosupport "EPROTONOSUPPORT")
(:eprototype "EPROTOTYPE")
Expand All @@ -180,7 +211,12 @@
(:erestart "ERESTART" :optional t)
(:erfkill "ERFKILL" :optional t)
(:erofs "EROFS")
#+openbsd
(:erpcmismatch "ERPCMISMATCH" :optional t)
#-openbsd
(:eshutdown "ESHUTDOWN")
#+openbsd
(:eshutdown "ESHUTDOWN" :optional t)
(:esocktnosupport "ESOCKTNOSUPPORT" :optional t)
(:espipe "ESPIPE")
(:esrch "ESRCH")
Expand Down