mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-26 13:10:22 +02:00
Fix 'absolute-file-name?' and others for cross-build to MinGW.
* module/ice-9/boot-9.scm (compile-time-file-name-convention): New procedure, defined only when loading. (compile-time-case): Use it to correctly determine system file name convention while compiling.
This commit is contained in:
parent
f4b976aab9
commit
96597fa21d
1 changed files with 13 additions and 1 deletions
|
@ -2060,6 +2060,16 @@ non-locally, that exit determines the continuation."
|
||||||
;;; {Load Paths}
|
;;; {Load Paths}
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
|
(eval-when (eval)
|
||||||
|
(define (compile-time-file-name-convention)
|
||||||
|
(let ((target ((@ (system base target) target-type))))
|
||||||
|
(cond ((equal? target %host-type)
|
||||||
|
(system-file-name-convention))
|
||||||
|
((string-contains-ci target "mingw")
|
||||||
|
'windows)
|
||||||
|
(else
|
||||||
|
'posix)))))
|
||||||
|
|
||||||
(let-syntax ((compile-time-case
|
(let-syntax ((compile-time-case
|
||||||
(lambda (stx)
|
(lambda (stx)
|
||||||
(syntax-case stx ()
|
(syntax-case stx ()
|
||||||
|
@ -2077,7 +2087,9 @@ non-locally, that exit determines the continuation."
|
||||||
#'(begin form ...)
|
#'(begin form ...)
|
||||||
(next-clause #'(clauses ...))))))))))))
|
(next-clause #'(clauses ...))))))))))))
|
||||||
;; emacs: (put 'compile-time-case 'scheme-indent-function 1)
|
;; emacs: (put 'compile-time-case 'scheme-indent-function 1)
|
||||||
(compile-time-case (system-file-name-convention)
|
(compile-time-case (or (and (defined? 'compile-time-file-name-convention)
|
||||||
|
(compile-time-file-name-convention))
|
||||||
|
'posix)
|
||||||
((posix)
|
((posix)
|
||||||
(define (file-name-separator? c)
|
(define (file-name-separator? c)
|
||||||
(char=? c #\/))
|
(char=? c #\/))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue