private: Yes


diff --git a/guile-scsh.scm b/guile-scsh.scm
index a96685d..5256ca1 100755
--- a/guile-scsh.scm
+++ b/guile-scsh.scm
@@ -1,5 +1,4 @@
-#!/usr/bin/guile
--L .
+#!/usr/bin/env -S guile -L .
 !#
 (use-modules (ice-9 readline))
 (use-modules (ice-9 regex))
diff --git a/scsh/newports.scm b/scsh/newports.scm
index 5ab4235..1e594a4 100644
--- a/scsh/newports.scm
+++ b/scsh/newports.scm
@@ -15,7 +15,6 @@
   :use-module (scsh syscalls)
 
   :export (fdport? set-port-buffering 
-                   bufpol/block bufpol/line bufpol/none
                    open-file ;;; open-input-file open-output-file
                    call/fdes close-after
                    with-current-input-port* with-current-output-port*
@@ -34,9 +33,6 @@
        (false-if-exception (fileno x))))
 
 (define set-port-buffering setvbuf)
-(define bufpol/block _IOFBF)
-(define bufpol/line _IOLBF)
-(define bufpol/none _IONBF)
 
 ;;(define (%fdport-set-buffering/errno port policy size)
 ;; (%fdport*-set-buffering/errno (fdport-data port) policy size))
diff --git a/scsh/sighandlers.scm b/scsh/sighandlers.scm
index 8d3d2be..976ae79 100644
--- a/scsh/sighandlers.scm
+++ b/scsh/sighandlers.scm
@@ -57,6 +57,10 @@
   "#include \"sighandlers1.h\""
   "" "")
 
+;; Since glibc 2.26, SIGUNUSED is no longer defined. Before, it had the
+;; same value as SIGSYS.
+(define SIGUNUSED (if (defined? 'SIGUNUSED) SIGUNUSED SIGSYS))
+
 ;;; Map a Unix async signal to its S48 interrupt value.
 ;;; -1 => Not defined.
 (define-foreign %signal->interrupt (sig2interrupt (integer sig))
diff --git a/scsh/syntax-helpers.scm b/scsh/syntax-helpers.scm
index 41fcee2..1a9551f 100644
--- a/scsh/syntax-helpers.scm
+++ b/scsh/syntax-helpers.scm
@@ -230,5 +230,5 @@
     ((_ stdports) (stdports->stdio))
     ((_ stdports f l ...) (f (stdports->stdio) l ...))
 
-    ((_ _) (oops))
-    ((_ _ f l ...) (f (oops) l ...))))
+    ((_ redir) ((error "unknown i/o redirection" 'redir)))
+    ((_ redir f l ...) (f (error "unknown i/o redirection" 'redir) l ...))))
diff --git a/scsh/weak.scm b/scsh/weak.scm
index 58e8488..5097661 100644
--- a/scsh/weak.scm
+++ b/scsh/weak.scm
@@ -5,6 +5,6 @@
   :export (make-weak-pointer weak-pointer-ref weak-pointer?))
 
 (define (make-weak-pointer x) (make-weak-vector 1 x))
-(define (weak-pointer-ref  x) (vector-ref x 0))
+(define (weak-pointer-ref  x) (weak-vector-ref x 0))
 (define (weak-pointer? x)
   (weak-vector? x))