fix mistakes related to -X and `make install'

Merge to 5.0.1
This commit is contained in:
Matthew Flatt 2010-07-20 07:27:17 -06:00
parent b1efcd1fc2
commit 7cbe584fbc
2 changed files with 19 additions and 6 deletions

View File

@ -3,6 +3,7 @@
(require racket/future (require racket/future
racket/list racket/list
racket/match racket/match
racket/path
setup/collects setup/collects
unstable/generics) unstable/generics)
@ -21,6 +22,12 @@
(define executable (parameterize ([current-directory (find-system-path 'orig-dir)]) (define executable (parameterize ([current-directory (find-system-path 'orig-dir)])
(find-executable-path (find-system-path 'exec-file) #f))) (find-executable-path (find-system-path 'exec-file) #f)))
(define collects-dir (let ([p (find-system-path 'collects-dir)])
(if (complete-path? p)
p
(path->complete-path p (or (path-only executable)
(find-system-path 'orig-dir))))))
(define (send/msg x ch) (define (send/msg x ch)
(write x ch) (write x ch)
(flush-output ch)) (flush-output ch))
@ -28,7 +35,7 @@
(let-values ([(s o in e) (subprocess #f #f (current-error-port) (let-values ([(s o in e) (subprocess #f #f (current-error-port)
executable executable
"-X" "-X"
(path->string (find-system-path 'collects-dir)) (path->string collects-dir)
"-l" "-l"
process-worker-library)]) process-worker-library)])
(send/msg i in) (send/msg i in)

View File

@ -3570,10 +3570,16 @@ static char *do_path_to_complete_path(char *filename, long ilen, const char *wrt
if (!wrt) { if (!wrt) {
Scheme_Object *wd; Scheme_Object *wd;
if (scheme_current_thread) {
wd = CURRENT_WD(); wd = CURRENT_WD();
wrt = SCHEME_PATH_VAL(wd); wrt = SCHEME_PATH_VAL(wd);
wlen = SCHEME_PATH_LEN(wd); wlen = SCHEME_PATH_LEN(wd);
scheme_security_check_file("path->complete-path", NULL, SCHEME_GUARD_FILE_EXISTS); scheme_security_check_file("path->complete-path", NULL, SCHEME_GUARD_FILE_EXISTS);
} else {
int actlen;
wrt = scheme_os_getcwd(NULL, 0, &actlen, 1);
wlen = actlen - 1;
}
} }
if (kind == SCHEME_WINDOWS_PATH_KIND) { if (kind == SCHEME_WINDOWS_PATH_KIND) {