Merge branch 'master' of git://factorcode.org/git/factor

db4
Slava Pestov 2009-01-30 23:27:17 -06:00
commit a15ccb3812
2 changed files with 40 additions and 1 deletions

View File

@ -1,9 +1,13 @@
USING: alien alien.c-types alien.syntax kernel system combinators ;
USING: alien alien.c-types alien.syntax kernel system
combinators ;
IN: math.blas.cblas
<<
: load-atlas ( -- )
"atlas" "libatlas.so" "cdecl" add-library ;
: load-fortran ( -- )
"I77" "libI77.so" "cdecl" add-library
"F77" "libF77.so" "cdecl" add-library ;
: load-blas ( -- )
"blas" "libblas.so" "cdecl" add-library ;
@ -11,6 +15,10 @@ IN: math.blas.cblas
{ [ os macosx? ] [ "libblas.dylib" "cdecl" add-library ] }
{ [ os windows? ] [ "blas.dll" "cdecl" add-library ] }
{ [ os openbsd? ] [ "libcblas.so" "cdecl" add-library load-blas ] }
{ [ os netbsd? ] [
load-fortran load-blas
"/usr/local/lib/libcblas.so" "cdecl" add-library
] }
{ [ os freebsd? ] [ "libcblas.so" "cdecl" add-library load-atlas ] }
[ "libblas.so" "cdecl" add-library ]
} cond

View File

@ -5,3 +5,34 @@ cell-bits {
{ 32 [ "unix.stat.netbsd.32" require ] }
{ 64 [ "unix.stat.netbsd.64" require ] }
} case
: _VFS_NAMELEN 32 ; inline
: _VFS_MNAMELEN 1024 ; inline
C-STRUCT: statvfs
{ "ulong" "f_flag" }
{ "ulong" "f_bsize" }
{ "ulong" "f_frsize" }
{ "ulong" "f_iosize" }
{ "fsblkcnt_t" "f_blocks" }
{ "fsblkcnt_t" "f_bfree" }
{ "fsblkcnt_t" "f_bavail" }
{ "fsblkcnt_t" "f_bresvd" }
{ "fsfilcnt_t" "f_files" }
{ "fsfilcnt_t" "f_ffree" }
{ "fsfilcnt_t" "f_favail" }
{ "fsfilcnt_t" "f_fresvd" }
{ "uint64_t" "f_syncreads" }
{ "uint64_t" "f_syncwrites" }
{ "uint64_t" "f_asyncreads" }
{ "uint64_t" "f_asyncwrites" }
{ "fsid_t" "f_fsidx" }
{ "ulong" "f_fsid" }
{ "ulong" "f_namemax" }
{ "uid_t" "f_owner" }
{ { "uint32_t" 4 } "f_spare" }
{ { "char" _VFS_NAMELEN } "f_fstypename" }
{ { "char" _VFS_NAMELEN } "f_mntonname" }
{ { "char" _VFS_NAMELEN } "f_mntfromname" } ;
FUNCTION: int statvfs ( char* path, statvfs* buf ) ;