use "_LOCK" prefix for Windows cross-build

Use "_LOCK" instead of ".LOCK" when the cross
platform is Windows, not just when the current
platform is Windows.

Merge to v6.3
This commit is contained in:
Matthew Flatt 2015-10-28 17:41:14 -04:00
parent 2396542cda
commit 0edd781928
2 changed files with 6 additions and 3 deletions

View File

@ -3,7 +3,8 @@
(for-label framework/preferences
racket/runtime-path
launcher/launcher
setup/dirs))
setup/dirs
setup/cross-system))
@(define file-eval (make-base-eval))
@(interaction-eval #:eval file-eval (begin (require racket/file) (define filename (make-temporary-file))))
@ -1402,7 +1403,8 @@ in the sense of @racket[port-try-file-lock?].
[name path-element?])
path?])]{
Creates a lock filename by prepending @racket["_LOCK"] on Windows or
Creates a lock filename by prepending @racket["_LOCK"] on Windows
(i.e., when @racket[cross-system-type] reports @racket['windows]) or
@racket[".LOCK"] on other platforms to the file portion of the path.
@examples[

View File

@ -1,6 +1,7 @@
#lang racket/base
(require "path.rkt"
setup/dirs
setup/cross-system
(for-syntax racket/base
setup/path-to-relative))
@ -278,7 +279,7 @@
(define (make-pathless-lock-file-name name)
(bytes->path-element
(bytes-append
(if (eq? 'windows (system-type))
(if (eq? 'windows (cross-system-type))
#"_"
#".")
#"LOCK"