@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 ""
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
<<
"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
>>
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" } "." } ;
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 ;
: 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
! 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 >>
: 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 ;
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 >>
--- /dev/null
+! Copyright (C) 2010 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: bootstrap.image.private compiler.constants
+cpu.x86.assembler cpu.x86.assembler.operands kernel layouts
+locals parser sequences ;
+IN: bootstrap.x86
+
+: tib-segment ( -- ) FS ;
+: tib-temp ( -- reg ) EAX ;
+
+<< "vocab:cpu/x86/windows/bootstrap.factor" parse-file suffix! >> call
+
+: jit-install-seh ( -- )
+ ! Create a new exception record and store it in the TIB.
+ ! Clobbers tib-temp.
+ ! Align stack
+ ESP 3 bootstrap-cells ADD
+ ! Exception handler address filled in by callback.cpp
+ tib-temp 0 MOV rc-absolute-cell rt-exception-handler jit-rel
+ tib-temp PUSH
+ ! No next handler
+ 0 PUSH
+ ! This is the new exception handler
+ tib-exception-list-offset [] ESP tib-segment MOV ;
+
+:: jit-update-seh ( ctx-reg -- )
+ ! Load exception record structure that jit-install-seh
+ ! created from the bottom of the callstack.
+ ! Clobbers tib-temp.
+ tib-temp ctx-reg context-callstack-bottom-offset [+] MOV
+ tib-temp bootstrap-cell ADD
+ ! Store exception record in TIB.
+ tib-exception-list-offset [] tib-temp tib-segment MOV ;
+
+<< "vocab:cpu/x86/32/bootstrap.factor" parse-file suffix! >> call
+<< "vocab:cpu/x86/bootstrap.factor" parse-file suffix! >> call
+++ /dev/null
-! Copyright (C) 2010 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: bootstrap.image.private compiler.constants
-cpu.x86.assembler cpu.x86.assembler.operands kernel layouts
-locals parser sequences ;
-IN: bootstrap.x86
-
-: tib-segment ( -- ) FS ;
-: tib-temp ( -- reg ) EAX ;
-
-<< "vocab:cpu/x86/winnt/bootstrap.factor" parse-file suffix! >> call
-
-: jit-install-seh ( -- )
- ! Create a new exception record and store it in the TIB.
- ! Clobbers tib-temp.
- ! Align stack
- ESP 3 bootstrap-cells ADD
- ! Exception handler address filled in by callback.cpp
- tib-temp 0 MOV rc-absolute-cell rt-exception-handler jit-rel
- tib-temp PUSH
- ! No next handler
- 0 PUSH
- ! This is the new exception handler
- tib-exception-list-offset [] ESP tib-segment MOV ;
-
-:: jit-update-seh ( ctx-reg -- )
- ! Load exception record structure that jit-install-seh
- ! created from the bottom of the callstack.
- ! Clobbers tib-temp.
- tib-temp ctx-reg context-callstack-bottom-offset [+] MOV
- tib-temp bootstrap-cell ADD
- ! Store exception record in TIB.
- tib-exception-list-offset [] tib-temp tib-segment MOV ;
-
-<< "vocab:cpu/x86/32/bootstrap.factor" parse-file suffix! >> call
-<< "vocab:cpu/x86/bootstrap.factor" parse-file suffix! >> call
{
{ [ os unix? ] [ "cpu.x86.64.unix" require ] }
- { [ os winnt? ] [ "cpu.x86.64.winnt" require ] }
+ { [ os windows? ] [ "cpu.x86.64.windows" require ] }
} cond
check-sse
--- /dev/null
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: bootstrap.image.private kernel namespaces system layouts
+vocabs sequences cpu.x86.assembler parser
+cpu.x86.assembler.operands ;
+IN: bootstrap.x86
+
+DEFER: stack-reg
+
+: stack-frame-size ( -- n ) 8 bootstrap-cells ;
+: nv-regs ( -- seq ) { RBX RSI RDI R12 R13 R14 R15 } ;
+: arg1 ( -- reg ) RCX ;
+: arg2 ( -- reg ) RDX ;
+: arg3 ( -- reg ) R8 ;
+: arg4 ( -- reg ) R9 ;
+
+: tib-segment ( -- ) GS ;
+: tib-temp ( -- reg ) R11 ;
+
+: jit-install-seh ( -- ) stack-reg bootstrap-cell ADD ;
+: jit-update-seh ( ctx-reg -- ) drop ;
+
+<< "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
--- /dev/null
+64-bit x86 Windows ABI support
--- /dev/null
+not loaded
--- /dev/null
+! Copyright (C) 2008, 2010 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+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.windows
+
+M: x86.64 param-regs
+ drop {
+ { int-regs { RCX RDX R8 R9 } }
+ { float-regs { XMM0 XMM1 XMM2 XMM3 } }
+ } ;
+
+M: x86.64 reserved-stack-space 4 cells ;
+
+M: x86.64 return-struct-in-registers? ( c-type -- ? )
+ heap-size { 1 2 4 8 } member? ;
+
+M: x86.64 value-struct? heap-size { 1 2 4 8 } member? ;
+
+M: x86.64 dummy-stack-params? f ;
+
+M: x86.64 dummy-int-params? t ;
+
+M: x86.64 dummy-fp-params? t ;
+++ /dev/null
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: bootstrap.image.private kernel namespaces system layouts
-vocabs sequences cpu.x86.assembler parser
-cpu.x86.assembler.operands ;
-IN: bootstrap.x86
-
-DEFER: stack-reg
-
-: stack-frame-size ( -- n ) 8 bootstrap-cells ;
-: nv-regs ( -- seq ) { RBX RSI RDI R12 R13 R14 R15 } ;
-: arg1 ( -- reg ) RCX ;
-: arg2 ( -- reg ) RDX ;
-: arg3 ( -- reg ) R8 ;
-: arg4 ( -- reg ) R9 ;
-
-: tib-segment ( -- ) GS ;
-: tib-temp ( -- reg ) R11 ;
-
-: 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/64/bootstrap.factor" parse-file suffix! >> call
-<< "vocab:cpu/x86/bootstrap.factor" parse-file suffix! >> call
+++ /dev/null
-64-bit x86 Windows ABI support
+++ /dev/null
-not loaded
+++ /dev/null
-! Copyright (C) 2008, 2010 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-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
-
-M: x86.64 param-regs
- drop {
- { int-regs { RCX RDX R8 R9 } }
- { float-regs { XMM0 XMM1 XMM2 XMM3 } }
- } ;
-
-M: x86.64 reserved-stack-space 4 cells ;
-
-M: x86.64 return-struct-in-registers? ( c-type -- ? )
- heap-size { 1 2 4 8 } member? ;
-
-M: x86.64 value-struct? heap-size { 1 2 4 8 } member? ;
-
-M: x86.64 dummy-stack-params? f ;
-
-M: x86.64 dummy-int-params? t ;
-
-M: x86.64 dummy-fp-params? t ;
--- /dev/null
+! Copyright (C) 2010 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: bootstrap.image.private compiler.constants
+cpu.x86.assembler cpu.x86.assembler.operands kernel layouts
+locals parser sequences ;
+IN: bootstrap.x86
+
+: tib-exception-list-offset ( -- n ) 0 bootstrap-cells ;
+: tib-stack-base-offset ( -- n ) 1 bootstrap-cells ;
+: tib-stack-limit-offset ( -- n ) 2 bootstrap-cells ;
+
+: jit-save-tib ( -- )
+ tib-exception-list-offset [] tib-segment PUSH
+ tib-stack-base-offset [] tib-segment PUSH
+ tib-stack-limit-offset [] tib-segment PUSH ;
+
+: jit-restore-tib ( -- )
+ tib-stack-limit-offset [] tib-segment POP
+ tib-stack-base-offset [] tib-segment POP
+ tib-exception-list-offset [] tib-segment POP ;
+
+:: jit-update-tib ( ctx-reg -- )
+ ! There's a redundant load here because we're not allowed
+ ! to clobber ctx-reg. Clobbers tib-temp.
+ ! Save callstack base in TIB
+ tib-temp ctx-reg context-callstack-seg-offset [+] MOV
+ tib-temp tib-temp segment-end-offset [+] MOV
+ tib-stack-base-offset [] tib-temp tib-segment MOV
+ ! Save callstack limit in TIB
+ tib-temp ctx-reg context-callstack-seg-offset [+] MOV
+ tib-temp tib-temp segment-start-offset [+] MOV
+ tib-stack-limit-offset [] tib-temp tib-segment MOV ;
+++ /dev/null
-! Copyright (C) 2010 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: bootstrap.image.private compiler.constants
-cpu.x86.assembler cpu.x86.assembler.operands kernel layouts
-locals parser sequences ;
-IN: bootstrap.x86
-
-: tib-exception-list-offset ( -- n ) 0 bootstrap-cells ;
-: tib-stack-base-offset ( -- n ) 1 bootstrap-cells ;
-: tib-stack-limit-offset ( -- n ) 2 bootstrap-cells ;
-
-: jit-save-tib ( -- )
- tib-exception-list-offset [] tib-segment PUSH
- tib-stack-base-offset [] tib-segment PUSH
- tib-stack-limit-offset [] tib-segment PUSH ;
-
-: jit-restore-tib ( -- )
- tib-stack-limit-offset [] tib-segment POP
- tib-stack-base-offset [] tib-segment POP
- tib-exception-list-offset [] tib-segment POP ;
-
-:: jit-update-tib ( ctx-reg -- )
- ! There's a redundant load here because we're not allowed
- ! to clobber ctx-reg. Clobbers tib-temp.
- ! Save callstack base in TIB
- tib-temp ctx-reg context-callstack-seg-offset [+] MOV
- tib-temp tib-temp segment-end-offset [+] MOV
- tib-stack-base-offset [] tib-temp tib-segment MOV
- ! Save callstack limit in TIB
- tib-temp ctx-reg context-callstack-seg-offset [+] MOV
- tib-temp tib-temp segment-start-offset [+] MOV
- tib-stack-limit-offset [] tib-temp tib-segment MOV ;
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 >>
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 >>
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
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
{
{ [ os unix? ] [ "environment.unix" require ] }
- { [ os winnt? ] [ "environment.winnt" require ] }
- { [ os wince? ] [ ] }
+ { [ os windows? ] [ "environment.windows" require ] }
} cond
[
--- /dev/null
+Doug Coleman
\ No newline at end of file
--- /dev/null
+Windows environment variables implementation
--- /dev/null
+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: alien.strings fry io.encodings.utf16n kernel
+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.windows
+
+M: windows os-env ( key -- value )
+ MAX_UNICODE_PATH TCHAR <c-array>
+ [ dup length GetEnvironmentVariable ] keep over 0 = [
+ 2drop f
+ ] [
+ nip utf16n alien>string
+ ] if ;
+
+M: windows set-os-env ( value key -- )
+ swap SetEnvironmentVariable win32-error=0/f ;
+
+M: windows unset-os-env ( key -- )
+ f SetEnvironmentVariable 0 = [
+ GetLastError ERROR_ENVVAR_NOT_FOUND =
+ [ win32-error ] unless
+ ] when ;
+
+M: windows (os-envs) ( -- seq )
+ GetEnvironmentStrings [
+ <memory-stream> [
+ utf16n decode-input
+ [ "\0" read-until drop dup empty? not ] [ ] produce nip
+ ] with-input-stream*
+ ] [ FreeEnvironmentStrings win32-error=0/f ] bi ;
+++ /dev/null
-Doug Coleman
\ No newline at end of file
+++ /dev/null
-Windows environment variables implementation
+++ /dev/null
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: alien.strings fry io.encodings.utf16n kernel
-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
-
-M: winnt os-env ( key -- value )
- MAX_UNICODE_PATH TCHAR <c-array>
- [ dup length GetEnvironmentVariable ] keep over 0 = [
- 2drop f
- ] [
- nip utf16n alien>string
- ] if ;
-
-M: winnt set-os-env ( value key -- )
- swap SetEnvironmentVariable win32-error=0/f ;
-
-M: winnt unset-os-env ( key -- )
- f SetEnvironmentVariable 0 = [
- GetLastError ERROR_ENVVAR_NOT_FOUND =
- [ win32-error ] unless
- ] when ;
-
-M: winnt (os-envs) ( -- seq )
- GetEnvironmentStrings [
- <memory-stream> [
- utf16n decode-input
- [ "\0" read-until drop dup empty? not ] [ ] produce nip
- ] with-input-stream*
- ] [ FreeEnvironmentStrings win32-error=0/f ] bi ;
<<
"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
>>
<<
"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
>>
<<
"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
>>
<<
"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
<<
"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
<<
"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
>>
<<
"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
>>
<<
"gtk.gl" {
- { [ os winnt? ] [ drop ] }
+ { [ os windows? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libgtkglext-x11-1.0.so" cdecl add-library ] }
} cond
"io.files.windows" require
-winnt set-io-backend
+windows set-io-backend
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
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
]
] [ '[ _ 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) ]
[ (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 )
: <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 -- ? )
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 ;
: 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 ] }
[ lpOverlapped>> ]
} cleave ;
-M: winnt (wait-to-write)
+M: windows (wait-to-write)
[
[ make-FileArgs dup setup-write WriteFile ]
[ wait-for-file ]
: 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 ]
: 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 ;
[ 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 ] }
PRIVATE>
-M: winnt normalize-path ( string -- string' )
+M: windows normalize-path ( string -- string' )
dup unc-path? [
normalize-separators
] [
prepend-prefix
] if ;
-M: winnt CreateFile-flags ( DWORD -- DWORD )
+M: windows CreateFile-flags ( DWORD -- DWORD )
FILE_FLAG_OVERLAPPED bitor ;
<PRIVATE
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 ]
"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
[ 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 ;
: 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
"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 ;
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 ;
{
{ [ os unix? ] [ "io.mmap.unix" require ] }
- { [ os winnt? ] [ "io.mmap.windows" require ] }
+ { [ os windows? ] [ "io.mmap.windows" require ] }
} cond
"Factor uses " { $snippet "kqueue" } " to implement monitors on BSD."\r
$nl\r
"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."\r
-{ $heading "Windows CE" }\r
-"Windows CE does not support monitors." ;\r
+;\r
\r
ARTICLE: "io.monitors" "File system change monitors"\r
"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."\r
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
[ 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>
nano-count #
] "" make ;
-M: winnt (pipe) ( -- pipe )
+M: windows (pipe) ( -- pipe )
[
unique-pipe-name
[ create-named-pipe ] [ open-other-end ] bi
: malloc-int ( n -- alien )\r
int <ref> malloc-byte-array ; inline\r
\r
-M: winnt WSASocket-flags ( -- DWORD )\r
+M: windows WSASocket-flags ( -- DWORD )\r
WSA_FLAG_OVERLAPPED ;\r
\r
: get-ConnectEx-ptr ( socket -- void* )\r
tri memcpy\r
] bi ; inline\r
\r
-M: winnt (receive) ( datagram -- packet addrspec )\r
+M: windows (receive) ( datagram -- packet addrspec )\r
[\r
<WSARecvFrom-args>\r
[ call-WSARecvFrom ]\r
[ lpCompletionRoutine>> ]\r
} cleave WSASendTo socket-error* ; inline\r
\r
-M: winnt (send) ( packet addrspec datagram -- )\r
+M: windows (send) ( packet addrspec datagram -- )\r
[\r
<WSASendTo-args>\r
[ call-WSASendTo ]\r
{
{ [ 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
<< {
{ [ 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 >>
<<
"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
<<
"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
>>
: 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 )
: system-windows-directory ( -- str )
\ GetSystemWindowsDirectory get-directory ;
-M: winnt cpus ( -- n )
+M: windows cpus ( -- n )
system-info dwNumberOfProcessors>> ;
: memory-status ( -- MEMORYSTATUSEX )
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 )
{
{ [ os macosx? ] [ "tools.deploy.macosx" ] }
- { [ os winnt? ] [ "tools.deploy.windows" ] }
+ { [ os windows? ] [ "tools.deploy.windows" ] }
{ [ os unix? ] [ "tools.deploy.unix" ] }
} cond require
[ 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
"libudis86" {
{ [ os macosx? ] [ "libudis86.0.dylib" ] }
{ [ os unix? ] [ "libudis86.so.0" ] }
- { [ os winnt? ] [ "libudis86.dll" ] }
+ { [ os windows? ] [ "libudis86.dll" ] }
} cond cdecl add-library
>>
<<
{
{ [ os macosx? ] [ "images.cocoa" require ] }
- { [ os winnt? ] [ "images.gdiplus" require ] }
+ { [ os windows? ] [ "images.gdiplus" require ] }
[ "images.gtk" require ]
} cond
>>
-Microsoft Windows CE/XP/Vista API bindings
+Microsoft Windows XP/Vista/7 API bindings
if not errorlevel 1 (\r
echo x86-32 cl.exe detected.\r
set _target=x86-32\r
- set _bootimage=boot.winnt-x86.32.image\r
+ set _bootimage=boot.windows-x86.32.image\r
) else (\r
call cl 2>&1 | find "x64" >nul\r
if not errorlevel 1 (\r
echo x86-64 cl.exe detected.\r
set _target=x86-64\r
- set _bootimage=boot.winnt-x86.64.image\r
+ set _bootimage=boot.windows-x86.64.image\r
) else goto nocl\r
)\r
\r
if %_bootimage_version%==clean (\r
- set _git_branch=clean-winnt-%_target%\r
- set _bootimage_path=clean/winnt-%_target%\r
+ set _git_branch=clean-windows-%_target%\r
+ set _bootimage_path=clean/windows-%_target%\r
) else (\r
set _git_branch=master\r
set _bootimage_path=latest\r
echo upstream "master" branch and the boot image corresponding to the\r
echo most recent factor build is downloaded. This is the default.\r
echo If clean is specified, then the working copy is updated to the\r
-echo upstream "clean-winnt-*" branch corresponding to the current\r
+echo upstream "clean-windows-*" branch corresponding to the current\r
echo platform and the corresponding boot image is downloaded.\r
goto :EOF\r
\r
uname_s=`uname -s`
check_ret uname
case $uname_s in
- CYGWIN_NT-5.2-WOW64) OS=winnt;;
- *CYGWIN_NT*) OS=winnt;;
- *CYGWIN*) OS=winnt;;
- MINGW32*) OS=winnt;;
+ CYGWIN_NT-5.2-WOW64) OS=windows;;
+ *CYGWIN_NT*) OS=windows;;
+ *CYGWIN*) OS=windows;;
+ MINGW32*) OS=windows;;
*darwin*) OS=macosx;;
*Darwin*) OS=macosx;;
*linux*) OS=linux;;
set_factor_binary() {
case $OS in
- winnt) FACTOR_BINARY=factor.com;;
+ windows) FACTOR_BINARY=factor.com;;
*) FACTOR_BINARY=factor;;
esac
}
set_factor_library() {
case $OS in
- winnt) FACTOR_LIBRARY=factor.dll;;
+ windows) FACTOR_LIBRARY=factor.dll;;
macosx) FACTOR_LIBRARY=libfactor.dylib;;
*) FACTOR_LIBRARY=libfactor.a;;
esac
elif [[ $OS == linux && $ARCH == ppc ]] ; then
MAKE_IMAGE_TARGET=linux-ppc.32
MAKE_TARGET=linux-ppc-32
- elif [[ $OS == winnt && $ARCH == x86 && $WORD == 64 ]] ; then
- MAKE_IMAGE_TARGET=winnt-x86.64
- MAKE_TARGET=winnt-x86-64
- elif [[ $OS == winnt && $ARCH == x86 && $WORD == 32 ]] ; then
- MAKE_IMAGE_TARGET=winnt-x86.32
- MAKE_TARGET=winnt-x86-32
+ elif [[ $OS == windows && $ARCH == x86 && $WORD == 64 ]] ; then
+ MAKE_IMAGE_TARGET=windows-x86.64
+ MAKE_TARGET=windows-x86-64
+ elif [[ $OS == windows && $ARCH == x86 && $WORD == 32 ]] ; then
+ MAKE_IMAGE_TARGET=windows-x86.32
+ MAKE_TARGET=windows-x86-32
elif [[ $ARCH == x86 && $WORD == 64 ]] ; then
MAKE_IMAGE_TARGET=unix-x86.64
MAKE_TARGET=$OS-x86-64
if [[ $OS == linux && $ARCH == ppc ]] ; then WORD=32; fi
if [[ $OS == linux && $ARCH == arm ]] ; then WORD=32; fi
if [[ $OS == macosx && $ARCH == ppc ]] ; then WORD=32; fi
- if [[ $OS == wince && $ARCH == arm ]] ; then WORD=32; fi
$ECHO "OS=$OS"
$ECHO "ARCH=$ARCH"
set_copy() {
case $OS in
- winnt) COPY=cp;;
+ windows) COPY=cp;;
*) COPY=cp;;
esac
}
set_delete() {
case $OS in
- winnt) DELETE=rm;;
+ windows) DELETE=rm;;
*) DELETE=rm;;
esac
}
{ $table
{ "OS" "Library name" "Shared?" }
{ "Windows XP/Vista" { $snippet "factor.dll" } "Yes" }
- ! { "Windows CE" { $snippet "factor-ce.dll" } "Yes" }
{ "Mac OS X" { $snippet "libfactor.dylib" } "Yes" }
{ "Other Unix" { $snippet "libfactor.a" } "No" }
}
{ $values { "str/seq" { $or string sequence } } { "alien" alien } }
{ $description "Converts the string to a format which is a valid symbol name for the Factor VM's compiled code linker. By performing this conversion ahead of time, the image loader can run without allocating memory."
$nl
-"On Windows CE, symbols are represented as UCS2 strings, and on all other platforms they are ASCII strings." } ;
+"On all platforms, symbols are ASCII strings." } ;
ABOUT: "c-strings"
"vocab:bootstrap/syntax.factor" parse-file
architecture get {
- { "winnt-x86.32" "x86/32/winnt" }
+ { "windows-x86.32" "x86/32/windows" }
+ { "windows-x86.64" "x86/64/windows" }
{ "unix-x86.32" "x86/32/unix" }
- { "winnt-x86.64" "x86/64/winnt" }
{ "unix-x86.64" "x86/64/unix" }
{ "linux-ppc.32" "ppc/32/linux" }
{ "linux-ppc.64" "ppc/64/linux" }
openbsd
netbsd
solaris
- wince
- winnt
+ windows
}
"Operating system families:"
{ $subsections
: cpu ( -- class ) \ cpu get-global ; foldable
-SINGLETONS: winnt wince ;
-
-UNION: windows winnt wince ;
+SINGLETON: windows
SINGLETONS: freebsd netbsd openbsd solaris macosx linux ;
: string>os ( str -- class )
H{
- { "winnt" winnt }
- { "wince" wince }
+ { "windows" windows }
{ "freebsd" freebsd }
{ "netbsd" netbsd }
{ "openbsd" openbsd }
<<
"clutter.cally" {
- { [ os winnt? ] [ drop ] }
+ { [ os windows? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] }
} cond
<<
"clutter.cogl" {
- { [ os winnt? ] [ drop ] }
+ { [ os windows? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] }
} cond
<<
"clutter" {
- { [ os winnt? ] [ drop ] }
+ { [ os windows? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] }
} cond
<<
"clutter.gtk" {
- { [ os winnt? ] [ drop ] }
+ { [ os windows? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libclutter-gtk-1.0.so" cdecl add-library ] }
} cond
<<
"clutter.json" {
- { [ os winnt? ] [ drop ] }
+ { [ os windows? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libclutter-glx-1.0.so" cdecl add-library ] }
} cond
IN: curses.ffi
<< "curses" {
- { [ os winnt? ] [ "libcurses.dll" ] }
+ { [ os windows? ] [ "libcurses.dll" ] }
{ [ os macosx? ] [ "libcurses.dylib" ] }
{ [ os unix? ] [ "libncursesw.so" ] }
} cond cdecl add-library >>
<< "libgdbm" {
{ [ os macosx? ] [ "libgdbm.dylib" ] }
{ [ os unix? ] [ "libgdbm.so" ] }
- { [ os winnt? ] [ "gdbm3.dll" ] }
+ { [ os windows? ] [ "gdbm3.dll" ] }
} cond cdecl add-library >>
LIBRARY: libgdbm
{ $slide "Example: environment variables"
{ $vocab-link "environment" }
"Hooks are generic words which dispatch on dynamically-scoped variables"
- { "Implemented in an OS-specific way: " { $vocab-link "environment.unix" } ", " { $vocab-link "environment.winnt" } }
+ { "Implemented in an OS-specific way: " { $vocab-link "environment.unix" } ", " { $vocab-link "environment.windows" } }
}
{ $slide "Example: environment variables"
"Implementations use C FFI"
"libgraph" {
{ [ os macosx? ] [ "libgraph.dylib" ] }
{ [ os unix? ] [ "libgraph.so" ] }
- { [ os winnt? ] [ "graph.dll" ] }
+ { [ os windows? ] [ "graph.dll" ] }
} cond cdecl add-library
"libgvc"
{
{ [ os macosx? ] [ "libgvc.dylib" ] }
{ [ os unix? ] [ "libgvc.so" ] }
- { [ os winnt? ] [ "gvc.dll" ] }
+ { [ os windows? ] [ "gvc.dll" ] }
} cond cdecl add-library
>>
<<
"gstreamer.base" {
- { [ os winnt? ] [ drop ] }
+ { [ os windows? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libgstbase-0.10.so" cdecl add-library ] }
} cond
<<
"gstreamer.controller" {
- { [ os winnt? ] [ drop ] }
+ { [ os windows? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libgstcontroller-0.10.so" cdecl add-library ] }
} cond
<<
"gstreamer" {
- { [ os winnt? ] [ drop ] }
+ { [ os windows? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libgstreamer-0.10.so" cdecl add-library ] }
} cond
<<
"gstreamer.net" {
- { [ os winnt? ] [ drop ] }
+ { [ os windows? ] [ drop ] }
{ [ os macosx? ] [ drop ] }
{ [ os unix? ] [ "libgstnet-0.10.so" cdecl add-library ] }
} cond
{
{ [ os macosx? ] [ "io.files.trash.macosx" ] }
{ [ os unix? ] [ "io.files.trash.unix" ] }
- { [ os winnt? ] [ "io.files.trash.windows" ] }
+ { [ os windows? ] [ "io.files.trash.windows" ] }
} cond require
{ [ os macosx? ] [
"/System/Library/Frameworks/JavaScriptCore.framework/Versions/Current/JavaScriptCore" cdecl add-library
] }
- ! { [ os winnt? ] [ "javascriptcore.dll" ] }
+ ! { [ os windows? ] [ "javascriptcore.dll" ] }
! { [ os unix? ] [ "libsqlite3.so" ] }
[ drop ]
} cond
[ { "nmake" "/f" "nmakefile" "x86-32" } ] [
[
- winnt target-os set
+ windows target-os set
x86.32 target-cpu set
make-cmd
] with-scope
] with-scope
] unit-test
-[ { "./factor.com" "-i=boot.winnt-x86.32.image" "-no-user-init" } ] [
+[ { "./factor.com" "-i=boot.windows-x86.32.image" "-no-user-init" } ] [
[
- winnt target-os set
+ windows target-os set
x86.32 target-cpu set
boot-cmd
] with-scope
: make-cmd ( -- args )
{
- { [ target-os get winnt = ] [ nmake-cmd ] }
+ { [ target-os get windows = ] [ nmake-cmd ] }
[ gnu-make-cmd ]
} cond ;
] with-directory ;
: factor-vm ( -- string )
- target-os get winnt = "./factor.com" "./factor" ? ;
+ target-os get windows = "./factor.com" "./factor" ? ;
: boot-cmd ( -- cmd )
[
: extension ( os -- extension )
{
- { "winnt" [ ".zip" ] }
+ { "windows" [ ".zip" ] }
{ "macosx" [ ".dmg" ] }
[ drop ".tar.gz" ]
} case ;
: make-archive ( archive-name -- )
target-os get {
- { "winnt" [ make-windows-archive ] }
+ { "windows" [ make-windows-archive ] }
{ "macosx" [ make-macosx-archive ] }
[ drop make-unix-archive ]
} case ;
<<
"ogg" {
- { [ os winnt? ] [ "ogg.dll" ] }
+ { [ os windows? ] [ "ogg.dll" ] }
{ [ os macosx? ] [ "libogg.0.dylib" ] }
{ [ os unix? ] [ "libogg.so" ] }
} cond cdecl add-library
<<
"theoradec" {
- { [ os winnt? ] [ "theoradec.dll" ] }
+ { [ os windows? ] [ "theoradec.dll" ] }
{ [ os macosx? ] [ "libtheoradec.0.dylib" ] }
{ [ os unix? ] [ "libtheoradec.so" ] }
} cond cdecl add-library
"theoraenc" {
- { [ os winnt? ] [ "theoraenc.dll" ] }
+ { [ os windows? ] [ "theoraenc.dll" ] }
{ [ os macosx? ] [ "libtheoraenc.0.dylib" ] }
{ [ os unix? ] [ "libtheoraenc.so" ] }
} cond cdecl add-library
<<
"vorbis" {
- { [ os winnt? ] [ "vorbis.dll" ] }
+ { [ os windows? ] [ "vorbis.dll" ] }
{ [ os macosx? ] [ "libvorbis.0.dylib" ] }
{ [ os unix? ] [ "libvorbis.so" ] }
} cond cdecl add-library
CONSTANT: oses
{
- { "winnt" "Windows" }
+ { "windows" "Windows" }
{ "macosx" "Mac OS X" }
{ "linux" "Linux" }
{ "freebsd" "FreeBSD" }
: requirements ( builder -- xml )
[
os>> {
- { "winnt" "Windows XP, Windows Vista or Windows 7" }
+ { "windows" "Windows XP, Windows Vista or Windows 7" }
{ "macosx" "Mac OS X 10.5 Leopard" }
{ "linux" "Ubuntu Linux 9.04 (other distributions may also work)" }
{ "freebsd" "FreeBSD 7.1" }
void factor_vm::c_to_factor_toplevel(cell quot)
{
- /* 32-bit Windows SEH is set up in basis/cpu/x86/32/winnt/bootstrap.factor */
+ /* 32-bit Windows SEH is set up in basis/cpu/x86/32/windows/bootstrap.factor */
c_to_factor(quot);
}
#define SNPRINTF snprintf
#endif
-#define FACTOR_OS_STRING "winnt"
+#define FACTOR_OS_STRING "windows"
#define FACTOR_DLL NULL