From dca20740848a3e316371460a25be29fd574850ed Mon Sep 17 00:00:00 2001 From: Juho Snellman Date: Mon, 23 Aug 2010 23:21:27 +0000 Subject: [PATCH] 1.0.41.55: Solaris fixes * Remove bashisms. * Conditionalize out some constants and functions that don't exist on Solaris. * Patch from Jim Wise. --- contrib/asdf-module.mk | 1 + contrib/sb-bsd-sockets/constants.lisp | 6 +++--- contrib/sb-posix/constants.lisp | 30 +++++++++++++++--------------- contrib/sb-posix/interface.lisp | 12 ++++++------ contrib/sb-posix/posix-tests.lisp | 6 ++++-- tests/subr.sh | 4 ++-- version.lisp-expr | 2 +- 7 files changed, 32 insertions(+), 29 deletions(-) diff --git a/contrib/asdf-module.mk b/contrib/asdf-module.mk index a9e55d7..b6edb51 100644 --- a/contrib/asdf-module.mk +++ b/contrib/asdf-module.mk @@ -11,6 +11,7 @@ UNAME:=$(shell uname -s) ifeq (SunOS,$(UNAME)) EXTRA_CFLAGS=-D_XOPEN_SOURCE=500 -D__EXTENSIONS__ + PATH:=/usr/xpg4/bin:${PATH} endif ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME))) EXTRA_CFLAGS=-mno-cygwin diff --git a/contrib/sb-bsd-sockets/constants.lisp b/contrib/sb-bsd-sockets/constants.lisp index 2b131f2..3cc35a4 100644 --- a/contrib/sb-bsd-sockets/constants.lisp +++ b/contrib/sb-bsd-sockets/constants.lisp @@ -47,7 +47,7 @@ "Send periodic keepalives: if peer does not respond, we get SIGPIPE") (:integer so-oobinline "SO_OOBINLINE" "Put out-of-band data into the normal input queue when received") - #-freebsd + #+linux (:integer so-no-check "SO_NO_CHECK") #+linux (:integer so-priority "SO_PRIORITY") (:integer so-linger "SO_LINGER" @@ -85,7 +85,7 @@ (:integer NO-RECOVERY "NO_RECOVERY" "Non recoverable errors, FORMERR, REFUSED, NOTIMP.") (:integer NO-DATA "NO_DATA" "Valid name, no data record of requested type.") (:integer NO-ADDRESS "NO_ADDRESS" "No address, look for MX record.") - #-hpux (:function h-strerror ("hstrerror" c-string (errno int))) + #-(or hpux sunos) (:function h-strerror ("hstrerror" c-string (errno int))) (:integer O-NONBLOCK "O_NONBLOCK") (:integer f-getfl "F_GETFL") @@ -98,7 +98,7 @@ (:integer msg-eor "MSG_EOR") (:integer msg-dontroute "MSG_DONTROUTE") (:integer msg-dontwait "MSG_DONTWAIT") - (:integer msg-nosignal "MSG_NOSIGNAL") + #+linux (:integer msg-nosignal "MSG_NOSIGNAL") #+linux (:integer msg-confirm "MSG_CONFIRM") #+linux (:integer msg-more "MSG_MORE") diff --git a/contrib/sb-posix/constants.lisp b/contrib/sb-posix/constants.lisp index 2d3c90a..c00a7bf 100644 --- a/contrib/sb-posix/constants.lisp +++ b/contrib/sb-posix/constants.lisp @@ -157,7 +157,7 @@ (:errno ecomm "ECOMM" nil t) (:errno eproto "EPROTO" nil t) (:errno emultihop "EMULTIHOP" nil t) - (:errno edotdot "EDOTDOT" nil t) +#-sunos (:errno edotdot "EDOTDOT" nil t) (:errno ebadmsg "EBADMSG" nil t) (:errno eoverflow "EOVERFLOW" nil t) (:errno enotuniq "ENOTUNIQ" nil t) @@ -201,13 +201,13 @@ (:errno ealready "EALREADY" nil t) (:errno einprogress "EINPROGRESS" nil t) (:errno estale "ESTALE" nil t) - (:errno euclean "EUCLEAN" nil t) - (:errno enotnam "ENOTNAM" nil t) - (:errno enavail "ENAVAIL" nil t) - (:errno eremoteio "EREMOTEIO" nil t) - (:errno edquot "EDQUOT" nil t) - (:errno enomedium "ENOMEDIUM" nil t) - (:errno emediumtype "EMEDIUMTYPE" nil t) +#-sunos (:errno euclean "EUCLEAN" nil t) +#-sunos (:errno enotnam "ENOTNAM" nil t) +#-sunos (:errno enavail "ENAVAIL" nil t) +#-sunos (:errno eremoteio "EREMOTEIO" nil t) +#-sunos (:errno edquot "EDQUOT" nil t) +#-sunos (:errno enomedium "ENOMEDIUM" nil t) +#-sunos (:errno emediumtype "EMEDIUMTYPE" nil t) ;; wait (:integer wnohang "WNOHANG") @@ -223,7 +223,7 @@ (:integer s-ifreg "S_IFREG" nil t) (:integer s-iflnk "S_IFLNK" nil t) (:integer s-ifsock "S_IFSOCK" nil t) - (:integer s-ifwht "S_IFWHT" nil t) +#-sunos (:integer s-ifwht "S_IFWHT" nil t) (:integer s-isuid "S_ISUID" nil t) (:integer s-isgid "S_ISGID" nil t) (:integer s-isvtx "S_ISVTX" nil t) @@ -340,9 +340,9 @@ (:integer o-ndelay "O_NDELAY" nil t) (:integer o-sync "O_SYNC" nil t) (:integer o-nofollow "O_NOFOLLOW" nil t) - (:integer o-directory "O_DIRECTORY" nil t) - (:integer o-direct "O_DIRECT" nil t) - (:integer o-async "O_ASYNC" nil t) +#-sunos (:integer o-directory "O_DIRECTORY" nil t) +#-sunos (:integer o-direct "O_DIRECT" nil t) +#-sunos (:integer o-async "O_ASYNC" nil t) (:integer o-largefile "O_LARGEFILE" nil t) ; hmm... (:integer o-dsync "O_DSYNC" nil t) (:integer o-rsync "O_RSYNC" nil t) @@ -553,7 +553,7 @@ ;; Additional, non-standard openlog() facilities (most of which ;; probably won't be needed by Lisp programs, but here for ;; completeness). - #-win32 + #-(or win32 sunos) (:integer log-authpriv "LOG_AUTHPRIV" "openlog() facility for authorization messages" t) #-win32 @@ -562,7 +562,7 @@ #-win32 (:integer log-daemon "LOG_DAEMON" "openlog() facility for arbitrary daemons" t) - #-win32 + #-(or win32 sunos) (:integer log-ftp "LOG_FTP" "openlog() facility for FTP daemons" t) #-win32 @@ -611,7 +611,7 @@ "If supplied to openlog(), do not wait for child processes created by calls to syslog()." t) ;; Not in SUSv3, but at least Glibc and BSD libc have this - #-win32 + #-(or win32 sunos) (:integer log-perror "LOG_PERROR" "If supplied to openlog(), write log messages to the process's standard error descriptor in addition to the logging facility." diff --git a/contrib/sb-posix/interface.lisp b/contrib/sb-posix/interface.lisp index 0995a1d..9d248dd 100644 --- a/contrib/sb-posix/interface.lisp +++ b/contrib/sb-posix/interface.lisp @@ -262,21 +262,21 @@ ;; uid, gid (define-call "geteuid" uid-t never-fails) ; "always successful", it says - (define-call "getresuid" uid-t never-fails) +#-sunos (define-call "getresuid" uid-t never-fails) (define-call "getuid" uid-t never-fails) (define-call "seteuid" int minusp (uid uid-t)) - (define-call "setfsuid" int minusp (uid uid-t)) +#-sunos (define-call "setfsuid" int minusp (uid uid-t)) (define-call "setreuid" int minusp (ruid uid-t) (euid uid-t)) - (define-call "setresuid" int minusp (ruid uid-t) (euid uid-t) (suid uid-t)) +#-sunos (define-call "setresuid" int minusp (ruid uid-t) (euid uid-t) (suid uid-t)) (define-call "setuid" int minusp (uid uid-t)) (define-call "getegid" gid-t never-fails) (define-call "getgid" gid-t never-fails) - (define-call "getresgid" gid-t never-fails) +#-sunos (define-call "getresgid" gid-t never-fails) (define-call "setegid" int minusp (gid gid-t)) - (define-call "setfsgid" int minusp (gid gid-t)) +#-sunos (define-call "setfsgid" int minusp (gid gid-t)) (define-call "setgid" int minusp (gid gid-t)) (define-call "setregid" int minusp (rgid gid-t) (egid gid-t)) - (define-call "setresgid" int minusp (rgid gid-t) (egid gid-t) (sgid gid-t)) +#-sunos (define-call "setresgid" int minusp (rgid gid-t) (egid gid-t) (sgid gid-t)) ;; processes, signals (define-call "alarm" int never-fails (seconds unsigned)) diff --git a/contrib/sb-posix/posix-tests.lisp b/contrib/sb-posix/posix-tests.lisp index 78f99ba..95afdd5 100644 --- a/contrib/sb-posix/posix-tests.lisp +++ b/contrib/sb-posix/posix-tests.lisp @@ -173,7 +173,9 @@ #.sb-posix:eisdir #+win32 #.sb-posix::eacces - #-(or darwin win32) + #+sunos + #.sb-posix::einval + #-(or darwin win32 sunos) #.sb-posix::ebusy) (deftest rmdir.error.4 @@ -774,7 +776,7 @@ ;#-(or win32 sunos hpux) ;;;; mkdtemp is unimplemented on at least Solaris 10 -#-(or win32 hpux) +#-(or win32 hpux sunos) ;;; But it is implemented on OpenSolaris 2008.11 (deftest mkdtemp.1 (let ((pathname diff --git a/tests/subr.sh b/tests/subr.sh index eaa86fa..c0e67f8 100644 --- a/tests/subr.sh +++ b/tests/subr.sh @@ -32,8 +32,8 @@ SBCL_RUNTIME="$SBCL_PWD/../src/runtime/sbcl" SBCL_ARGS="--noinform --no-sysinit --no-userinit --noprint --disable-debugger" # Scripts that use these variables should quote them. -TEST_BASENAME="$(basename $0)" -TEST_FILESTEM="$(echo ${TEST_BASENAME%.sh} | sed 's/\./-/g')" +TEST_BASENAME="`basename $0`" +TEST_FILESTEM="`echo ${TEST_BASENAME%.sh} | sed 's/\./-/g'`" TEST_DIRECTORY="$SBCL_PWD/$TEST_FILESTEM-$$" # "Ten four" is the closest numerical slang I can find to "OK", so diff --git a/version.lisp-expr b/version.lisp-expr index 8b4db62..7d634e0 100644 --- a/version.lisp-expr +++ b/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".) -"1.0.41.54" +"1.0.41.55" -- 1.7.10.4