Merge branch 'master' of git://factorcode.org/git/factor
commit
afbbfc1293
|
@ -5,20 +5,37 @@ unix.types math system io.backend alien.c-types unix
|
||||||
io.files io.unix.files unix.statvfs.openbsd ;
|
io.files io.unix.files unix.statvfs.openbsd ;
|
||||||
IN: io.unix.files.openbsd
|
IN: io.unix.files.openbsd
|
||||||
|
|
||||||
|
M: openbsd file-system-statfs
|
||||||
|
"statfs" <c-object> tuck statfs io-error ;
|
||||||
|
|
||||||
|
M: openbsd statfs>file-system-info ( file-system-info statfs -- file-system-info' )
|
||||||
|
{
|
||||||
|
[ statfs-f_flag >>flags ]
|
||||||
|
[ statfs-f_bsize >>block-size ]
|
||||||
|
[ statfs-f_iosize >>io-size ]
|
||||||
|
[ statfs-f_blocks >>blocks ]
|
||||||
|
[ statfs-f_bfree >>blocks-free ]
|
||||||
|
[ statfs-f_bavail >>blocks-available ]
|
||||||
|
[ statfs-f_files >>files ]
|
||||||
|
[ statfs-f_ffree >>files-free ]
|
||||||
|
[ statfs-f_favail >>files-available ]
|
||||||
|
[ statfs-f_syncwrites >>sync-writes ]
|
||||||
|
[ statfs-f_syncreads >>sync-reads ]
|
||||||
|
[ statfs-f_asyncwrites >>async-writes ]
|
||||||
|
[ statfs-f_asyncreads >>async-reads ]
|
||||||
|
[ statfs-f_fsid >>id ]
|
||||||
|
[ statfs-f_namemax >>name-max ]
|
||||||
|
[ statfs-f_owner >>owner ]
|
||||||
|
[ statfs-f_spare >>spare ]
|
||||||
|
[ statfs-f_fstypename alien>native-string >>type ]
|
||||||
|
[ statfs-f_mntonname alien>native-string >>mount-point ]
|
||||||
|
[ statfs-f_mntfromname alien>native-string >>device-name ]
|
||||||
|
} cleave ;
|
||||||
|
|
||||||
M: openbsd file-system-statvfs ( normalized-path -- statvfs )
|
M: openbsd file-system-statvfs ( normalized-path -- statvfs )
|
||||||
"statvfs" <c-object> tuck statvfs io-error ;
|
"statvfs" <c-object> tuck statvfs io-error ;
|
||||||
|
|
||||||
M: openbsd statvfs>file-system-info ( file-system-info statvfs -- file-system-info' )
|
M: openbsd statvfs>file-system-info ( file-system-info statvfs -- file-system-info' )
|
||||||
{
|
{
|
||||||
[ statvfs-f_bsize >>block-size ]
|
|
||||||
[ statvfs-f_frsize >>preferred-block-size ]
|
[ statvfs-f_frsize >>preferred-block-size ]
|
||||||
[ statvfs-f_blocks >>blocks ]
|
|
||||||
[ statvfs-f_bfree >>blocks-free ]
|
|
||||||
[ statvfs-f_bavail >>blocks-available ]
|
|
||||||
[ statvfs-f_files >>files ]
|
|
||||||
[ statvfs-f_ffree >>files-free ]
|
|
||||||
[ statvfs-f_favail >>files-available ]
|
|
||||||
[ statvfs-f_fsid >>id ]
|
|
||||||
[ statvfs-f_flag >>flags ]
|
|
||||||
[ statvfs-f_namemax >>name-max ]
|
|
||||||
} cleave ;
|
} cleave ;
|
||||||
|
|
|
@ -1,24 +1,4 @@
|
||||||
! 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.syntax kernel unix math accessors
|
USING: alien.syntax ;
|
||||||
combinators system io.backend alien.c-types unix.statfs
|
|
||||||
io.files ;
|
|
||||||
IN: unix.statfs.freebsd
|
IN: unix.statfs.freebsd
|
||||||
|
|
||||||
: ST_RDONLY 1 ; inline
|
|
||||||
: ST_NOSUID 2 ; inline
|
|
||||||
|
|
||||||
C-STRUCT: statvfs
|
|
||||||
{ "fsblkcnt_t" "f_bavail" }
|
|
||||||
{ "fsblkcnt_t" "f_bfree" }
|
|
||||||
{ "fsblkcnt_t" "f_blocks" }
|
|
||||||
{ "fsfilcnt_t" "f_favail" }
|
|
||||||
{ "fsfilcnt_t" "f_ffree" }
|
|
||||||
{ "fsfilcnt_t" "f_files" }
|
|
||||||
{ "ulong" "f_bsize" }
|
|
||||||
{ "ulong" "f_flag" }
|
|
||||||
{ "ulong" "f_frsize" }
|
|
||||||
{ "ulong" "f_fsid" }
|
|
||||||
{ "ulong" "f_namemax" } ;
|
|
||||||
|
|
||||||
FUNCTION: int statvfs ( char* path, statvfs* buf ) ;
|
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
! Copyright (C) 2008 Doug Coleman.
|
||||||
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
USING: alien.syntax ;
|
||||||
|
IN: unix.statfs.openbsd
|
||||||
|
|
||||||
|
: MFSNAMELEN 16 ; inline
|
||||||
|
: MNAMELEN 90 ; inline
|
||||||
|
|
||||||
|
C-STRUCT: statfs
|
||||||
|
{ "u_int32_t" "f_flags" }
|
||||||
|
{ "u_int32_t" "f_bsize" }
|
||||||
|
{ "u_int32_t" "f_iosize" }
|
||||||
|
{ "u_int64_t" "f_blocks" }
|
||||||
|
{ "u_int64_t" "f_bfree" }
|
||||||
|
{ "int64_t" "f_bavail" }
|
||||||
|
{ "u_int64_t" "f_files" }
|
||||||
|
{ "u_int64_t" "f_ffree" }
|
||||||
|
{ "int64_t" "f_favail" }
|
||||||
|
{ "u_int64_t" "f_syncwrites" }
|
||||||
|
{ "u_int64_t" "f_syncreads" }
|
||||||
|
{ "u_int64_t" "f_asyncwrites" }
|
||||||
|
{ "u_int64_t" "f_asyncreads" }
|
||||||
|
{ "fsid_t" "f_fsid" }
|
||||||
|
{ "u_int32_t" "f_namemax" }
|
||||||
|
{ "uid_t" "f_owner" }
|
||||||
|
{ "u_int32_t" "f_ctime" }
|
||||||
|
{ { "u_int32_t" 3 } "f_spare" }
|
||||||
|
{ { "char" MFSNAMELEN } "f_fstypename" }
|
||||||
|
{ { "char" MNAMELEN } "f_mntonname" }
|
||||||
|
{ { "char" MNAMELEN } "f_mntfromname" } ;
|
||||||
|
! { "mount_info" "mount_info" } ;
|
||||||
|
|
||||||
|
FUNCTION: int statfs ( char* path, statvfs* buf ) ;
|
|
@ -0,0 +1 @@
|
||||||
|
unportable
|
|
@ -8,6 +8,6 @@ os {
|
||||||
{ linux [ "unix.statfs.linux" require ] }
|
{ linux [ "unix.statfs.linux" require ] }
|
||||||
{ macosx [ "unix.statfs.macosx" require ] }
|
{ macosx [ "unix.statfs.macosx" require ] }
|
||||||
{ freebsd [ "unix.statfs.freebsd" require ] }
|
{ freebsd [ "unix.statfs.freebsd" require ] }
|
||||||
|
{ openbsd [ "unix.statfs.openbsd" require ] }
|
||||||
{ netbsd [ ] }
|
{ netbsd [ ] }
|
||||||
{ openbsd [ ] }
|
|
||||||
} case
|
} case
|
||||||
|
|
|
@ -5,6 +5,7 @@ IN: math.blas.cblas
|
||||||
{ [ os macosx? ] [ "libblas.dylib" "cdecl" add-library ] }
|
{ [ os macosx? ] [ "libblas.dylib" "cdecl" add-library ] }
|
||||||
{ [ os windows? ] [ "blas.dll" "cdecl" add-library ] }
|
{ [ os windows? ] [ "blas.dll" "cdecl" add-library ] }
|
||||||
{ [ os openbsd? ] [ "libcblas.so" "cdecl" add-library ] }
|
{ [ os openbsd? ] [ "libcblas.so" "cdecl" add-library ] }
|
||||||
|
{ [ os freebsd? ] [ "libcblas.so" "cdecl" add-library ] }
|
||||||
[ "libblas.so" "cdecl" add-library ]
|
[ "libblas.so" "cdecl" add-library ]
|
||||||
} cond >>
|
} cond >>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue