fix mistakes related to -X and `make install'
Merge to 5.0.1
This commit is contained in:
parent
b1efcd1fc2
commit
7cbe584fbc
|
@ -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)
|
||||||
|
|
|
@ -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;
|
||||||
wd = CURRENT_WD();
|
if (scheme_current_thread) {
|
||||||
wrt = SCHEME_PATH_VAL(wd);
|
wd = CURRENT_WD();
|
||||||
wlen = SCHEME_PATH_LEN(wd);
|
wrt = SCHEME_PATH_VAL(wd);
|
||||||
scheme_security_check_file("path->complete-path", NULL, SCHEME_GUARD_FILE_EXISTS);
|
wlen = SCHEME_PATH_LEN(wd);
|
||||||
|
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) {
|
||||||
|
@ -3614,7 +3620,7 @@ static char *do_path_to_complete_path(char *filename, long ilen, const char *wrt
|
||||||
}
|
}
|
||||||
memcpy(naya + wlen, filename, ilen);
|
memcpy(naya + wlen, filename, ilen);
|
||||||
naya[wlen + ilen] = 0;
|
naya[wlen + ilen] = 0;
|
||||||
|
|
||||||
return naya;
|
return naya;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user