Fix Windows bootstrap
parent
7b62d19924
commit
cf39fd29f8
|
@ -1,9 +1,9 @@
|
||||||
USING: alien alien.c-types arrays assocs combinators
|
USING: alien alien.c-types arrays assocs combinators
|
||||||
continuations destructors io io.backend io.ports io.timeouts
|
continuations destructors io io.backend io.ports io.timeouts
|
||||||
io.backend.windows io.files.windows io.files io.buffers io.streams.c
|
io.backend.windows io.files.windows io.files.windows.nt io.files
|
||||||
libc kernel math namespaces sequences threads windows
|
io.pathnames io.buffers io.streams.c libc kernel math namespaces
|
||||||
windows.errors windows.kernel32 strings splitting qualified
|
sequences threads windows windows.errors windows.kernel32
|
||||||
ascii system accessors locals ;
|
strings splitting qualified ascii system accessors locals ;
|
||||||
QUALIFIED: windows.winsock
|
QUALIFIED: windows.winsock
|
||||||
IN: io.backend.windows.nt
|
IN: io.backend.windows.nt
|
||||||
|
|
||||||
|
|
|
@ -83,4 +83,5 @@ M: object copy-file
|
||||||
|
|
||||||
{
|
{
|
||||||
{ [ os unix? ] [ "io.directories.unix" require ] }
|
{ [ os unix? ] [ "io.directories.unix" require ] }
|
||||||
|
{ [ os windows? ] [ "io.directories.windows" require ] }
|
||||||
} cond
|
} cond
|
|
@ -1,7 +1,19 @@
|
||||||
! Copyright (C) 2008 Doug Coleman.
|
! Copyright (C) 2008 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
USING: system io.directories io.encodings.utf16n alien.strings
|
||||||
|
io.pathnames io.backend io.files.windows destructors
|
||||||
|
kernel accessors calendar windows windows.errors
|
||||||
|
windows.kernel32 alien.c-types sequences splitting
|
||||||
|
fry continuations ;
|
||||||
IN: io.directories.windows
|
IN: io.directories.windows
|
||||||
|
|
||||||
|
M: windows touch-file ( path -- )
|
||||||
|
[
|
||||||
|
normalize-path
|
||||||
|
maybe-create-file [ &dispose ] dip
|
||||||
|
[ drop ] [ handle>> f now dup (set-file-times) ] if
|
||||||
|
] with-destructors ;
|
||||||
|
|
||||||
M: windows move-file ( from to -- )
|
M: windows move-file ( from to -- )
|
||||||
[ normalize-path ] bi@ MoveFile win32-error=0/f ;
|
[ normalize-path ] bi@ MoveFile win32-error=0/f ;
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,3 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
IN: io.files.info.windows.nt
|
IN: io.files.info.windows.nt
|
||||||
|
|
||||||
ERROR: not-absolute-path ;
|
|
||||||
|
|
||||||
M: winnt root-directory ( string -- string' )
|
|
||||||
unicode-prefix ?head drop
|
|
||||||
dup {
|
|
||||||
[ length 2 >= ]
|
|
||||||
[ second CHAR: : = ]
|
|
||||||
[ first Letter? ]
|
|
||||||
} 1&& [ 2 head "\\" append ] [ not-absolute-path ] if ;
|
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
! Copyright (C) 2008 Doug Coleman.
|
! Copyright (C) 2008 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
USING: byte-arrays math io.backend io.files.info
|
||||||
|
io.files.windows io.files.windows.nt kernel windows.kernel32
|
||||||
|
windows.time windows accessors alien.c-types combinators
|
||||||
|
generalizations system alien.strings io.encodings.utf16n
|
||||||
|
sequences splitting windows.errors fry continuations destructors
|
||||||
|
calendar ascii combinators.short-circuit ;
|
||||||
IN: io.files.info.windows
|
IN: io.files.info.windows
|
||||||
|
|
||||||
TUPLE: windows-file-info < file-info attributes ;
|
TUPLE: windows-file-info < file-info attributes ;
|
||||||
|
@ -72,10 +78,10 @@ TUPLE: windows-file-info < file-info attributes ;
|
||||||
get-file-information BY_HANDLE_FILE_INFORMATION>file-info
|
get-file-information BY_HANDLE_FILE_INFORMATION>file-info
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
M: winnt file-info ( path -- info )
|
M: windows file-info ( path -- info )
|
||||||
normalize-path get-file-information-stat ;
|
normalize-path get-file-information-stat ;
|
||||||
|
|
||||||
M: winnt link-info ( path -- info )
|
M: windows link-info ( path -- info )
|
||||||
file-info ;
|
file-info ;
|
||||||
|
|
||||||
: volume-information ( normalized-path -- volume-name volume-serial max-component flags type )
|
: volume-information ( normalized-path -- volume-name volume-serial max-component flags type )
|
||||||
|
@ -103,7 +109,15 @@ M: winnt link-info ( path -- info )
|
||||||
|
|
||||||
TUPLE: win32-file-system-info < file-system-info max-component flags device-serial ;
|
TUPLE: win32-file-system-info < file-system-info max-component flags device-serial ;
|
||||||
|
|
||||||
HOOK: root-directory os ( string -- string' )
|
ERROR: not-absolute-path ;
|
||||||
|
|
||||||
|
: root-directory ( string -- string' )
|
||||||
|
unicode-prefix ?head drop
|
||||||
|
dup {
|
||||||
|
[ length 2 >= ]
|
||||||
|
[ second CHAR: : = ]
|
||||||
|
[ first Letter? ]
|
||||||
|
} 1&& [ 2 head "\\" append ] [ not-absolute-path ] if ;
|
||||||
|
|
||||||
M: winnt file-system-info ( path -- file-system-info )
|
M: winnt file-system-info ( path -- file-system-info )
|
||||||
normalize-path root-directory
|
normalize-path root-directory
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
USING: continuations destructors io.buffers io.files io.backend
|
USING: continuations destructors io.buffers io.files io.backend
|
||||||
io.timeouts io.ports io.files.private io.backend.windows
|
io.timeouts io.ports io.pathnames io.files.private io.backend.windows
|
||||||
io.files.windows io.backend.windows.nt io.encodings.utf16n
|
io.files.windows io.backend.windows.nt io.encodings.utf16n
|
||||||
windows windows.kernel32 kernel libc math threads system
|
windows windows.kernel32 kernel libc math threads system
|
||||||
environment alien.c-types alien.arrays alien.strings sequences
|
environment alien.c-types alien.arrays alien.strings sequences
|
||||||
|
@ -48,7 +48,7 @@ M: winnt FileArgs-overlapped ( port -- overlapped )
|
||||||
make-overlapped ;
|
make-overlapped ;
|
||||||
|
|
||||||
M: winnt open-append
|
M: winnt open-append
|
||||||
[ dup file-info size>> ] [ drop 0 ] recover
|
0 ! [ dup file-info size>> ] [ drop 0 ] recover
|
||||||
[ (open-append) ] dip >>ptr ;
|
[ (open-append) ] dip >>ptr ;
|
||||||
|
|
||||||
M: winnt home "USERPROFILE" os-env ;
|
M: winnt home "USERPROFILE" os-env ;
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
! Copyright (C) 2008 Doug Coleman.
|
! Copyright (C) 2008 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: alien.c-types io.binary io.backend io.files io.buffers
|
USING: alien.c-types io.binary io.backend io.files
|
||||||
io.encodings.utf16n io.ports io.backend.windows kernel math splitting
|
io.files.types io.buffers io.encodings.utf16n io.ports
|
||||||
fry alien.strings windows windows.kernel32 windows.time calendar
|
io.backend.windows kernel math splitting fry alien.strings
|
||||||
combinators math.functions sequences namespaces make words
|
windows windows.kernel32 windows.time calendar combinators
|
||||||
symbols system destructors accessors math.bitwise continuations
|
math.functions sequences namespaces make words symbols system
|
||||||
windows.errors arrays byte-arrays generalizations ;
|
destructors accessors math.bitwise continuations windows.errors
|
||||||
|
arrays byte-arrays generalizations ;
|
||||||
IN: io.files.windows
|
IN: io.files.windows
|
||||||
|
|
||||||
: open-file ( path access-mode create-mode flags -- handle )
|
: open-file ( path access-mode create-mode flags -- handle )
|
||||||
|
@ -130,10 +131,3 @@ SYMBOLS: +read-only+ +hidden+ +system+
|
||||||
: (set-file-times) ( handle timestamp/f timestamp/f timestamp/f -- )
|
: (set-file-times) ( handle timestamp/f timestamp/f timestamp/f -- )
|
||||||
[ timestamp>FILETIME ] tri@
|
[ timestamp>FILETIME ] tri@
|
||||||
SetFileTime win32-error=0/f ;
|
SetFileTime win32-error=0/f ;
|
||||||
|
|
||||||
M: winnt touch-file ( path -- )
|
|
||||||
[
|
|
||||||
normalize-path
|
|
||||||
maybe-create-file [ &dispose ] dip
|
|
||||||
[ drop ] [ handle>> f now dup (set-file-times) ] if
|
|
||||||
] with-destructors ;
|
|
||||||
|
|
|
@ -262,7 +262,6 @@ M: object run-pipeline-element
|
||||||
|
|
||||||
{
|
{
|
||||||
{ [ os unix? ] [ "io.launcher.unix" require ] }
|
{ [ os unix? ] [ "io.launcher.unix" require ] }
|
||||||
{ [ os winnt? ] [ "io.backend.windows.nt.launcher" require ] }
|
{ [ os winnt? ] [ "io.launcher.windows.nt" require ] }
|
||||||
{ [ os wince? ] [ "io.launcher.windows" require ] }
|
|
||||||
[ ]
|
[ ]
|
||||||
} cond
|
} cond
|
||||||
|
|
|
@ -6,7 +6,7 @@ windows.kernel32 windows namespaces make io.launcher kernel
|
||||||
sequences windows.errors assocs splitting system strings
|
sequences windows.errors assocs splitting system strings
|
||||||
io.launcher.windows io.files.windows io.backend io.files
|
io.launcher.windows io.files.windows io.backend io.files
|
||||||
io.files.private combinators shuffle accessors locals ;
|
io.files.private combinators shuffle accessors locals ;
|
||||||
IN: io.backend.windows.nt.launcher
|
IN: io.launcher.windows.nt
|
||||||
|
|
||||||
: duplicate-handle ( handle -- handle' )
|
: duplicate-handle ( handle -- handle' )
|
||||||
GetCurrentProcess ! source process
|
GetCurrentProcess ! source process
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2007, 2008 Doug Coleman, Slava Pestov.
|
! Copyright (C) 2007, 2008 Doug Coleman, Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: alien alien.c-types arrays continuations io
|
USING: alien alien.c-types arrays continuations io
|
||||||
io.backend.windows io.pipes.windows.nt libc io.ports
|
io.backend.windows io.pipes.windows.nt io.pathnames libc io.ports
|
||||||
windows.types math windows.kernel32
|
windows.types math windows.kernel32
|
||||||
namespaces make io.launcher kernel sequences windows.errors
|
namespaces make io.launcher kernel sequences windows.errors
|
||||||
splitting system threads init strings combinators
|
splitting system threads init strings combinators
|
||||||
|
|
|
@ -6,7 +6,8 @@ hashtables sorting arrays combinators math.bitwise strings
|
||||||
system accessors threads splitting io.backend io.backend.windows
|
system accessors threads splitting io.backend io.backend.windows
|
||||||
io.backend.windows.nt io.files.windows.nt io.monitors io.ports
|
io.backend.windows.nt io.files.windows.nt io.monitors io.ports
|
||||||
io.buffers io.files io.timeouts io.encodings.string
|
io.buffers io.files io.timeouts io.encodings.string
|
||||||
io.encodings.utf16n io windows windows.kernel32 windows.types ;
|
io.encodings.utf16n io windows windows.kernel32 windows.types
|
||||||
|
io.pathnames ;
|
||||||
IN: io.monitors.windows.nt
|
IN: io.monitors.windows.nt
|
||||||
|
|
||||||
: open-directory ( path -- handle )
|
: open-directory ( path -- handle )
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
! Copyright (C) 2007, 2008 Slava Pestov.
|
! Copyright (C) 2007, 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: io io.files kernel namespaces sequences system
|
USING: io io.files io.directories kernel namespaces sequences system
|
||||||
tools.deploy.backend tools.deploy.config
|
tools.deploy.backend tools.deploy.config
|
||||||
tools.deploy.config.editor assocs hashtables prettyprint
|
tools.deploy.config.editor assocs hashtables prettyprint
|
||||||
combinators windows.shell32 windows.user32 ;
|
combinators windows.shell32 windows.user32 ;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
! Copyright (C) 2008 Slava Pestov, Jorge Acereda Macia.
|
! Copyright (C) 2008 Slava Pestov, Jorge Acereda Macia.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: io.files io words alien kernel math.parser alien.syntax
|
USING: io.files io.files.temp io words alien kernel math.parser
|
||||||
io.launcher system assocs arrays sequences namespaces make
|
alien.syntax io.launcher system assocs arrays sequences
|
||||||
qualified system math io.encodings.ascii accessors
|
namespaces make qualified system math io.encodings.ascii
|
||||||
tools.disassembler ;
|
accessors tools.disassembler ;
|
||||||
IN: tools.disassembler.gdb
|
IN: tools.disassembler.gdb
|
||||||
|
|
||||||
SINGLETON: gdb-disassembler
|
SINGLETON: gdb-disassembler
|
||||||
|
|
Loading…
Reference in New Issue