remove win32? and win64? words
parent
5db2e8570a
commit
a9cd31704d
|
@ -388,6 +388,6 @@ M: long-long-type box-return ( type -- )
|
||||||
|
|
||||||
[ string>u16-alien ] "ushort*" c-type set-c-type-prep
|
[ string>u16-alien ] "ushort*" c-type set-c-type-prep
|
||||||
|
|
||||||
win64? "longlong" "long" ? "ptrdiff_t" typedef
|
os winnt? cpu x86.64? and "longlong" "long" ? "ptrdiff_t" typedef
|
||||||
|
|
||||||
] with-compilation-unit
|
] with-compilation-unit
|
||||||
|
|
|
@ -5,8 +5,6 @@ IN: system
|
||||||
ARTICLE: "os" "System interface"
|
ARTICLE: "os" "System interface"
|
||||||
"Operating system detection:"
|
"Operating system detection:"
|
||||||
{ $subsection os }
|
{ $subsection os }
|
||||||
{ $subsection win32? }
|
|
||||||
{ $subsection win64? }
|
|
||||||
"Processor detection:"
|
"Processor detection:"
|
||||||
{ $subsection cpu }
|
{ $subsection cpu }
|
||||||
"Reading environment variables:"
|
"Reading environment variables:"
|
||||||
|
@ -86,14 +84,6 @@ HELP: set-os-envs
|
||||||
|
|
||||||
{ os-env os-envs set-os-envs } related-words
|
{ os-env os-envs set-os-envs } related-words
|
||||||
|
|
||||||
HELP: win32?
|
|
||||||
{ $values { "?" "a boolean" } }
|
|
||||||
{ $description "Tests if Factor is running on 32-bit Windows." } ;
|
|
||||||
|
|
||||||
HELP: win64?
|
|
||||||
{ $values { "?" "a boolean" } }
|
|
||||||
{ $description "Tests if Factor is running on 64-bit Windows." } ;
|
|
||||||
|
|
||||||
HELP: image
|
HELP: image
|
||||||
{ $values { "path" "a pathname string" } }
|
{ $values { "path" "a pathname string" } }
|
||||||
{ $description "Outputs the pathname of the currently running Factor image." } ;
|
{ $description "Outputs the pathname of the currently running Factor image." } ;
|
||||||
|
|
|
@ -64,14 +64,6 @@ PRIVATE>
|
||||||
|
|
||||||
: vm ( -- path ) 14 getenv ;
|
: vm ( -- path ) 14 getenv ;
|
||||||
|
|
||||||
: win32? ( -- ? )
|
|
||||||
os winnt?
|
|
||||||
cell 4 = and ; foldable
|
|
||||||
|
|
||||||
: win64? ( -- ? )
|
|
||||||
os winnt?
|
|
||||||
cell 8 = and ; foldable
|
|
||||||
|
|
||||||
: embedded? ( -- ? ) 15 getenv ;
|
: embedded? ( -- ? ) 15 getenv ;
|
||||||
|
|
||||||
: os-envs ( -- assoc )
|
: os-envs ( -- assoc )
|
||||||
|
|
|
@ -7,13 +7,11 @@
|
||||||
! - most of the matrix stuff
|
! - most of the matrix stuff
|
||||||
! - most of the query functions
|
! - most of the query functions
|
||||||
|
|
||||||
|
|
||||||
USING: alien alien.syntax combinators system ;
|
USING: alien alien.syntax combinators system ;
|
||||||
|
|
||||||
IN: cairo.ffi
|
IN: cairo.ffi
|
||||||
|
|
||||||
<< "cairo" {
|
<< "cairo" {
|
||||||
{ [ os win32? ] [ "libcairo-2.dll" ] }
|
{ [ os winnt? ] [ "libcairo-2.dll" ] }
|
||||||
! { [ os macosx? ] [ "libcairo.dylib" ] }
|
! { [ os macosx? ] [ "libcairo.dylib" ] }
|
||||||
{ [ os macosx? ] [ "/opt/local/lib/libcairo.dylib" ] }
|
{ [ os macosx? ] [ "/opt/local/lib/libcairo.dylib" ] }
|
||||||
{ [ os unix? ] [ "libcairo.so.2" ] }
|
{ [ os unix? ] [ "libcairo.so.2" ] }
|
||||||
|
|
|
@ -6,7 +6,7 @@ USING: alien alien.syntax combinators kernel system ;
|
||||||
IN: db.mysql.ffi
|
IN: db.mysql.ffi
|
||||||
|
|
||||||
<< "mysql" {
|
<< "mysql" {
|
||||||
{ [ os win32? ] [ "libmySQL.dll" "stdcall" ] }
|
{ [ os winnt? ] [ "libmySQL.dll" "stdcall" ] }
|
||||||
{ [ os macosx? ] [ "libmysqlclient.14.dylib" "cdecl" ] }
|
{ [ os macosx? ] [ "libmysqlclient.14.dylib" "cdecl" ] }
|
||||||
{ [ os unix? ] [ "libmysqlclient.so.14" "cdecl" ] }
|
{ [ os unix? ] [ "libmysqlclient.so.14" "cdecl" ] }
|
||||||
} cond add-library >>
|
} cond add-library >>
|
||||||
|
|
|
@ -5,7 +5,7 @@ USING: alien alien.syntax combinators system ;
|
||||||
IN: db.postgresql.ffi
|
IN: db.postgresql.ffi
|
||||||
|
|
||||||
<< "postgresql" {
|
<< "postgresql" {
|
||||||
{ [ os win32? ] [ "libpq.dll" ] }
|
{ [ os winnt? ] [ "libpq.dll" ] }
|
||||||
{ [ os macosx? ] [ "/opt/local/lib/postgresql82/libpq.dylib" ] }
|
{ [ os macosx? ] [ "/opt/local/lib/postgresql82/libpq.dylib" ] }
|
||||||
{ [ os unix? ] [ "libpq.so" ] }
|
{ [ os unix? ] [ "libpq.so" ] }
|
||||||
} cond "cdecl" add-library >>
|
} cond "cdecl" add-library >>
|
||||||
|
|
|
@ -6,7 +6,7 @@ IN: ogg
|
||||||
|
|
||||||
<<
|
<<
|
||||||
"ogg" {
|
"ogg" {
|
||||||
{ [ os win32? ] [ "ogg.dll" ] }
|
{ [ os winnt? ] [ "ogg.dll" ] }
|
||||||
{ [ os macosx? ] [ "libogg.0.dylib" ] }
|
{ [ os macosx? ] [ "libogg.0.dylib" ] }
|
||||||
{ [ os unix? ] [ "libogg.so" ] }
|
{ [ os unix? ] [ "libogg.so" ] }
|
||||||
} cond "cdecl" add-library
|
} cond "cdecl" add-library
|
||||||
|
|
|
@ -6,7 +6,7 @@ IN: ogg.theora
|
||||||
|
|
||||||
<<
|
<<
|
||||||
"theora" {
|
"theora" {
|
||||||
{ [ os win32? ] [ "theora.dll" ] }
|
{ [ os winnt? ] [ "theora.dll" ] }
|
||||||
{ [ os macosx? ] [ "libtheora.0.dylib" ] }
|
{ [ os macosx? ] [ "libtheora.0.dylib" ] }
|
||||||
{ [ os unix? ] [ "libtheora.so" ] }
|
{ [ os unix? ] [ "libtheora.so" ] }
|
||||||
} cond "cdecl" add-library
|
} cond "cdecl" add-library
|
||||||
|
|
|
@ -6,7 +6,7 @@ IN: ogg.vorbis
|
||||||
|
|
||||||
<<
|
<<
|
||||||
"vorbis" {
|
"vorbis" {
|
||||||
{ [ os win32? ] [ "vorbis.dll" ] }
|
{ [ os winnt? ] [ "vorbis.dll" ] }
|
||||||
{ [ os macosx? ] [ "libvorbis.0.dylib" ] }
|
{ [ os macosx? ] [ "libvorbis.0.dylib" ] }
|
||||||
{ [ os unix? ] [ "libvorbis.so" ] }
|
{ [ os unix? ] [ "libvorbis.so" ] }
|
||||||
} cond "cdecl" add-library
|
} cond "cdecl" add-library
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
USING: namespaces ;
|
USING: namespaces system ;
|
||||||
IN: openal.backend
|
IN: openal.backend
|
||||||
|
|
||||||
SYMBOL: openal-backend
|
HOOK: load-wav-file os ( filename -- format data size frequency )
|
||||||
HOOK: load-wav-file openal-backend ( filename -- format data size frequency )
|
|
||||||
|
|
||||||
TUPLE: other-openal-backend ;
|
|
||||||
T{ other-openal-backend } openal-backend set-global
|
|
||||||
|
|
|
@ -1,18 +1,14 @@
|
||||||
! Copyright (C) 2007 Chris Double.
|
! Copyright (C) 2007 Chris Double.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
!
|
|
||||||
IN: openal.macosx
|
|
||||||
USING: alien.c-types kernel alien alien.syntax shuffle
|
USING: alien.c-types kernel alien alien.syntax shuffle
|
||||||
combinators.lib openal.backend namespaces ;
|
combinators.lib openal.backend namespaces ;
|
||||||
|
IN: openal.macosx
|
||||||
|
|
||||||
TUPLE: macosx-openal-backend ;
|
|
||||||
LIBRARY: alut
|
LIBRARY: alut
|
||||||
|
|
||||||
T{ macosx-openal-backend } openal-backend set-global
|
|
||||||
|
|
||||||
FUNCTION: void alutLoadWAVFile ( ALbyte* fileName, ALenum* format, void** data, ALsizei* size, ALsizei* frequency ) ;
|
FUNCTION: void alutLoadWAVFile ( ALbyte* fileName, ALenum* format, void** data, ALsizei* size, ALsizei* frequency ) ;
|
||||||
|
|
||||||
M: macosx-openal-backend load-wav-file ( path -- format data size frequency )
|
M: macosx load-wav-file ( path -- format data size frequency )
|
||||||
0 <int> f <void*> 0 <int> 0 <int>
|
0 <int> f <void*> 0 <int> 0 <int>
|
||||||
[ alutLoadWAVFile ] 4keep
|
[ alutLoadWAVFile ] 4keep
|
||||||
>r >r >r *int r> *void* r> *int r> *int ;
|
>r >r >r *int r> *void* r> *int r> *int ;
|
||||||
|
|
|
@ -1,20 +1,23 @@
|
||||||
! Copyright (C) 2007 Chris Double.
|
! Copyright (C) 2007 Chris Double.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
!
|
|
||||||
IN: openal
|
|
||||||
USING: kernel alien system combinators alien.syntax namespaces
|
USING: kernel alien system combinators alien.syntax namespaces
|
||||||
alien.c-types sequences vocabs.loader shuffle combinators.lib
|
alien.c-types sequences vocabs.loader shuffle combinators.lib
|
||||||
openal.backend ;
|
openal.backend ;
|
||||||
|
IN: openal
|
||||||
|
|
||||||
<< "alut" {
|
<< "alut" {
|
||||||
{ [ os win32? ] [ "alut.dll" ] }
|
{ [ os windows? ] [ "alut.dll" ] }
|
||||||
{ [ os macosx? ] [ "/System/Library/Frameworks/OpenAL.framework/OpenAL" ] }
|
{ [ os macosx? ] [
|
||||||
|
"/System/Library/Frameworks/OpenAL.framework/OpenAL"
|
||||||
|
] }
|
||||||
{ [ os unix? ] [ "libalut.so" ] }
|
{ [ os unix? ] [ "libalut.so" ] }
|
||||||
} cond "cdecl" add-library >>
|
} cond "cdecl" add-library >>
|
||||||
|
|
||||||
<< "openal" {
|
<< "openal" {
|
||||||
{ [ os win32? ] [ "OpenAL32.dll" ] }
|
{ [ os windows? ] [ "OpenAL32.dll" ] }
|
||||||
{ [ os macosx? ] [ "/System/Library/Frameworks/OpenAL.framework/OpenAL" ] }
|
{ [ os macosx? ] [
|
||||||
|
"/System/Library/Frameworks/OpenAL.framework/OpenAL"
|
||||||
|
] }
|
||||||
{ [ os unix? ] [ "libopenal.so" ] }
|
{ [ os unix? ] [ "libopenal.so" ] }
|
||||||
} cond "cdecl" add-library >>
|
} cond "cdecl" add-library >>
|
||||||
|
|
||||||
|
@ -290,4 +293,3 @@ os macosx? "openal.macosx" "openal.other" ? require
|
||||||
|
|
||||||
: source-playing? ( source -- bool )
|
: source-playing? ( source -- bool )
|
||||||
AL_SOURCE_STATE get-source-param AL_PLAYING = ;
|
AL_SOURCE_STATE get-source-param AL_PLAYING = ;
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
! Copyright (C) 2007 Chris Double.
|
! Copyright (C) 2007 Chris Double.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
!
|
USING: openal.backend alien.c-types kernel alien alien.syntax
|
||||||
|
shuffle combinators.lib ;
|
||||||
IN: openal.other
|
IN: openal.other
|
||||||
USING: openal.backend alien.c-types kernel alien alien.syntax shuffle combinators.lib ;
|
|
||||||
|
|
||||||
LIBRARY: alut
|
LIBRARY: alut
|
||||||
|
|
||||||
FUNCTION: void alutLoadWAVFile ( ALbyte* fileName, ALenum* format, void** data, ALsizei* size, ALsizei* frequency, ALboolean* looping ) ;
|
FUNCTION: void alutLoadWAVFile ( ALbyte* fileName, ALenum* format, void** data, ALsizei* size, ALsizei* frequency, ALboolean* looping ) ;
|
||||||
|
|
||||||
M: other-openal-backend load-wav-file ( filename -- format data size frequency )
|
M: object load-wav-file ( filename -- format data size frequency )
|
||||||
0 <int> f <void*> 0 <int> 0 <int>
|
0 <int> f <void*> 0 <int> 0 <int>
|
||||||
[ 0 <char> alutLoadWAVFile ] 4keep
|
[ 0 <char> alutLoadWAVFile ] 4keep
|
||||||
>r >r >r *int r> *void* r> *int r> *int ;
|
>r >r >r *int r> *void* r> *int r> *int ;
|
||||||
|
|
|
@ -11,7 +11,7 @@ IN: openssl.libcrypto
|
||||||
|
|
||||||
<<
|
<<
|
||||||
"libcrypto" {
|
"libcrypto" {
|
||||||
{ [ os win32? ] [ "libeay32.dll" "cdecl" ] }
|
{ [ os winnt? ] [ "libeay32.dll" "cdecl" ] }
|
||||||
{ [ os macosx? ] [ "libcrypto.dylib" "cdecl" ] }
|
{ [ os macosx? ] [ "libcrypto.dylib" "cdecl" ] }
|
||||||
{ [ os unix? ] [ "libcrypto.so" "cdecl" ] }
|
{ [ os unix? ] [ "libcrypto.so" "cdecl" ] }
|
||||||
} cond add-library
|
} cond add-library
|
||||||
|
|
|
@ -10,7 +10,7 @@ USING: alien alien.syntax combinators kernel system ;
|
||||||
IN: openssl.libssl
|
IN: openssl.libssl
|
||||||
|
|
||||||
<< "libssl" {
|
<< "libssl" {
|
||||||
{ [ os win32? ] [ "ssleay32.dll" "cdecl" ] }
|
{ [ os winnt? ] [ "ssleay32.dll" "cdecl" ] }
|
||||||
{ [ os macosx? ] [ "libssl.dylib" "cdecl" ] }
|
{ [ os macosx? ] [ "libssl.dylib" "cdecl" ] }
|
||||||
{ [ os unix? ] [ "libssl.so" "cdecl" ] }
|
{ [ os unix? ] [ "libssl.so" "cdecl" ] }
|
||||||
} cond add-library >>
|
} cond add-library >>
|
||||||
|
|
|
@ -12,7 +12,7 @@ USING: alien alien.syntax combinators kernel system ;
|
||||||
IN: oracle.liboci
|
IN: oracle.liboci
|
||||||
|
|
||||||
"oci" {
|
"oci" {
|
||||||
{ [ os win32? ] [ "oci.dll" "stdcall" ] }
|
{ [ os winnt? ] [ "oci.dll" "stdcall" ] }
|
||||||
{ [ os macosx? ] [ "$DYLD_LIBRARY_PATH/libclntsh.dylib" "cdecl" ] }
|
{ [ os macosx? ] [ "$DYLD_LIBRARY_PATH/libclntsh.dylib" "cdecl" ] }
|
||||||
{ [ os unix? ] [ "$DYLD_LIBRARY_PATH/libclntsh.so.10.1" "cdecl" ] }
|
{ [ os unix? ] [ "$DYLD_LIBRARY_PATH/libclntsh.so.10.1" "cdecl" ] }
|
||||||
} cond add-library
|
} cond add-library
|
||||||
|
|
Loading…
Reference in New Issue