diff --git a/gash/compat.scm b/gash/compat.scm index 9dd331c..05321c3 100644 --- a/gash/compat.scm +++ b/gash/compat.scm @@ -89,7 +89,14 @@ the-eof-object noop make-prompt-tag - canonicalize-path) + canonicalize-path + X_OK + program-arguments + delete-duplicates! + flush-all-ports + file-port? + input-port? + output-port?) (define-macro (define-inlinable . rest) `(define ,@rest)) @@ -127,4 +134,26 @@ (list stem)) ;; XXX: Actually implement this. - (define (canonicalize-path path) path)) + (define (canonicalize-path path) path) + + (define X_OK 1) + + (define program-arguments command-line) + + (define delete-duplicates! (@ (srfi srfi-1) delete-duplicates)) + + ;; Mes does not have port buffers. + (define flush-all-ports noop) + + ;; Mes uses raw file descriptors for file ports. + (define file-port? number?) + + ;; This is probably OK...? + (define (input-port? port) #f) + (define (output-port? port) #f) + + ;; Fix 'dup' interface. + (let ((mes/dup dup)) + (define* (guile/dup fd #:optional new) + (if new (dup2 fd new) (mes/dup fd))) + (set! dup guile/dup)))