Remove Windows CE from core/ basis/ and build-support/
Rename the winnt singleton to windows in core/ basis/ extra/ Rename boot images winnt -> windows Fixes #84.db4
parent
e422187be1
commit
bf2a96e9e0
|
@ -95,8 +95,8 @@ help:
|
|||
@echo "macosx-ppc"
|
||||
@echo "solaris-x86-32"
|
||||
@echo "solaris-x86-64"
|
||||
@echo "winnt-x86-32"
|
||||
@echo "winnt-x86-64"
|
||||
@echo "windows-x86-32"
|
||||
@echo "windows-x86-64"
|
||||
@echo ""
|
||||
@echo "Additional modifiers:"
|
||||
@echo ""
|
||||
|
@ -155,11 +155,11 @@ solaris-x86-32:
|
|||
solaris-x86-64:
|
||||
$(MAKE) $(ALL) CONFIG=vm/Config.solaris.x86.64
|
||||
|
||||
winnt-x86-32:
|
||||
windows-x86-32:
|
||||
$(MAKE) $(ALL) CONFIG=vm/Config.windows.x86.32
|
||||
$(MAKE) factor-console CONFIG=vm/Config.windows.x86.32
|
||||
|
||||
winnt-x86-64:
|
||||
windows-x86-64:
|
||||
$(MAKE) $(ALL) CONFIG=vm/Config.windows.x86.64
|
||||
$(MAKE) factor-console CONFIG=vm/Config.windows.x86.64
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ LIBRARY: atk
|
|||
|
||||
<<
|
||||
"atk" {
|
||||
{ [ os winnt? ] [ "libatk-1.0-0.dll" cdecl add-library ] }
|
||||
{ [ os windows? ] [ "libatk-1.0-0.dll" cdecl add-library ] }
|
||||
{ [ os unix? ] [ drop ] }
|
||||
} cond
|
||||
>>
|
||||
|
|
|
@ -16,5 +16,5 @@ ABOUT: "bootstrap.image"
|
|||
HELP: make-image
|
||||
{ $values { "arch" string } }
|
||||
{ $description "Creates a bootstrap image from sources, where " { $snippet "architecture" } " is one of the following:"
|
||||
{ $code "x86.32" "unix-x86.64" "winnt-x86.64" "macosx-ppc" "linux-ppc" }
|
||||
{ $code "x86.32" "unix-x86.64" "windows-x86.64" "macosx-ppc" "linux-ppc" }
|
||||
"The new image file is written to the " { $link resource-path } " and is named " { $snippet "boot." { $emphasis "architecture" } ".image" } "." } ;
|
||||
|
|
|
@ -15,7 +15,7 @@ generalizations parser.notes ;
|
|||
IN: bootstrap.image
|
||||
|
||||
: arch ( os cpu -- arch )
|
||||
2dup [ winnt? ] [ ppc? ] bi* or [
|
||||
2dup [ windows? ] [ ppc? ] bi* or [
|
||||
[ drop unix ] dip
|
||||
] unless
|
||||
[ name>> ] [ name>> ] bi* "-" glue ;
|
||||
|
@ -31,9 +31,9 @@ IN: bootstrap.image
|
|||
|
||||
: images ( -- seq )
|
||||
{
|
||||
"winnt-x86.32" "unix-x86.32"
|
||||
"windows-x86.32" "unix-x86.32"
|
||||
"linux-ppc.32" "linux-ppc.64"
|
||||
"winnt-x86.64" "unix-x86.64"
|
||||
"windows-x86.64" "unix-x86.64"
|
||||
} ;
|
||||
|
||||
<PRIVATE
|
||||
|
|
|
@ -9,7 +9,7 @@ IN: cairo.ffi
|
|||
! Adapted from cairo.h, version 1.8.10
|
||||
|
||||
<< {
|
||||
{ [ os winnt? ] [ "cairo" "libcairo-2.dll" cdecl add-library ] }
|
||||
{ [ os windows? ] [ "cairo" "libcairo-2.dll" cdecl add-library ] }
|
||||
{ [ os macosx? ] [ "cairo" "/opt/local/lib/libcairo.dylib" cdecl add-library ] }
|
||||
{ [ os unix? ] [ ] }
|
||||
} cond >>
|
||||
|
|
|
@ -23,7 +23,7 @@ IN: compiler.tests.alien
|
|||
: libfactor-ffi-tests-path ( -- string )
|
||||
"resource:" absolute-path
|
||||
{
|
||||
{ [ os winnt? ] [ "libfactor-ffi-test.dll" ] }
|
||||
{ [ os windows? ] [ "libfactor-ffi-test.dll" ] }
|
||||
{ [ os macosx? ] [ "libfactor-ffi-test.dylib" ] }
|
||||
{ [ os unix? ] [ "libfactor-ffi-test.so" ] }
|
||||
} cond append-path ;
|
||||
|
|
|
@ -5,7 +5,7 @@ alien.libraries ;
|
|||
IN: compression.zlib.ffi
|
||||
|
||||
<< "zlib" {
|
||||
{ [ os winnt? ] [ "zlib1.dll" ] }
|
||||
{ [ os windows? ] [ "zlib1.dll" ] }
|
||||
{ [ os macosx? ] [ "libz.dylib" ] }
|
||||
{ [ os unix? ] [ "libz.so" ] }
|
||||
} cond cdecl add-library >>
|
||||
|
|
|
@ -8,7 +8,7 @@ IN: bootstrap.x86
|
|||
: tib-segment ( -- ) FS ;
|
||||
: tib-temp ( -- reg ) EAX ;
|
||||
|
||||
<< "vocab:cpu/x86/winnt/bootstrap.factor" parse-file suffix! >> call
|
||||
<< "vocab:cpu/x86/windows/bootstrap.factor" parse-file suffix! >> call
|
||||
|
||||
: jit-install-seh ( -- )
|
||||
! Create a new exception record and store it in the TIB.
|
|
@ -143,7 +143,7 @@ USE: vocabs.loader
|
|||
|
||||
{
|
||||
{ [ os unix? ] [ "cpu.x86.64.unix" require ] }
|
||||
{ [ os winnt? ] [ "cpu.x86.64.winnt" require ] }
|
||||
{ [ os windows? ] [ "cpu.x86.64.windows" require ] }
|
||||
} cond
|
||||
|
||||
check-sse
|
||||
|
|
|
@ -20,6 +20,6 @@ DEFER: stack-reg
|
|||
: jit-install-seh ( -- ) stack-reg bootstrap-cell ADD ;
|
||||
: jit-update-seh ( ctx-reg -- ) drop ;
|
||||
|
||||
<< "vocab:cpu/x86/winnt/bootstrap.factor" parse-file suffix! >> call
|
||||
<< "vocab:cpu/x86/windows/bootstrap.factor" parse-file suffix! >> call
|
||||
<< "vocab:cpu/x86/64/bootstrap.factor" parse-file suffix! >> call
|
||||
<< "vocab:cpu/x86/bootstrap.factor" parse-file suffix! >> call
|
|
@ -3,7 +3,7 @@
|
|||
USING: kernel layouts system math alien.c-types sequences
|
||||
compiler.cfg.registers cpu.architecture cpu.x86.assembler
|
||||
cpu.x86 cpu.x86.64 cpu.x86.assembler.operands ;
|
||||
IN: cpu.x86.64.winnt
|
||||
IN: cpu.x86.64.windows
|
||||
|
||||
M: x86.64 param-regs
|
||||
drop {
|
|
@ -6,7 +6,7 @@ alien.libraries ;
|
|||
IN: db.postgresql.ffi
|
||||
|
||||
<< "postgresql" {
|
||||
{ [ os winnt? ] [ "libpq.dll" ] }
|
||||
{ [ os windows? ] [ "libpq.dll" ] }
|
||||
{ [ os macosx? ] [ "libpq.dylib" ] }
|
||||
{ [ os unix? ] [ "libpq.so" ] }
|
||||
} cond cdecl add-library >>
|
||||
|
|
|
@ -7,7 +7,7 @@ system combinators alien.c-types alien.libraries ;
|
|||
IN: db.sqlite.ffi
|
||||
|
||||
<< "sqlite" {
|
||||
{ [ os winnt? ] [ "sqlite3.dll" ] }
|
||||
{ [ os windows? ] [ "sqlite3.dll" ] }
|
||||
{ [ os macosx? ] [ "/usr/lib/libsqlite3.dylib" ] }
|
||||
{ [ os unix? ] [ "libsqlite3.so" ] }
|
||||
} cond cdecl add-library >>
|
||||
|
|
|
@ -62,7 +62,6 @@ HELP: unset-os-env
|
|||
|
||||
ARTICLE: "environment" "Environment variables"
|
||||
"The " { $vocab-link "environment" } " vocabulary interfaces to the platform-dependent mechanism for setting environment variables." $nl
|
||||
"Windows CE has no concept of environment variables, so these words are undefined on that platform." $nl
|
||||
"Reading environment variables:"
|
||||
{ $subsections
|
||||
os-env
|
||||
|
|
|
@ -4,26 +4,24 @@ USING: kernel namespaces prettyprint system tools.test
|
|||
environment strings sequences ;
|
||||
IN: environment.tests
|
||||
|
||||
os wince? [
|
||||
[ ] [ os-envs . ] unit-test
|
||||
[ ] [ os-envs . ] unit-test
|
||||
|
||||
os unix? [
|
||||
[ ] [ os-envs "envs" set ] unit-test
|
||||
[ ] [ { { "A" "B" } } set-os-envs ] unit-test
|
||||
[ "B" ] [ "A" os-env ] unit-test
|
||||
[ ] [ "envs" get set-os-envs ] unit-test
|
||||
[ t ] [ os-envs "envs" get = ] unit-test
|
||||
] when
|
||||
os unix? [
|
||||
[ ] [ os-envs "envs" set ] unit-test
|
||||
[ ] [ { { "A" "B" } } set-os-envs ] unit-test
|
||||
[ "B" ] [ "A" os-env ] unit-test
|
||||
[ ] [ "envs" get set-os-envs ] unit-test
|
||||
[ t ] [ os-envs "envs" get = ] unit-test
|
||||
] when
|
||||
|
||||
[ ] [ "factor-test-key-1" unset-os-env ] unit-test
|
||||
[ ] [ "ps3" "factor-test-key-1" set-os-env ] unit-test
|
||||
[ "ps3" ] [ "factor-test-key-1" os-env ] unit-test
|
||||
[ ] [ "factor-test-key-1" unset-os-env ] unit-test
|
||||
[ f ] [ "factor-test-key-1" os-env ] unit-test
|
||||
[ ] [ "factor-test-key-1" unset-os-env ] unit-test
|
||||
[ ] [ "ps3" "factor-test-key-1" set-os-env ] unit-test
|
||||
[ "ps3" ] [ "factor-test-key-1" os-env ] unit-test
|
||||
[ ] [ "factor-test-key-1" unset-os-env ] unit-test
|
||||
[ f ] [ "factor-test-key-1" os-env ] unit-test
|
||||
|
||||
[ ] [
|
||||
32766 CHAR: a <string> "factor-test-key-long" set-os-env
|
||||
] unit-test
|
||||
[ 32766 ] [ "factor-test-key-long" os-env length ] unit-test
|
||||
[ ] [ "factor-test-key-long" unset-os-env ] unit-test
|
||||
] unless
|
||||
[ ] [
|
||||
32766 CHAR: a <string> "factor-test-key-long" set-os-env
|
||||
] unit-test
|
||||
[ 32766 ] [ "factor-test-key-long" os-env length ] unit-test
|
||||
[ ] [ "factor-test-key-long" unset-os-env ] unit-test
|
||||
|
|
|
@ -22,8 +22,7 @@ HOOK: (set-os-envs) os ( seq -- )
|
|||
|
||||
{
|
||||
{ [ os unix? ] [ "environment.unix" require ] }
|
||||
{ [ os winnt? ] [ "environment.winnt" require ] }
|
||||
{ [ os wince? ] [ ] }
|
||||
{ [ os windows? ] [ "environment.windows" require ] }
|
||||
} cond
|
||||
|
||||
[
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
windows
|
|
@ -5,9 +5,9 @@ splitting windows windows.kernel32 windows.types system
|
|||
environment alien.data sequences windows.errors
|
||||
io.streams.memory io.encodings io specialized-arrays ;
|
||||
SPECIALIZED-ARRAY: TCHAR
|
||||
IN: environment.winnt
|
||||
IN: environment.windows
|
||||
|
||||
M: winnt os-env ( key -- value )
|
||||
M: windows os-env ( key -- value )
|
||||
MAX_UNICODE_PATH TCHAR <c-array>
|
||||
[ dup length GetEnvironmentVariable ] keep over 0 = [
|
||||
2drop f
|
||||
|
@ -15,16 +15,16 @@ M: winnt os-env ( key -- value )
|
|||
nip utf16n alien>string
|
||||
] if ;
|
||||
|
||||
M: winnt set-os-env ( value key -- )
|
||||
M: windows set-os-env ( value key -- )
|
||||
swap SetEnvironmentVariable win32-error=0/f ;
|
||||
|
||||
M: winnt unset-os-env ( key -- )
|
||||
M: windows unset-os-env ( key -- )
|
||||
f SetEnvironmentVariable 0 = [
|
||||
GetLastError ERROR_ENVVAR_NOT_FOUND =
|
||||
[ win32-error ] unless
|
||||
] when ;
|
||||
|
||||
M: winnt (os-envs) ( -- seq )
|
||||
M: windows (os-envs) ( -- seq )
|
||||
GetEnvironmentStrings [
|
||||
<memory-stream> [
|
||||
utf16n decode-input
|
|
@ -1 +0,0 @@
|
|||
winnt
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -15,7 +15,7 @@ LIBRARY: gdk
|
|||
|
||||
<<
|
||||
"gdk" {
|
||||
{ [ os winnt? ] [ "libgdk-win32-2.0-0.dll" cdecl add-library ] }
|
||||
{ [ os windows? ] [ "libgdk-win32-2.0-0.dll" cdecl add-library ] }
|
||||
{ [ os unix? ] [ drop ] }
|
||||
} cond
|
||||
>>
|
||||
|
|
|
@ -14,7 +14,7 @@ LIBRARY: gdk.pixbuf
|
|||
|
||||
<<
|
||||
"gdk.pixbuf" {
|
||||
{ [ os winnt? ] [ "libgdk_pixbuf-2.0-0.dll" cdecl add-library ] }
|
||||
{ [ os windows? ] [ "libgdk_pixbuf-2.0-0.dll" cdecl add-library ] }
|
||||
{ [ os unix? ] [ drop ] }
|
||||
} cond
|
||||
>>
|
||||
|
|
|
@ -12,7 +12,7 @@ LIBRARY: gio
|
|||
|
||||
<<
|
||||
"gio" {
|
||||
{ [ os winnt? ] [ "libgio-2.0-0.dll" cdecl add-library ] }
|
||||
{ [ os windows? ] [ "libgio-2.0-0.dll" cdecl add-library ] }
|
||||
{ [ os unix? ] [ drop ] }
|
||||
} cond
|
||||
>>
|
||||
|
|
|
@ -10,7 +10,7 @@ LIBRARY: glib
|
|||
|
||||
<<
|
||||
"glib" {
|
||||
{ [ os winnt? ] [ "libglib-2.0-0.dll" cdecl add-library ] }
|
||||
{ [ os windows? ] [ "libglib-2.0-0.dll" cdecl add-library ] }
|
||||
{ [ os macosx? ] [ "/opt/local/lib/libglib-2.0.0.dylib" cdecl add-library ] }
|
||||
{ [ os unix? ] [ drop ] }
|
||||
} cond
|
||||
|
|
|
@ -12,7 +12,7 @@ LIBRARY: gmodule
|
|||
|
||||
<<
|
||||
"gmodule" {
|
||||
{ [ os winnt? ] [ "libgmodule-2.0-0.dll" cdecl add-library ] }
|
||||
{ [ os windows? ] [ "libgmodule-2.0-0.dll" cdecl add-library ] }
|
||||
{ [ os macosx? ] [ drop ] }
|
||||
{ [ os unix? ] [ "libgmodule-2.0.so" cdecl add-library ] }
|
||||
} cond
|
||||
|
|
|
@ -15,7 +15,7 @@ LIBRARY: gobject
|
|||
|
||||
<<
|
||||
"gobject" {
|
||||
{ [ os winnt? ] [ "libobject-2.0-0.dll" cdecl add-library ] }
|
||||
{ [ os windows? ] [ "libobject-2.0-0.dll" cdecl add-library ] }
|
||||
{ [ os unix? ] [ drop ] }
|
||||
} cond
|
||||
>>
|
||||
|
|
|
@ -15,7 +15,7 @@ LIBRARY: gtk
|
|||
|
||||
<<
|
||||
"gtk" {
|
||||
{ [ os winnt? ] [ "libgtk-win32-2.0-0.dll" cdecl add-library ] }
|
||||
{ [ os windows? ] [ "libgtk-win32-2.0-0.dll" cdecl add-library ] }
|
||||
{ [ os unix? ] [ drop ] }
|
||||
} cond
|
||||
>>
|
||||
|
|
|
@ -13,7 +13,7 @@ LIBRARY: gtk.gl
|
|||
|
||||
<<
|
||||
"gtk.gl" {
|
||||
{ [ os winnt? ] [ drop ] }
|
||||
{ [ os windows? ] [ drop ] }
|
||||
{ [ os macosx? ] [ drop ] }
|
||||
{ [ os unix? ] [ "libgtkglext-x11-1.0.so" cdecl add-library ] }
|
||||
} cond
|
||||
|
|
|
@ -5,4 +5,4 @@ IN: io.backend.windows
|
|||
|
||||
"io.files.windows" require
|
||||
|
||||
winnt set-io-backend
|
||||
windows set-io-backend
|
||||
|
|
|
@ -5,13 +5,11 @@ IN: io.directories
|
|||
HELP: cwd
|
||||
{ $values { "path" "a pathname string" } }
|
||||
{ $description "Outputs the current working directory of the Factor process." }
|
||||
{ $errors "Windows CE has no concept of “current directory”, so this word throws an error there." }
|
||||
{ $notes "User code should use the value of the " { $link current-directory } " variable instead." } ;
|
||||
|
||||
HELP: cd
|
||||
{ $values { "path" "a pathname string" } }
|
||||
{ $description "Changes the current working directory of the Factor process." }
|
||||
{ $errors "Windows CE has no concept of “current directory”, so this word throws an error there." }
|
||||
{ $notes "User code should use " { $link with-directory } " or " { $link set-current-directory } " instead." } ;
|
||||
|
||||
{ cd cwd current-directory set-current-directory with-directory } related-words
|
||||
|
|
|
@ -141,7 +141,7 @@ ERROR: not-absolute-path ;
|
|||
|
||||
PRIVATE>
|
||||
|
||||
M: winnt file-system-info ( path -- file-system-info )
|
||||
M: windows file-system-info ( path -- file-system-info )
|
||||
normalize-path root-directory (file-system-info) ;
|
||||
|
||||
CONSTANT: names-buf-length 16384
|
||||
|
@ -174,7 +174,7 @@ CONSTANT: names-buf-length 16384
|
|||
]
|
||||
] [ '[ _ FindVolumeClose win32-error=0/f ] ] bi [ ] cleanup ;
|
||||
|
||||
M: winnt file-systems ( -- array )
|
||||
M: windows file-systems ( -- array )
|
||||
find-volumes [ volume>paths ] map
|
||||
concat [
|
||||
[ (file-system-info) ]
|
||||
|
|
|
@ -70,7 +70,7 @@ C: <io-callback> io-callback
|
|||
[ (make-overlapped) ] dip
|
||||
handle>> ptr>> [ >>offset ] when* ;
|
||||
|
||||
M: winnt FileArgs-overlapped ( port -- overlapped )
|
||||
M: windows FileArgs-overlapped ( port -- overlapped )
|
||||
make-overlapped ;
|
||||
|
||||
: <completion-port> ( handle existing -- handle )
|
||||
|
@ -81,7 +81,7 @@ SYMBOL: master-completion-port
|
|||
: <master-completion-port> ( -- handle )
|
||||
INVALID_HANDLE_VALUE f <completion-port> ;
|
||||
|
||||
M: winnt add-completion ( win32-handle -- win32-handle )
|
||||
M: windows add-completion ( win32-handle -- win32-handle )
|
||||
dup handle>> master-completion-port get-global <completion-port> drop ;
|
||||
|
||||
: eof? ( error -- ? )
|
||||
|
@ -121,10 +121,10 @@ M: winnt add-completion ( win32-handle -- win32-handle )
|
|||
M: win32-handle cancel-operation
|
||||
[ handle>> CancelIo win32-error=0/f ] unless-disposed ;
|
||||
|
||||
M: winnt io-multiplex ( nanos -- )
|
||||
M: windows io-multiplex ( nanos -- )
|
||||
handle-overlapped [ 0 io-multiplex ] when ;
|
||||
|
||||
M: winnt init-io ( -- )
|
||||
M: windows init-io ( -- )
|
||||
<master-completion-port> master-completion-port set-global
|
||||
H{ } clone pending-overlapped set-global ;
|
||||
|
||||
|
@ -138,9 +138,9 @@ ERROR: seek-before-start n ;
|
|||
: set-seek-ptr ( n handle -- )
|
||||
[ dup 0 < [ seek-before-start ] when ] dip ptr<< ;
|
||||
|
||||
M: winnt tell-handle ( handle -- n ) ptr>> ;
|
||||
M: windows tell-handle ( handle -- n ) ptr>> ;
|
||||
|
||||
M: winnt seek-handle ( n seek-type handle -- )
|
||||
M: windows seek-handle ( n seek-type handle -- )
|
||||
swap {
|
||||
{ seek-absolute [ set-seek-ptr ] }
|
||||
{ seek-relative [ [ ptr>> + ] keep set-seek-ptr ] }
|
||||
|
@ -185,7 +185,7 @@ M: winnt seek-handle ( n seek-type handle -- )
|
|||
[ lpOverlapped>> ]
|
||||
} cleave ;
|
||||
|
||||
M: winnt (wait-to-write)
|
||||
M: windows (wait-to-write)
|
||||
[
|
||||
[ make-FileArgs dup setup-write WriteFile ]
|
||||
[ wait-for-file ]
|
||||
|
@ -196,7 +196,7 @@ M: winnt (wait-to-write)
|
|||
: finish-read ( n port -- )
|
||||
[ update-file-ptr ] [ buffer>> n>buffer ] 2bi ;
|
||||
|
||||
M: winnt (wait-to-read) ( port -- )
|
||||
M: windows (wait-to-read) ( port -- )
|
||||
[
|
||||
[ make-FileArgs dup setup-read ReadFile ]
|
||||
[ wait-for-file ]
|
||||
|
@ -206,7 +206,7 @@ M: winnt (wait-to-read) ( port -- )
|
|||
|
||||
: console-app? ( -- ? ) GetConsoleWindow >boolean ;
|
||||
|
||||
M: winnt init-stdio
|
||||
M: windows init-stdio
|
||||
console-app?
|
||||
[ init-c-stdio ]
|
||||
[ null-reader null-writer null-writer set-stdio ] if ;
|
||||
|
@ -296,17 +296,17 @@ SYMBOLS: +read-only+ +hidden+ +system+
|
|||
[ timestamp>FILETIME ] tri@
|
||||
SetFileTime win32-error=0/f ;
|
||||
|
||||
M: winnt cwd
|
||||
M: windows cwd
|
||||
MAX_UNICODE_PATH dup <ushort-array>
|
||||
[ GetCurrentDirectory win32-error=0/f ] keep
|
||||
utf16n alien>string ;
|
||||
|
||||
M: winnt cd
|
||||
M: windows cd
|
||||
SetCurrentDirectory win32-error=0/f ;
|
||||
|
||||
CONSTANT: unicode-prefix "\\\\?\\"
|
||||
|
||||
M: winnt root-directory? ( path -- ? )
|
||||
M: windows root-directory? ( path -- ? )
|
||||
{
|
||||
{ [ dup empty? ] [ drop f ] }
|
||||
{ [ dup [ path-separator? ] all? ] [ drop t ] }
|
||||
|
@ -331,7 +331,7 @@ TR: normalize-separators "/" "\\" ;
|
|||
|
||||
PRIVATE>
|
||||
|
||||
M: winnt normalize-path ( string -- string' )
|
||||
M: windows normalize-path ( string -- string' )
|
||||
dup unc-path? [
|
||||
normalize-separators
|
||||
] [
|
||||
|
@ -340,7 +340,7 @@ M: winnt normalize-path ( string -- string' )
|
|||
prepend-prefix
|
||||
] if ;
|
||||
|
||||
M: winnt CreateFile-flags ( DWORD -- DWORD )
|
||||
M: windows CreateFile-flags ( DWORD -- DWORD )
|
||||
FILE_FLAG_OVERLAPPED bitor ;
|
||||
|
||||
<PRIVATE
|
||||
|
@ -352,11 +352,11 @@ M: winnt CreateFile-flags ( DWORD -- DWORD )
|
|||
|
||||
PRIVATE>
|
||||
|
||||
M: winnt open-append
|
||||
M: windows open-append
|
||||
[ dup windows-file-size ] [ drop 0 ] recover
|
||||
[ (open-append) ] dip >>ptr ;
|
||||
|
||||
M: winnt home
|
||||
M: windows home
|
||||
{
|
||||
[ "HOMEDRIVE" os-env "HOMEPATH" os-env append-path ]
|
||||
[ "USERPROFILE" os-env ]
|
||||
|
|
|
@ -23,7 +23,7 @@ $nl
|
|||
"The default value is " { $link +append-environment+ } "." ;
|
||||
|
||||
ARTICLE: "io.launcher.redirection" "Input/output redirection"
|
||||
"On all operating systems except for Windows CE, the default input/output/error streams can be redirected."
|
||||
"On all operating systems, the default input/output/error streams can be redirected."
|
||||
$nl
|
||||
"To specify redirection, set the " { $snippet "stdin" } ", " { $snippet "stdout" } " and " { $snippet "stderr" } " slots of a " { $link process } " to one of the following values:"
|
||||
{ $list
|
||||
|
|
|
@ -77,27 +77,16 @@ TUPLE: CreateProcess-args
|
|||
[ drop f ]
|
||||
} case ;
|
||||
|
||||
: app-name/cmd-line ( process -- app-name cmd-line )
|
||||
command>> dup string? [
|
||||
" " split1
|
||||
] [
|
||||
unclip swap join-arguments
|
||||
] if ;
|
||||
|
||||
: cmd-line ( process -- cmd-line )
|
||||
command>> dup string? [ join-arguments ] unless ;
|
||||
|
||||
: fill-lpApplicationName ( process args -- process args )
|
||||
over app-name/cmd-line
|
||||
[ >>lpApplicationName ] [ >>lpCommandLine ] bi* ;
|
||||
|
||||
: fill-lpCommandLine ( process args -- process args )
|
||||
over cmd-line >>lpCommandLine ;
|
||||
|
||||
: fill-dwCreateFlags ( process args -- process args )
|
||||
0
|
||||
pick pass-environment? [ CREATE_UNICODE_ENVIRONMENT bitor ] when
|
||||
pick detached>> os winnt? and [ DETACHED_PROCESS bitor ] when
|
||||
pick detached>> os windows? and [ DETACHED_PROCESS bitor ] when
|
||||
pick lookup-priority [ bitor ] when*
|
||||
>>dwCreateFlags ;
|
||||
|
||||
|
@ -114,13 +103,9 @@ TUPLE: CreateProcess-args
|
|||
: fill-startup-info ( process args -- process args )
|
||||
dup lpStartupInfo>> STARTF_USESTDHANDLES >>dwFlags drop ;
|
||||
|
||||
HOOK: fill-redirection io-backend ( process args -- )
|
||||
|
||||
M: wince fill-redirection 2drop ;
|
||||
|
||||
: make-CreateProcess-args ( process -- args )
|
||||
default-CreateProcess-args
|
||||
os wince? [ fill-lpApplicationName ] [ fill-lpCommandLine ] if
|
||||
fill-lpCommandLine
|
||||
fill-dwCreateFlags
|
||||
fill-lpEnvironment
|
||||
fill-startup-info
|
||||
|
@ -137,18 +122,6 @@ M: launch-error error.
|
|||
"Launch descriptor:" print nl
|
||||
process>> . ;
|
||||
|
||||
M: windows run-process* ( process -- handle )
|
||||
[
|
||||
[
|
||||
current-directory get absolute-path cd
|
||||
|
||||
dup make-CreateProcess-args
|
||||
[ fill-redirection ] keep
|
||||
dup call-CreateProcess
|
||||
lpProcessInformation>>
|
||||
] with-destructors
|
||||
] [ launch-error ] recover ;
|
||||
|
||||
M: windows kill-process* ( handle -- )
|
||||
hProcess>> 255 TerminateProcess win32-error=0/f ;
|
||||
|
||||
|
@ -270,9 +243,21 @@ M: windows wait-for-processes ( -- ? )
|
|||
OPEN_EXISTING
|
||||
redirect
|
||||
STD_INPUT_HANDLE GetStdHandle or ;
|
||||
|
||||
M: winnt fill-redirection ( process args -- )
|
||||
|
||||
: fill-redirection ( process args -- )
|
||||
dup lpStartupInfo>>
|
||||
[ [ redirect-stdout ] dip hStdOutput<< ]
|
||||
[ [ redirect-stderr ] dip hStdError<< ]
|
||||
[ [ redirect-stdin ] dip hStdInput<< ] 3tri ;
|
||||
|
||||
M: windows run-process* ( process -- handle )
|
||||
[
|
||||
[
|
||||
current-directory get absolute-path cd
|
||||
|
||||
dup make-CreateProcess-args
|
||||
[ fill-redirection ] keep
|
||||
dup call-CreateProcess
|
||||
lpProcessInformation>>
|
||||
] with-destructors
|
||||
] [ launch-error ] recover ;
|
||||
|
|
|
@ -60,5 +60,5 @@ PRIVATE>
|
|||
|
||||
{
|
||||
{ [ os unix? ] [ "io.mmap.unix" require ] }
|
||||
{ [ os winnt? ] [ "io.mmap.windows" require ] }
|
||||
{ [ os windows? ] [ "io.mmap.windows" require ] }
|
||||
} cond
|
||||
|
|
|
@ -91,8 +91,7 @@ $nl
|
|||
"Factor uses " { $snippet "kqueue" } " to implement monitors on BSD."
|
||||
$nl
|
||||
"The " { $snippet "kqueue" } " system is limited to monitoring individual files and directories. Monitoring a directory only notifies of files being added and removed to the directory itself, not of changes to file contents."
|
||||
{ $heading "Windows CE" }
|
||||
"Windows CE does not support monitors." ;
|
||||
;
|
||||
|
||||
ARTICLE: "io.monitors" "File system change monitors"
|
||||
"File system change monitors listen for changes to file names, attributes and contents under a specified directory. They can optionally be recursive, in which case subdirectories are also monitored."
|
||||
|
|
|
@ -5,7 +5,7 @@ io.files.temp io.directories io.directories.hierarchy
|
|||
io.pathnames accessors concurrency.promises ;
|
||||
IN: io.monitors.tests
|
||||
|
||||
os { winnt linux macosx } member? [
|
||||
os { windows linux macosx } member? [
|
||||
[
|
||||
[ "monitor-test" temp-file delete-tree ] ignore-errors
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -89,7 +89,7 @@ TUPLE: win32-monitor < monitor port ;
|
|||
[ dup fill-queue (fill-queue-thread) ]
|
||||
[ dup already-disposed? [ 2drop ] [ rethrow ] if ] recover ;
|
||||
|
||||
M:: winnt (monitor) ( path recursive? mailbox -- monitor )
|
||||
M:: windows (monitor) ( path recursive? mailbox -- monitor )
|
||||
[
|
||||
path normalize-path mailbox win32-monitor new-monitor
|
||||
path open-directory \ win32-monitor-port <buffered-port>
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -39,7 +39,7 @@ IN: io.pipes.windows
|
|||
nano-count #
|
||||
] "" make ;
|
||||
|
||||
M: winnt (pipe) ( -- pipe )
|
||||
M: windows (pipe) ( -- pipe )
|
||||
[
|
||||
unique-pipe-name
|
||||
[ create-named-pipe ] [ open-other-end ] bi
|
||||
|
|
|
@ -89,7 +89,7 @@ M: windows (raw) ( addrspec -- handle )
|
|||
: malloc-int ( n -- alien )
|
||||
int <ref> malloc-byte-array ; inline
|
||||
|
||||
M: winnt WSASocket-flags ( -- DWORD )
|
||||
M: windows WSASocket-flags ( -- DWORD )
|
||||
WSA_FLAG_OVERLAPPED ;
|
||||
|
||||
: get-ConnectEx-ptr ( socket -- void* )
|
||||
|
@ -251,7 +251,7 @@ TUPLE: WSARecvFrom-args port
|
|||
tri memcpy
|
||||
] bi ; inline
|
||||
|
||||
M: winnt (receive) ( datagram -- packet addrspec )
|
||||
M: windows (receive) ( datagram -- packet addrspec )
|
||||
[
|
||||
<WSARecvFrom-args>
|
||||
[ call-WSARecvFrom ]
|
||||
|
@ -295,7 +295,7 @@ TUPLE: WSASendTo-args port
|
|||
[ lpCompletionRoutine>> ]
|
||||
} cleave WSASendTo socket-error* ; inline
|
||||
|
||||
M: winnt (send) ( packet addrspec datagram -- )
|
||||
M: windows (send) ( packet addrspec datagram -- )
|
||||
[
|
||||
<WSASendTo-args>
|
||||
[ call-WSASendTo ]
|
||||
|
|
|
@ -14,7 +14,7 @@ IN: openssl.libcrypto
|
|||
{
|
||||
{ [ os openbsd? ] [ ] } ! VM is linked with it
|
||||
{ [ os netbsd? ] [ ] }
|
||||
{ [ os winnt? ] [ "libcrypto" "libeay32.dll" cdecl add-library ] }
|
||||
{ [ os windows? ] [ "libcrypto" "libeay32.dll" cdecl add-library ] }
|
||||
{ [ os macosx? ] [ "libcrypto" "libcrypto.dylib" cdecl add-library ] }
|
||||
{ [ os unix? ] [ "libcrypto" "libcrypto.so" cdecl add-library ] }
|
||||
} cond
|
||||
|
|
|
@ -10,7 +10,7 @@ IN: openssl.libssl
|
|||
<< {
|
||||
{ [ os openbsd? ] [ ] } ! VM is linked with it
|
||||
{ [ os netbsd? ] [ ] }
|
||||
{ [ os winnt? ] [ "libssl" "ssleay32.dll" cdecl add-library ] }
|
||||
{ [ os windows? ] [ "libssl" "ssleay32.dll" cdecl add-library ] }
|
||||
{ [ os macosx? ] [ "libssl" "libssl.dylib" cdecl add-library ] }
|
||||
{ [ os unix? ] [ "libssl" "libssl.so" cdecl add-library ] }
|
||||
} cond >>
|
||||
|
|
|
@ -12,7 +12,7 @@ LIBRARY: pango.cairo
|
|||
|
||||
<<
|
||||
"pango.cairo" {
|
||||
{ [ os winnt? ] [ "libpangocairo-1.0-0.dll" cdecl add-library ] }
|
||||
{ [ os windows? ] [ "libpangocairo-1.0-0.dll" cdecl add-library ] }
|
||||
{ [ os macosx? ] [ drop ] }
|
||||
{ [ os unix? ] [ drop ] }
|
||||
} cond
|
||||
|
|
|
@ -13,7 +13,7 @@ LIBRARY: pango
|
|||
|
||||
<<
|
||||
"pango" {
|
||||
{ [ os winnt? ] [ "libpango-1.0-0.dll" cdecl add-library ] }
|
||||
{ [ os windows? ] [ "libpango-1.0-0.dll" cdecl add-library ] }
|
||||
{ [ os unix? ] [ drop ] }
|
||||
} cond
|
||||
>>
|
||||
|
|
|
@ -33,7 +33,7 @@ IN: system-info.windows
|
|||
: windows-minor ( -- n )
|
||||
os-version-struct dwMinorVersion>> ;
|
||||
|
||||
M: winnt os-version ( -- obj )
|
||||
M: windows os-version ( -- obj )
|
||||
os-version-struct [ dwMajorVersion>> ] [ dwMinorVersion>> ] bi 2array ;
|
||||
|
||||
: windows-build# ( -- n )
|
||||
|
@ -67,7 +67,7 @@ M: winnt os-version ( -- obj )
|
|||
: system-windows-directory ( -- str )
|
||||
\ GetSystemWindowsDirectory get-directory ;
|
||||
|
||||
M: winnt cpus ( -- n )
|
||||
M: windows cpus ( -- n )
|
||||
system-info dwNumberOfProcessors>> ;
|
||||
|
||||
: memory-status ( -- MEMORYSTATUSEX )
|
||||
|
@ -75,25 +75,25 @@ M: winnt cpus ( -- n )
|
|||
MEMORYSTATUSEX heap-size >>dwLength
|
||||
dup GlobalMemoryStatusEx win32-error=0/f ;
|
||||
|
||||
M: winnt memory-load ( -- n )
|
||||
M: windows memory-load ( -- n )
|
||||
memory-status dwMemoryLoad>> ;
|
||||
|
||||
M: winnt physical-mem ( -- n )
|
||||
M: windows physical-mem ( -- n )
|
||||
memory-status ullTotalPhys>> ;
|
||||
|
||||
M: winnt available-mem ( -- n )
|
||||
M: windows available-mem ( -- n )
|
||||
memory-status ullAvailPhys>> ;
|
||||
|
||||
M: winnt total-page-file ( -- n )
|
||||
M: windows total-page-file ( -- n )
|
||||
memory-status ullTotalPageFile>> ;
|
||||
|
||||
M: winnt available-page-file ( -- n )
|
||||
M: windows available-page-file ( -- n )
|
||||
memory-status ullAvailPageFile>> ;
|
||||
|
||||
M: winnt total-virtual-mem ( -- n )
|
||||
M: windows total-virtual-mem ( -- n )
|
||||
memory-status ullTotalVirtual>> ;
|
||||
|
||||
M: winnt available-virtual-mem ( -- n )
|
||||
M: windows available-virtual-mem ( -- n )
|
||||
memory-status ullAvailVirtual>> ;
|
||||
|
||||
: computer-name ( -- string )
|
||||
|
|
|
@ -13,6 +13,6 @@ IN: tools.deploy
|
|||
|
||||
{
|
||||
{ [ os macosx? ] [ "tools.deploy.macosx" ] }
|
||||
{ [ os winnt? ] [ "tools.deploy.windows" ] }
|
||||
{ [ os windows? ] [ "tools.deploy.windows" ] }
|
||||
{ [ os unix? ] [ "tools.deploy.unix" ] }
|
||||
} cond require
|
||||
|
|
|
@ -28,7 +28,7 @@ CONSTANT: app-icon-resource-id "APPICON"
|
|||
[ binary file-contents app-icon-resource-id embed-icon-resource ]
|
||||
[ 2drop ] if ;
|
||||
|
||||
M: winnt deploy*
|
||||
M: windows deploy*
|
||||
"resource:" [
|
||||
dup deploy-config [
|
||||
deploy-name get
|
||||
|
|
|
@ -11,7 +11,7 @@ IN: tools.disassembler.udis
|
|||
"libudis86" {
|
||||
{ [ os macosx? ] [ "libudis86.0.dylib" ] }
|
||||
{ [ os unix? ] [ "libudis86.so.0" ] }
|
||||
{ [ os winnt? ] [ "libudis86.dll" ] }
|
||||
{ [ os windows? ] [ "libudis86.dll" ] }
|
||||
} cond cdecl add-library
|
||||
>>
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ PRIVATE>
|
|||
<<
|
||||
{
|
||||
{ [ os macosx? ] [ "images.cocoa" require ] }
|
||||
{ [ os winnt? ] [ "images.gdiplus" require ] }
|
||||
{ [ os windows? ] [ "images.gdiplus" require ] }
|
||||
[ "images.gtk" require ]
|
||||
} cond
|
||||
>>
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
|
@ -1 +1 @@
|
|||
winnt
|
||||
windows
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue