original commit: 174863d28b9cd14141603df73aee0334ffd7c2b0
This commit is contained in:
John Clements 2001-10-30 05:46:44 +00:00
parent d3e4d22472
commit 9e9b309c56
3 changed files with 16 additions and 14 deletions

View File

@ -13,7 +13,7 @@
(define (shell-path/args who argstr)
(case (system-type)
((unix) (append '("/bin/sh" "-c") (list argstr)))
((unix macosx) (append '("/bin/sh" "-c") (list argstr)))
((windows) (let ([cmd
(let ([d (find-system-path 'sys-dir)])
(let ([cmd (build-path d "cmd.exe")])

View File

@ -285,17 +285,18 @@
(define (dns-find-nameserver)
(case (system-type)
[(unix) (with-handlers ([void (lambda (x) #f)])
(with-input-from-file "/etc/resolv.conf"
(lambda ()
(let loop ()
(let ([l (read-line)])
(or (and (string? l)
(let ([m (regexp-match
(format "nameserver[ ~a]+([0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)" #\tab)
l)])
(and m (cadr m))))
(and (not (eof-object? l))
(loop))))))))]
[(unix macosx)
(with-handlers ([void (lambda (x) #f)])
(with-input-from-file "/etc/resolv.conf"
(lambda ()
(let loop ()
(let ([l (read-line)])
(or (and (string? l)
(let ([m (regexp-match
(format "nameserver[ ~a]+([0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)" #\tab)
l)])
(and m (cadr m))))
(and (not (eof-object? l))
(loop))))))))]
[else #f])))))

View File

@ -14,4 +14,5 @@
call/input-url ;; url x (url -> in-port) x
;; (in-port -> T)
;; [x list (str)] -> T
combine-url/relative))) ;; url x str -> url
combine-url/relative ;; url x str -> url
url-exception?))) ;; T -> boolean