remove BSD,solaris,etc. misc platform support code

db4
Joe Groff 2011-11-02 17:13:31 -07:00
parent 7378ba7717
commit 8cf18d1a82
160 changed files with 251 additions and 1949 deletions

View File

@ -80,22 +80,13 @@ default:
help: help:
@echo "Run '$(MAKE)' with one of the following parameters:" @echo "Run '$(MAKE)' with one of the following parameters:"
@echo "" @echo ""
@echo "freebsd-x86-32"
@echo "freebsd-x86-64"
@echo "linux-x86-32" @echo "linux-x86-32"
@echo "linux-x86-64" @echo "linux-x86-64"
@echo "linux-ppc-32" @echo "linux-ppc-32"
@echo "linux-ppc-64" @echo "linux-ppc-64"
@echo "linux-arm" @echo "linux-arm"
@echo "openbsd-x86-32"
@echo "openbsd-x86-64"
@echo "netbsd-x86-32"
@echo "netbsd-x86-64"
@echo "macosx-x86-32" @echo "macosx-x86-32"
@echo "macosx-x86-64" @echo "macosx-x86-64"
@echo "macosx-ppc"
@echo "solaris-x86-32"
@echo "solaris-x86-64"
@echo "windows-x86-32" @echo "windows-x86-32"
@echo "windows-x86-64" @echo "windows-x86-64"
@echo "" @echo ""
@ -108,27 +99,6 @@ help:
ALL = factor factor-ffi-test factor-lib ALL = factor factor-ffi-test factor-lib
openbsd-x86-32:
$(MAKE) $(ALL) CONFIG=vm/Config.openbsd.x86.32
openbsd-x86-64:
$(MAKE) $(ALL) CONFIG=vm/Config.openbsd.x86.64
freebsd-x86-32:
$(MAKE) $(ALL) CONFIG=vm/Config.freebsd.x86.32
freebsd-x86-64:
$(MAKE) $(ALL) CONFIG=vm/Config.freebsd.x86.64
netbsd-x86-32:
$(MAKE) $(ALL) CONFIG=vm/Config.netbsd.x86.32
netbsd-x86-64:
$(MAKE) $(ALL) CONFIG=vm/Config.netbsd.x86.64
macosx-ppc:
$(MAKE) $(ALL) macosx.app CONFIG=vm/Config.macosx.ppc
macosx-x86-32: macosx-x86-32:
$(MAKE) $(ALL) macosx.app CONFIG=vm/Config.macosx.x86.32 $(MAKE) $(ALL) macosx.app CONFIG=vm/Config.macosx.x86.32
@ -150,12 +120,6 @@ linux-ppc-64:
linux-arm: linux-arm:
$(MAKE) $(ALL) CONFIG=vm/Config.linux.arm $(MAKE) $(ALL) CONFIG=vm/Config.linux.arm
solaris-x86-32:
$(MAKE) $(ALL) CONFIG=vm/Config.solaris.x86.32
solaris-x86-64:
$(MAKE) $(ALL) CONFIG=vm/Config.solaris.x86.64
windows-x86-32: windows-x86-32:
$(MAKE) $(ALL) CONFIG=vm/Config.windows.x86.32 $(MAKE) $(ALL) CONFIG=vm/Config.windows.x86.32
$(MAKE) factor-console CONFIG=vm/Config.windows.x86.32 $(MAKE) factor-console CONFIG=vm/Config.windows.x86.32

View File

@ -10,6 +10,6 @@ IN: alien.complex
<< <<
! This overrides the fact that small structures are never returned ! This overrides the fact that small structures are never returned
! in registers on NetBSD, Linux and Solaris running on 32-bit x86. ! in registers on Linux running on 32-bit x86.
\ complex-float lookup-c-type t >>return-in-registers? drop \ complex-float lookup-c-type t >>return-in-registers? drop
>> >>

View File

@ -755,7 +755,7 @@ MIXIN: empty-mixin
[ V{ double-array } ] [ [| | double-array{ } ] final-classes ] unit-test [ V{ double-array } ] [ [| | double-array{ } ] final-classes ] unit-test
[ V{ t } ] [ [ netbsd unix? ] final-literals ] unit-test [ V{ t } ] [ [ macosx unix? ] final-literals ] unit-test
[ V{ array } ] [ [ [ <=> ] sort [ <=> ] sort ] final-classes ] unit-test [ V{ array } ] [ [ [ <=> ] sort [ <=> ] sort ] final-classes ] unit-test

View File

@ -70,7 +70,7 @@ M: x86.32 return-struct-in-registers? ( c-type -- ? )
lookup-c-type lookup-c-type
[ return-in-registers?>> ] [ return-in-registers?>> ]
[ heap-size { 1 2 4 8 } member? ] bi [ heap-size { 1 2 4 8 } member? ] bi
os { linux netbsd solaris } member? not os linux? not
and or ; and or ;
! On x86, parameters are usually never passed in registers, ! On x86, parameters are usually never passed in registers,

View File

@ -4,13 +4,13 @@ USING: accessors alien.c-types alien.data arrays combinators
destructors gdk.pixbuf.ffi gobject.ffi grouping images destructors gdk.pixbuf.ffi gobject.ffi grouping images
images.loader io kernel locals math sequences images.loader io kernel locals math sequences
specialized-arrays ; specialized-arrays ;
FROM: system => os linux freebsd netbsd openbsd ; FROM: system => os linux? ;
IN: images.loader.gtk IN: images.loader.gtk
SPECIALIZED-ARRAY: uchar SPECIALIZED-ARRAY: uchar
SINGLETON: gtk-image SINGLETON: gtk-image
os { linux freebsd netbsd openbsd } member? [ os linux ? [
"png" gtk-image register-image-class "png" gtk-image register-image-class
"tif" gtk-image register-image-class "tif" gtk-image register-image-class
"tiff" gtk-image register-image-class "tiff" gtk-image register-image-class

View File

@ -1,2 +1,2 @@
linux linux
bsd macosx

View File

@ -1 +0,0 @@
Slava Pestov

View File

@ -1,9 +0,0 @@
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: namespaces system kernel accessors assocs continuations
unix io.backend io.backend.unix io.backend.unix.multiplexers
io.backend.unix.multiplexers.kqueue io.files.unix ;
IN: io.backend.unix.bsd
M: bsd init-io ( -- )
<kqueue-mx> mx set-global ;

View File

@ -1 +0,0 @@
bsd

View File

@ -1,3 +0,0 @@
USING: io.backend.unix.bsd io.backend system ;
freebsd set-io-backend

View File

@ -1 +0,0 @@
freebsd

View File

@ -1,9 +1,17 @@
! Copyright (C) 2008 Slava Pestov. ! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: io.backend system namespaces io.backend.unix.bsd USING: io.backend system namespaces
io.backend.unix.multiplexers io.backend.unix.multiplexers.run-loop ; io.backend.unix.multiplexers io.backend.unix.multiplexers.run-loop
kernel accessors assocs continuations unix io.backend.unix
io.backend.unix.multiplexers
io.backend.unix.multiplexers.kqueue io.files.unix ;
IN: io.backend.unix.macosx IN: io.backend.unix.macosx
SINGLETON: macosx-kqueue
M: macosx-kqueue init-io ( -- )
<kqueue-mx> mx set-global ;
M: macosx init-io ( -- ) M: macosx init-io ( -- )
<run-loop-mx> mx set-global ; <run-loop-mx> mx set-global ;

View File

@ -1 +1 @@
bsd macosx

View File

@ -1,3 +0,0 @@
USING: io.backend.unix.bsd io.backend system ;
netbsd set-io-backend

View File

@ -1 +0,0 @@
netbsd

View File

@ -1,3 +0,0 @@
USING: io.backend.unix.bsd io.backend system ;
openbsd set-io-backend

View File

@ -1 +0,0 @@
openbsd

View File

@ -1,18 +0,0 @@
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel alien.syntax math io.files.unix system
unix.stat accessors combinators calendar.unix
io.files.info.unix ;
IN: io.files.info.unix.bsd
TUPLE: bsd-file-info < unix-file-info birth-time flags gen ;
M: bsd new-file-info ( -- class ) bsd-file-info new ;
M: bsd stat>file-info ( stat -- file-info )
[ call-next-method ] keep
{
[ st_flags>> >>flags ]
[ st_gen>> >>gen ]
[ st_birthtimespec>> timespec>unix-time >>birth-time ]
} cleave ;

View File

@ -1 +0,0 @@
bsd

View File

@ -1,57 +0,0 @@
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien alien.c-types alien.syntax combinators
io.backend io.files io.files.info io.files.unix kernel math system unix
unix.statfs.freebsd unix.statvfs.freebsd unix.getfsstat.freebsd
sequences grouping alien.strings io.encodings.utf8 unix.types
arrays io.files.info.unix classes.struct specialized-arrays
alien.data ;
SPECIALIZED-ARRAY: statfs
IN: io.files.info.unix.freebsd
TUPLE: freebsd-file-system-info < unix-file-system-info
version io-size owner syncreads syncwrites asyncreads asyncwrites ;
M: freebsd new-file-system-info freebsd-file-system-info new ;
M: freebsd file-system-statfs ( path -- byte-array )
\ statfs <struct> [ statfs io-error ] keep ;
M: freebsd statfs>file-system-info ( file-system-info statvfs -- file-system-info )
{
[ f_version>> >>version ]
[ f_type>> >>type ]
[ f_flags>> >>flags ]
[ f_bsize>> >>block-size ]
[ f_iosize>> >>io-size ]
[ f_blocks>> >>blocks ]
[ f_bfree>> >>blocks-free ]
[ f_bavail>> >>blocks-available ]
[ f_files>> >>files ]
[ f_ffree>> >>files-free ]
[ f_syncwrites>> >>syncwrites ]
[ f_asyncwrites>> >>asyncwrites ]
[ f_syncreads>> >>syncreads ]
[ f_asyncreads>> >>asyncreads ]
[ f_namemax>> >>name-max ]
[ f_owner>> >>owner ]
[ f_fsid>> >>id ]
[ f_fstypename>> utf8 alien>string >>type ]
[ f_mntfromname>> utf8 alien>string >>device-name ]
[ f_mntonname>> utf8 alien>string >>mount-point ]
} cleave ;
M: freebsd file-system-statvfs ( path -- byte-array )
\ statvfs <struct> [ statvfs io-error ] keep ;
M: freebsd statvfs>file-system-info ( file-system-info statvfs -- file-system-info )
{
[ f_favail>> >>files-available ]
[ f_frsize>> >>preferred-block-size ]
} cleave ;
M: freebsd file-systems ( -- array )
f 0 0 getfsstat dup io-error
\ statfs <c-array>
[ dup byte-length 0 getfsstat io-error ]
[ [ f_mntonname>> utf8 alien>string file-system-info ] { } map-as ] bi ;

View File

@ -1 +0,0 @@
freebsd

View File

@ -1,14 +1,27 @@
! 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: accessors alien.c-types alien.data alien.strings USING: accessors alien.c-types alien.data alien.strings arrays
combinators grouping io.encodings.utf8 io.files kernel math calendar.unix classes.struct combinators grouping
sequences system unix io.files.unix arrays unix.statfs.macosx io.encodings.utf8 io.files io.files.info io.files.info.unix
unix.statvfs.macosx unix.getfsstat.macosx io.files.info.unix io.files.unix kernel math sequences specialized-arrays
io.files.info classes.struct specialized-arrays ; system unix unix.getfsstat.macosx unix.statfs.macosx
unix.statvfs.macosx ;
SPECIALIZED-ARRAY: uint SPECIALIZED-ARRAY: uint
SPECIALIZED-ARRAY: statfs64 SPECIALIZED-ARRAY: statfs64
IN: io.files.info.unix.macosx IN: io.files.info.unix.macosx
TUPLE: macosx-file-info < unix-file-info birth-time flags gen ;
M: macosx new-file-info ( -- class ) macosx-file-info new ;
M: macosx stat>file-info ( stat -- file-info )
[ call-next-method ] keep
{
[ st_flags>> >>flags ]
[ st_gen>> >>gen ]
[ st_birthtimespec>> timespec>unix-time >>birth-time ]
} cleave ;
TUPLE: macosx-file-system-info < unix-file-system-info TUPLE: macosx-file-system-info < unix-file-system-info
io-size owner type-id filesystem-subtype ; io-size owner type-id filesystem-subtype ;

View File

@ -1,53 +0,0 @@
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.syntax kernel unix.stat math unix
combinators system io.backend accessors alien.c-types
io.encodings.utf8 alien.strings unix.types io.files.unix
io.files io.files.info unix.statvfs.netbsd unix.getfsstat.netbsd arrays
grouping sequences io.encodings.utf8 classes.struct alien.data
specialized-arrays io.files.info.unix ;
SPECIALIZED-ARRAY: statvfs
IN: io.files.info.unix.netbsd
TUPLE: netbsd-file-system-info < unix-file-system-info
blocks-reserved files-reserved
owner io-size sync-reads sync-writes async-reads async-writes
idx mount-from ;
M: netbsd new-file-system-info netbsd-file-system-info new ;
M: netbsd file-system-statvfs
\ statvfs <struct> [ statvfs io-error ] keep ;
M: netbsd statvfs>file-system-info ( file-system-info statvfs -- file-system-info' )
{
[ f_flag>> >>flags ]
[ f_bsize>> >>block-size ]
[ f_frsize>> >>preferred-block-size ]
[ f_iosize>> >>io-size ]
[ f_blocks>> >>blocks ]
[ f_bfree>> >>blocks-free ]
[ f_bavail>> >>blocks-available ]
[ f_bresvd>> >>blocks-reserved ]
[ f_files>> >>files ]
[ f_ffree>> >>files-free ]
[ f_favail>> >>files-available ]
[ f_fresvd>> >>files-reserved ]
[ f_syncreads>> >>sync-reads ]
[ f_syncwrites>> >>sync-writes ]
[ f_asyncreads>> >>async-reads ]
[ f_asyncwrites>> >>async-writes ]
[ f_fsidx>> >>idx ]
[ f_fsid>> >>id ]
[ f_namemax>> >>name-max ]
[ f_owner>> >>owner ]
[ f_fstypename>> utf8 alien>string >>type ]
[ f_mntonname>> utf8 alien>string >>mount-point ]
[ f_mntfromname>> utf8 alien>string >>device-name ]
} cleave ;
M: netbsd file-systems ( -- array )
f 0 0 getvfsstat dup io-error
\ statvfs <c-array>
[ dup byte-length 0 getvfsstat io-error ]
[ [ f_mntonname>> utf8 alien>string file-system-info ] { } map-as ] bi ;

View File

@ -1 +0,0 @@
netbsd

View File

@ -1,54 +0,0 @@
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien alien.c-types alien.strings alien.syntax
combinators io.backend io.files io.files.info io.files.unix kernel math
sequences system unix unix.getfsstat.openbsd grouping
unix.statfs.openbsd unix.statvfs.openbsd unix.types
arrays io.files.info.unix classes.struct alien.data
specialized-arrays io.encodings.utf8 ;
SPECIALIZED-ARRAY: statfs
IN: io.files.unix.openbsd
TUPLE: openbsd-file-system-info < unix-file-system-info
io-size sync-writes sync-reads async-writes async-reads
owner ;
M: openbsd new-file-system-info openbsd-file-system-info new ;
M: openbsd file-system-statfs
\ statfs <struct> [ statfs io-error ] keep ;
M: openbsd statfs>file-system-info ( file-system-info statfs -- file-system-info' )
{
[ f_flags>> >>flags ]
[ f_bsize>> >>block-size ]
[ f_iosize>> >>io-size ]
[ f_blocks>> >>blocks ]
[ f_bfree>> >>blocks-free ]
[ f_bavail>> >>blocks-available ]
[ f_files>> >>files ]
[ f_ffree>> >>files-free ]
[ f_favail>> >>files-available ]
[ f_syncwrites>> >>sync-writes ]
[ f_syncreads>> >>sync-reads ]
[ f_asyncwrites>> >>async-writes ]
[ f_asyncreads>> >>async-reads ]
[ f_fsid>> >>id ]
[ f_namemax>> >>name-max ]
[ f_owner>> >>owner ]
[ f_fstypename>> utf8 alien>string >>type ]
[ f_mntonname>> utf8 alien>string >>mount-point ]
[ f_mntfromname>> utf8 alien>string >>device-name ]
} cleave ;
M: openbsd file-system-statvfs ( normalized-path -- statvfs )
\ statvfs <struct> [ statvfs io-error ] keep ;
M: openbsd statvfs>file-system-info ( file-system-info statvfs -- file-system-info' )
f_frsize>> >>preferred-block-size ;
M: openbsd file-systems ( -- seq )
f 0 0 getfsstat dup io-error
\ statfs <c-array>
[ dup byte-length 0 getfsstat io-error ]
[ [ f_mntonname>> utf8 alien>string file-system-info ] { } map-as ] bi ;

View File

@ -1 +0,0 @@
openbsd

View File

@ -78,5 +78,4 @@ SYMBOL: +rename-file+
{ [ os macosx? ] [ "io.monitors.macosx" require ] } { [ os macosx? ] [ "io.monitors.macosx" require ] }
{ [ os linux? ] [ "io.monitors.linux" require ] } { [ os linux? ] [ "io.monitors.linux" require ] }
{ [ os windows? ] [ "io.monitors.windows" require ] } { [ os windows? ] [ "io.monitors.windows" require ] }
{ [ os bsd? ] [ ] }
} cond } cond

View File

@ -22,7 +22,7 @@ HELP: realloc
HELP: memcpy HELP: memcpy
{ $values { "dst" c-ptr } { "src" c-ptr } { "size" "a non-negative integer" } } { $values { "dst" c-ptr } { "src" c-ptr } { "size" "a non-negative integer" } }
{ $description "Copies " { $snippet "size" } " bytes from " { $snippet "src" } " to " { $snippet "dst" } "." } { $description "Copies " { $snippet "size" } " bytes from " { $snippet "src" } " to " { $snippet "dst" } "." }
{ $warning "As per the BSD C library documentation, the behavior is undefined if the source and destination overlap." } ; { $warning "According to the BSD C library documentation, the behavior is undefined if the source and destination overlap." } ;
HELP: check-ptr HELP: check-ptr
{ $values { "c-ptr" "an alien address, byte array, or " { $link f } } } { $values { "c-ptr" "an alien address, byte array, or " { $link f } } }

View File

@ -110,80 +110,75 @@ os linux? cpu x86.64? and [
-1.0 3.0 /f double>bits -1.0 3.0 /f double>bits
] unit-test ] unit-test
! FP traps cause a kernel panic on OpenBSD 4.5 i386 : fp-trap-error? ( error -- ? )
os openbsd eq? cpu x86.32 eq? and [ 2 head { "kernel-error" 17 } = ;
: fp-trap-error? ( error -- ? ) : test-traps ( traps inputs quot -- quot' fail-quot )
2 head { "kernel-error" 17 } = ; append '[ _ _ with-fp-traps ] [ fp-trap-error? ] ;
: test-traps ( traps inputs quot -- quot' fail-quot ) : test-traps-compiled ( traps inputs quot -- quot' fail-quot )
append '[ _ _ with-fp-traps ] [ fp-trap-error? ] ; swapd '[ @ [ _ _ with-fp-traps ] compile-call ] [ fp-trap-error? ] ;
: test-traps-compiled ( traps inputs quot -- quot' fail-quot ) { +fp-zero-divide+ } [ 1.0 0.0 ] [ /f ] test-traps must-fail-with
swapd '[ @ [ _ _ with-fp-traps ] compile-call ] [ fp-trap-error? ] ; { +fp-inexact+ } [ 1.0 3.0 ] [ /f ] test-traps must-fail-with
{ +fp-invalid-operation+ } [ -1.0 ] [ fsqrt ] test-traps must-fail-with
{ +fp-overflow+ } [ 2.0 ] [ 100,000.0 ^ ] test-traps must-fail-with
{ +fp-underflow+ +fp-inexact+ } [ 2.0 ] [ -100,000.0 ^ ] test-traps must-fail-with
{ +fp-zero-divide+ } [ 1.0 0.0 ] [ /f ] test-traps must-fail-with { +fp-zero-divide+ } [ 1.0 0.0 ] [ /f ] test-traps-compiled must-fail-with
{ +fp-inexact+ } [ 1.0 3.0 ] [ /f ] test-traps must-fail-with { +fp-inexact+ } [ 1.0 3.0 ] [ /f ] test-traps-compiled must-fail-with
{ +fp-invalid-operation+ } [ -1.0 ] [ fsqrt ] test-traps must-fail-with { +fp-invalid-operation+ } [ -1.0 ] [ fsqrt ] test-traps-compiled must-fail-with
{ +fp-overflow+ } [ 2.0 ] [ 100,000.0 ^ ] test-traps must-fail-with { +fp-overflow+ } [ 2.0 ] [ 100,000.0 ^ ] test-traps-compiled must-fail-with
{ +fp-underflow+ +fp-inexact+ } [ 2.0 ] [ -100,000.0 ^ ] test-traps must-fail-with { +fp-underflow+ +fp-inexact+ } [ 2.0 ] [ -100,000.0 ^ ] test-traps-compiled must-fail-with
{ +fp-zero-divide+ } [ 1.0 0.0 ] [ /f ] test-traps-compiled must-fail-with ! Ensure ordered comparisons raise traps
{ +fp-inexact+ } [ 1.0 3.0 ] [ /f ] test-traps-compiled must-fail-with :: test-comparison-quot ( word -- quot )
{ +fp-invalid-operation+ } [ -1.0 ] [ fsqrt ] test-traps-compiled must-fail-with [
{ +fp-overflow+ } [ 2.0 ] [ 100,000.0 ^ ] test-traps-compiled must-fail-with { float float } declare
{ +fp-underflow+ +fp-inexact+ } [ 2.0 ] [ -100,000.0 ^ ] test-traps-compiled must-fail-with { +fp-invalid-operation+ } [ word execute ] with-fp-traps
] ;
! Ensure ordered comparisons raise traps : test-comparison ( inputs word -- quot fail-quot )
:: test-comparison-quot ( word -- quot ) test-comparison-quot append [ fp-trap-error? ] ;
[
{ float float } declare
{ +fp-invalid-operation+ } [ word execute ] with-fp-traps
] ;
: test-comparison ( inputs word -- quot fail-quot ) : test-comparison-compiled ( inputs word -- quot fail-quot )
test-comparison-quot append [ fp-trap-error? ] ; test-comparison-quot '[ @ _ compile-call ] [ fp-trap-error? ] ;
: test-comparison-compiled ( inputs word -- quot fail-quot ) \ float< "intrinsic" word-prop [
test-comparison-quot '[ @ _ compile-call ] [ fp-trap-error? ] ; [ 0/0. -15.0 ] \ < test-comparison must-fail-with
[ 0/0. -15.0 ] \ < test-comparison-compiled must-fail-with
[ -15.0 0/0. ] \ < test-comparison must-fail-with
[ -15.0 0/0. ] \ < test-comparison-compiled must-fail-with
[ 0/0. -15.0 ] \ <= test-comparison must-fail-with
[ 0/0. -15.0 ] \ <= test-comparison-compiled must-fail-with
[ -15.0 0/0. ] \ <= test-comparison must-fail-with
[ -15.0 0/0. ] \ <= test-comparison-compiled must-fail-with
[ 0/0. -15.0 ] \ > test-comparison must-fail-with
[ 0/0. -15.0 ] \ > test-comparison-compiled must-fail-with
[ -15.0 0/0. ] \ > test-comparison must-fail-with
[ -15.0 0/0. ] \ > test-comparison-compiled must-fail-with
[ 0/0. -15.0 ] \ >= test-comparison must-fail-with
[ 0/0. -15.0 ] \ >= test-comparison-compiled must-fail-with
[ -15.0 0/0. ] \ >= test-comparison must-fail-with
[ -15.0 0/0. ] \ >= test-comparison-compiled must-fail-with
\ float< "intrinsic" word-prop [ [ f ] [ 0/0. -15.0 ] \ u< test-comparison drop unit-test
[ 0/0. -15.0 ] \ < test-comparison must-fail-with [ f ] [ 0/0. -15.0 ] \ u< test-comparison-compiled drop unit-test
[ 0/0. -15.0 ] \ < test-comparison-compiled must-fail-with [ f ] [ -15.0 0/0. ] \ u< test-comparison drop unit-test
[ -15.0 0/0. ] \ < test-comparison must-fail-with [ f ] [ -15.0 0/0. ] \ u< test-comparison-compiled drop unit-test
[ -15.0 0/0. ] \ < test-comparison-compiled must-fail-with [ f ] [ 0/0. -15.0 ] \ u<= test-comparison drop unit-test
[ 0/0. -15.0 ] \ <= test-comparison must-fail-with [ f ] [ 0/0. -15.0 ] \ u<= test-comparison-compiled drop unit-test
[ 0/0. -15.0 ] \ <= test-comparison-compiled must-fail-with [ f ] [ -15.0 0/0. ] \ u<= test-comparison drop unit-test
[ -15.0 0/0. ] \ <= test-comparison must-fail-with [ f ] [ -15.0 0/0. ] \ u<= test-comparison-compiled drop unit-test
[ -15.0 0/0. ] \ <= test-comparison-compiled must-fail-with [ f ] [ 0/0. -15.0 ] \ u> test-comparison drop unit-test
[ 0/0. -15.0 ] \ > test-comparison must-fail-with [ f ] [ 0/0. -15.0 ] \ u> test-comparison-compiled drop unit-test
[ 0/0. -15.0 ] \ > test-comparison-compiled must-fail-with [ f ] [ -15.0 0/0. ] \ u> test-comparison drop unit-test
[ -15.0 0/0. ] \ > test-comparison must-fail-with [ f ] [ -15.0 0/0. ] \ u> test-comparison-compiled drop unit-test
[ -15.0 0/0. ] \ > test-comparison-compiled must-fail-with [ f ] [ 0/0. -15.0 ] \ u>= test-comparison drop unit-test
[ 0/0. -15.0 ] \ >= test-comparison must-fail-with [ f ] [ 0/0. -15.0 ] \ u>= test-comparison-compiled drop unit-test
[ 0/0. -15.0 ] \ >= test-comparison-compiled must-fail-with [ f ] [ -15.0 0/0. ] \ u>= test-comparison drop unit-test
[ -15.0 0/0. ] \ >= test-comparison must-fail-with [ f ] [ -15.0 0/0. ] \ u>= test-comparison-compiled drop unit-test
[ -15.0 0/0. ] \ >= test-comparison-compiled must-fail-with ] when
[ f ] [ 0/0. -15.0 ] \ u< test-comparison drop unit-test
[ f ] [ 0/0. -15.0 ] \ u< test-comparison-compiled drop unit-test
[ f ] [ -15.0 0/0. ] \ u< test-comparison drop unit-test
[ f ] [ -15.0 0/0. ] \ u< test-comparison-compiled drop unit-test
[ f ] [ 0/0. -15.0 ] \ u<= test-comparison drop unit-test
[ f ] [ 0/0. -15.0 ] \ u<= test-comparison-compiled drop unit-test
[ f ] [ -15.0 0/0. ] \ u<= test-comparison drop unit-test
[ f ] [ -15.0 0/0. ] \ u<= test-comparison-compiled drop unit-test
[ f ] [ 0/0. -15.0 ] \ u> test-comparison drop unit-test
[ f ] [ 0/0. -15.0 ] \ u> test-comparison-compiled drop unit-test
[ f ] [ -15.0 0/0. ] \ u> test-comparison drop unit-test
[ f ] [ -15.0 0/0. ] \ u> test-comparison-compiled drop unit-test
[ f ] [ 0/0. -15.0 ] \ u>= test-comparison drop unit-test
[ f ] [ 0/0. -15.0 ] \ u>= test-comparison-compiled drop unit-test
[ f ] [ -15.0 0/0. ] \ u>= test-comparison drop unit-test
[ f ] [ -15.0 0/0. ] \ u>= test-comparison-compiled drop unit-test
] when
] unless
! Ensure traps get cleared ! Ensure traps get cleared
[ 1/0. ] [ 1.0 0.0 /f ] unit-test [ 1/0. ] [ 1.0 0.0 /f ] unit-test

View File

@ -12,8 +12,6 @@ IN: openssl.libcrypto
<< <<
{ {
{ [ os openbsd? ] [ ] } ! VM is linked with it
{ [ os netbsd? ] [ ] }
{ [ os windows? ] [ "libcrypto" "libeay32.dll" cdecl add-library ] } { [ os windows? ] [ "libcrypto" "libeay32.dll" cdecl add-library ] }
{ [ os macosx? ] [ "libcrypto" "libcrypto.dylib" cdecl add-library ] } { [ os macosx? ] [ "libcrypto" "libcrypto.dylib" cdecl add-library ] }
{ [ os unix? ] [ "libcrypto" "libcrypto.so" cdecl add-library ] } { [ os unix? ] [ "libcrypto" "libcrypto.so" cdecl add-library ] }

View File

@ -8,8 +8,6 @@ quotations math.bitwise alien.libraries literals ;
IN: openssl.libssl IN: openssl.libssl
<< { << {
{ [ os openbsd? ] [ ] } ! VM is linked with it
{ [ os netbsd? ] [ ] }
{ [ os windows? ] [ "libssl" "ssleay32.dll" cdecl add-library ] } { [ os windows? ] [ "libssl" "ssleay32.dll" cdecl add-library ] }
{ [ os macosx? ] [ "libssl" "libssl.dylib" cdecl add-library ] } { [ os macosx? ] [ "libssl" "libssl.dylib" cdecl add-library ] }
{ [ os unix? ] [ "libssl" "libssl.so" cdecl add-library ] } { [ os unix? ] [ "libssl" "libssl.so" cdecl add-library ] }

View File

@ -14,14 +14,7 @@ M: unix-random dispose reader>> dispose ;
M: unix-random random-bytes* ( n tuple -- byte-array ) M: unix-random random-bytes* ( n tuple -- byte-array )
reader>> stream-read ; reader>> stream-read ;
os openbsd? [ [
[ "/dev/random" <unix-random> &dispose secure-random-generator set-global
"/dev/srandom" <unix-random> &dispose secure-random-generator set-global "/dev/urandom" <unix-random> &dispose system-random-generator set-global
"/dev/arandom" <unix-random> &dispose system-random-generator set-global ] "random.unix" add-startup-hook
] "random.unix" add-startup-hook
] [
[
"/dev/random" <unix-random> &dispose secure-random-generator set-global
"/dev/urandom" <unix-random> &dispose system-random-generator set-global
] "random.unix" add-startup-hook
] if

View File

@ -1,4 +1 @@
linux linux
freebsd
netbsd
openbsd

View File

@ -1 +0,0 @@
Slava Pestov

View File

@ -1,91 +0,0 @@
! Copyright (C) 2005, 2006 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types alien.syntax classes.struct combinators
system unix.types vocabs ;
IN: unix.ffi
CONSTANT: MAXPATHLEN 1024
CONSTANT: O_RDONLY HEX: 0000
CONSTANT: O_WRONLY HEX: 0001
CONSTANT: O_RDWR HEX: 0002
CONSTANT: O_NONBLOCK HEX: 0004
CONSTANT: O_APPEND HEX: 0008
CONSTANT: O_CREAT HEX: 0200
CONSTANT: O_TRUNC HEX: 0400
CONSTANT: O_EXCL HEX: 0800
CONSTANT: O_NOCTTY HEX: 20000
ALIAS: O_NDELAY O_NONBLOCK
CONSTANT: SOL_SOCKET HEX: ffff
CONSTANT: SO_REUSEADDR HEX: 4
CONSTANT: SO_OOBINLINE HEX: 100
CONSTANT: SO_SNDTIMEO HEX: 1005
CONSTANT: SO_RCVTIMEO HEX: 1006
CONSTANT: F_SETFD 2
CONSTANT: F_SETFL 4
CONSTANT: FD_CLOEXEC 1
STRUCT: sockaddr-in
{ len uchar }
{ family uchar }
{ port ushort }
{ addr in_addr_t }
{ unused longlong } ;
STRUCT: sockaddr-in6
{ len uchar }
{ family uchar }
{ port ushort }
{ flowinfo uint }
{ addr uchar[16] }
{ scopeid uint } ;
STRUCT: sockaddr-un
{ len uchar }
{ family uchar }
{ path char[104] } ;
STRUCT: passwd
{ pw_name c-string }
{ pw_passwd c-string }
{ pw_uid uid_t }
{ pw_gid gid_t }
{ pw_change time_t }
{ pw_class c-string }
{ pw_gecos c-string }
{ pw_dir c-string }
{ pw_shell c-string }
{ pw_expire time_t }
{ pw_fields int } ;
CONSTANT: max-un-path 104
CONSTANT: SOCK_STREAM 1
CONSTANT: SOCK_DGRAM 2
CONSTANT: SOCK_RAW 3
CONSTANT: AF_UNSPEC 0
CONSTANT: AF_UNIX 1
CONSTANT: AF_INET 2
ALIAS: PF_UNSPEC AF_UNSPEC
ALIAS: PF_UNIX AF_UNIX
ALIAS: PF_INET AF_INET
CONSTANT: IPPROTO_TCP 6
CONSTANT: IPPROTO_UDP 17
CONSTANT: AI_PASSIVE 1
CONSTANT: SEEK_SET 0
CONSTANT: SEEK_CUR 1
CONSTANT: SEEK_END 2
os {
{ macosx [ "unix.ffi.bsd.macosx" require ] }
{ freebsd [ "unix.ffi.bsd.freebsd" require ] }
{ openbsd [ "unix.ffi.bsd.openbsd" require ] }
{ netbsd [ "unix.ffi.bsd.netbsd" require ] }
} case

View File

@ -1,119 +0,0 @@
USING: alien.c-types alien.syntax classes.struct unix.types ;
IN: unix.ffi
CONSTANT: AF_INET6 28
ALIAS: PF_INET6 AF_INET6
CONSTANT: FD_SETSIZE 1024
STRUCT: addrinfo
{ flags int }
{ family int }
{ socktype int }
{ protocol int }
{ addrlen socklen_t }
{ canonname c-string }
{ addr void* }
{ next addrinfo* } ;
STRUCT: dirent
{ d_fileno u_int32_t }
{ d_reclen u_int16_t }
{ d_type u_int8_t }
{ d_namlen u_int8_t }
{ d_name char[256] } ;
CONSTANT: EPERM 1
CONSTANT: ENOENT 2
CONSTANT: ESRCH 3
CONSTANT: EINTR 4
CONSTANT: EIO 5
CONSTANT: ENXIO 6
CONSTANT: E2BIG 7
CONSTANT: ENOEXEC 8
CONSTANT: EBADF 9
CONSTANT: ECHILD 10
CONSTANT: EDEADLK 11
CONSTANT: ENOMEM 12
CONSTANT: EACCES 13
CONSTANT: EFAULT 14
CONSTANT: ENOTBLK 15
CONSTANT: EBUSY 16
CONSTANT: EEXIST 17
CONSTANT: EXDEV 18
CONSTANT: ENODEV 19
CONSTANT: ENOTDIR 20
CONSTANT: EISDIR 21
CONSTANT: EINVAL 22
CONSTANT: ENFILE 23
CONSTANT: EMFILE 24
CONSTANT: ENOTTY 25
CONSTANT: ETXTBSY 26
CONSTANT: EFBIG 27
CONSTANT: ENOSPC 28
CONSTANT: ESPIPE 29
CONSTANT: EROFS 30
CONSTANT: EMLINK 31
CONSTANT: EPIPE 32
CONSTANT: EDOM 33
CONSTANT: ERANGE 34
CONSTANT: EAGAIN 35
ALIAS: EWOULDBLOCK EAGAIN
CONSTANT: EINPROGRESS 36
CONSTANT: EALREADY 37
CONSTANT: ENOTSOCK 38
CONSTANT: EDESTADDRREQ 39
CONSTANT: EMSGSIZE 40
CONSTANT: EPROTOTYPE 41
CONSTANT: ENOPROTOOPT 42
CONSTANT: EPROTONOSUPPORT 43
CONSTANT: ESOCKTNOSUPPORT 44
CONSTANT: EOPNOTSUPP 45
ALIAS: ENOTSUP EOPNOTSUPP
CONSTANT: EPFNOSUPPORT 46
CONSTANT: EAFNOSUPPORT 47
CONSTANT: EADDRINUSE 48
CONSTANT: EADDRNOTAVAIL 49
CONSTANT: ENETDOWN 50
CONSTANT: ENETUNREACH 51
CONSTANT: ENETRESET 52
CONSTANT: ECONNABORTED 53
CONSTANT: ECONNRESET 54
CONSTANT: ENOBUFS 55
CONSTANT: EISCONN 56
CONSTANT: ENOTCONN 57
CONSTANT: ESHUTDOWN 58
CONSTANT: ETOOMANYREFS 59
CONSTANT: ETIMEDOUT 60
CONSTANT: ECONNREFUSED 61
CONSTANT: ELOOP 62
CONSTANT: ENAMETOOLONG 63
CONSTANT: EHOSTDOWN 64
CONSTANT: EHOSTUNREACH 65
CONSTANT: ENOTEMPTY 66
CONSTANT: EPROCLIM 67
CONSTANT: EUSERS 68
CONSTANT: EDQUOT 69
CONSTANT: ESTALE 70
CONSTANT: EREMOTE 71
CONSTANT: EBADRPC 72
CONSTANT: ERPCMISMATCH 73
CONSTANT: EPROGUNAVAIL 74
CONSTANT: EPROGMISMATCH 75
CONSTANT: EPROCUNAVAIL 76
CONSTANT: ENOLCK 77
CONSTANT: ENOSYS 78
CONSTANT: EFTYPE 79
CONSTANT: EAUTH 80
CONSTANT: ENEEDAUTH 81
CONSTANT: EIDRM 82
CONSTANT: ENOMSG 83
CONSTANT: EOVERFLOW 84
CONSTANT: ECANCELED 85
CONSTANT: EILSEQ 86
CONSTANT: ENOATTR 87
CONSTANT: EDOOFUS 88
CONSTANT: EBADMSG 89
CONSTANT: EMULTIHOP 90
CONSTANT: ENOLINK 91
CONSTANT: EPROTO 92

View File

@ -1 +0,0 @@
freebsd

View File

@ -1,167 +0,0 @@
USING: alien.syntax alien.c-types math vocabs.loader
classes.struct unix.types unix.time ;
IN: unix.ffi
CONSTANT: FD_SETSIZE 256
STRUCT: addrinfo
{ flags int }
{ family int }
{ socktype int }
{ protocol int }
{ addrlen socklen_t }
{ canonname c-string }
{ addr void* }
{ next addrinfo* } ;
STRUCT: dirent
{ d_fileno __uint32_t }
{ d_reclen __uint16_t }
{ d_type __uint8_t }
{ d_namlen __uint8_t }
{ d_name char[256] } ;
CONSTANT: EPERM 1
CONSTANT: ENOENT 2
CONSTANT: ESRCH 3
CONSTANT: EINTR 4
CONSTANT: EIO 5
CONSTANT: ENXIO 6
CONSTANT: E2BIG 7
CONSTANT: ENOEXEC 8
CONSTANT: EBADF 9
CONSTANT: ECHILD 10
CONSTANT: EDEADLK 11
CONSTANT: ENOMEM 12
CONSTANT: EACCES 13
CONSTANT: EFAULT 14
CONSTANT: ENOTBLK 15
CONSTANT: EBUSY 16
CONSTANT: EEXIST 17
CONSTANT: EXDEV 18
CONSTANT: ENODEV 19
CONSTANT: ENOTDIR 20
CONSTANT: EISDIR 21
CONSTANT: EINVAL 22
CONSTANT: ENFILE 23
CONSTANT: EMFILE 24
CONSTANT: ENOTTY 25
CONSTANT: ETXTBSY 26
CONSTANT: EFBIG 27
CONSTANT: ENOSPC 28
CONSTANT: ESPIPE 29
CONSTANT: EROFS 30
CONSTANT: EMLINK 31
CONSTANT: EPIPE 32
CONSTANT: EDOM 33
CONSTANT: ERANGE 34
CONSTANT: EAGAIN 35
ALIAS: EWOULDBLOCK EAGAIN
CONSTANT: EINPROGRESS 36
CONSTANT: EALREADY 37
CONSTANT: ENOTSOCK 38
CONSTANT: EDESTADDRREQ 39
CONSTANT: EMSGSIZE 40
CONSTANT: EPROTOTYPE 41
CONSTANT: ENOPROTOOPT 42
CONSTANT: EPROTONOSUPPORT 43
CONSTANT: ESOCKTNOSUPPORT 44
CONSTANT: EOPNOTSUPP 45
CONSTANT: EPFNOSUPPORT 46
CONSTANT: EAFNOSUPPORT 47
CONSTANT: EADDRINUSE 48
CONSTANT: EADDRNOTAVAIL 49
CONSTANT: ENETDOWN 50
CONSTANT: ENETUNREACH 51
CONSTANT: ENETRESET 52
CONSTANT: ECONNABORTED 53
CONSTANT: ECONNRESET 54
CONSTANT: ENOBUFS 55
CONSTANT: EISCONN 56
CONSTANT: ENOTCONN 57
CONSTANT: ESHUTDOWN 58
CONSTANT: ETOOMANYREFS 59
CONSTANT: ETIMEDOUT 60
CONSTANT: ECONNREFUSED 61
CONSTANT: ELOOP 62
CONSTANT: ENAMETOOLONG 63
CONSTANT: EHOSTDOWN 64
CONSTANT: EHOSTUNREACH 65
CONSTANT: ENOTEMPTY 66
CONSTANT: EPROCLIM 67
CONSTANT: EUSERS 68
CONSTANT: EDQUOT 69
CONSTANT: ESTALE 70
CONSTANT: EREMOTE 71
CONSTANT: EBADRPC 72
CONSTANT: ERPCMISMATCH 73
CONSTANT: EPROGUNAVAIL 74
CONSTANT: EPROGMISMATCH 75
CONSTANT: EPROCUNAVAIL 76
CONSTANT: ENOLCK 77
CONSTANT: ENOSYS 78
CONSTANT: EFTYPE 79
CONSTANT: EAUTH 80
CONSTANT: ENEEDAUTH 81
CONSTANT: EIDRM 82
CONSTANT: ENOMSG 83
CONSTANT: EOVERFLOW 84
CONSTANT: EILSEQ 85
CONSTANT: ENOTSUP 86
CONSTANT: ECANCELED 87
CONSTANT: EBADMSG 88
CONSTANT: ENODATA 89
CONSTANT: ENOSR 90
CONSTANT: ENOSTR 91
CONSTANT: ETIME 92
CONSTANT: ENOATTR 93
CONSTANT: EMULTIHOP 94
CONSTANT: ENOLINK 95
CONSTANT: EPROTO 96
CONSTANT: ELAST 96
TYPEDEF: __uint8_t sa_family_t
CONSTANT: _UTX_USERSIZE 32
CONSTANT: _UTX_LINESIZE 32
CONSTANT: _UTX_IDSIZE 4
CONSTANT: _UTX_HOSTSIZE 256
<<
CONSTANT: _SS_MAXSIZE 128
: _SS_ALIGNSIZE ( -- n )
__int64_t heap-size ; inline
: _SS_PAD1SIZE ( -- n )
_SS_ALIGNSIZE 2 - ; inline
: _SS_PAD2SIZE ( -- n )
_SS_MAXSIZE 2 - _SS_PAD1SIZE - _SS_ALIGNSIZE - ; inline
>>
STRUCT: sockaddr_storage
{ ss_len __uint8_t }
{ ss_family sa_family_t }
{ __ss_pad1 { char _SS_PAD1SIZE } }
{ __ss_align __int64_t }
{ __ss_pad2 { char _SS_PAD2SIZE } } ;
STRUCT: exit_struct
{ e_termination uint16_t }
{ e_exit uint16_t } ;
STRUCT: utmpx
{ ut_user { char _UTX_USERSIZE } }
{ ut_id { char _UTX_IDSIZE } }
{ ut_line { char _UTX_LINESIZE } }
{ ut_host { char _UTX_HOSTSIZE } }
{ ut_session uint16_t }
{ ut_type uint16_t }
{ ut_pid pid_t }
{ ut_exit exit_struct }
{ ut_ss sockaddr_storage }
{ ut_tv timeval }
{ ut_pad { uint32_t 10 } } ;

View File

@ -1 +0,0 @@
netbsd

View File

@ -1,114 +0,0 @@
USING: alien.c-types alien.syntax classes.struct unix.types ;
IN: unix.ffi
CONSTANT: AF_INET6 24
ALIAS: PF_INET6 AF_INET6
CONSTANT: FD_SETSIZE 1024
STRUCT: addrinfo
{ flags int }
{ family int }
{ socktype int }
{ protocol int }
{ addrlen socklen_t }
{ addr void* }
{ canonname c-string }
{ next addrinfo* } ;
STRUCT: dirent
{ d_fileno __uint32_t }
{ d_reclen __uint16_t }
{ d_type __uint8_t }
{ d_namlen __uint8_t }
{ d_name char[256] } ;
CONSTANT: EPERM 1
CONSTANT: ENOENT 2
CONSTANT: ESRCH 3
CONSTANT: EINTR 4
CONSTANT: EIO 5
CONSTANT: ENXIO 6
CONSTANT: E2BIG 7
CONSTANT: ENOEXEC 8
CONSTANT: EBADF 9
CONSTANT: ECHILD 10
CONSTANT: EDEADLK 11
CONSTANT: ENOMEM 12
CONSTANT: EACCES 13
CONSTANT: EFAULT 14
CONSTANT: ENOTBLK 15
CONSTANT: EBUSY 16
CONSTANT: EEXIST 17
CONSTANT: EXDEV 18
CONSTANT: ENODEV 19
CONSTANT: ENOTDIR 20
CONSTANT: EISDIR 21
CONSTANT: EINVAL 22
CONSTANT: ENFILE 23
CONSTANT: EMFILE 24
CONSTANT: ENOTTY 25
CONSTANT: ETXTBSY 26
CONSTANT: EFBIG 27
CONSTANT: ENOSPC 28
CONSTANT: ESPIPE 29
CONSTANT: EROFS 30
CONSTANT: EMLINK 31
CONSTANT: EPIPE 32
CONSTANT: EDOM 33
CONSTANT: ERANGE 34
CONSTANT: EAGAIN 35
ALIAS: EWOULDBLOCK EAGAIN
CONSTANT: EINPROGRESS 36
CONSTANT: EALREADY 37
CONSTANT: ENOTSOCK 38
CONSTANT: EDESTADDRREQ 39
CONSTANT: EMSGSIZE 40
CONSTANT: EPROTOTYPE 41
CONSTANT: ENOPROTOOPT 42
CONSTANT: EPROTONOSUPPORT 43
CONSTANT: ESOCKTNOSUPPORT 44
CONSTANT: EOPNOTSUPP 45
CONSTANT: EPFNOSUPPORT 46
CONSTANT: EAFNOSUPPORT 47
CONSTANT: EADDRINUSE 48
CONSTANT: EADDRNOTAVAIL 49
CONSTANT: ENETDOWN 50
CONSTANT: ENETUNREACH 51
CONSTANT: ENETRESET 52
CONSTANT: ECONNABORTED 53
CONSTANT: ECONNRESET 54
CONSTANT: ENOBUFS 55
CONSTANT: EISCONN 56
CONSTANT: ENOTCONN 57
CONSTANT: ESHUTDOWN 58
CONSTANT: ETOOMANYREFS 59
CONSTANT: ETIMEDOUT 60
CONSTANT: ECONNREFUSED 61
CONSTANT: ELOOP 62
CONSTANT: ENAMETOOLONG 63
CONSTANT: EHOSTDOWN 64
CONSTANT: EHOSTUNREACH 65
CONSTANT: ENOTEMPTY 66
CONSTANT: EPROCLIM 67
CONSTANT: EUSERS 68
CONSTANT: EDQUOT 69
CONSTANT: ESTALE 70
CONSTANT: EREMOTE 71
CONSTANT: EBADRPC 72
CONSTANT: ERPCMISMATCH 73
CONSTANT: EPROGUNAVAIL 74
CONSTANT: EPROGMISMATCH 75
CONSTANT: EPROCUNAVAIL 76
CONSTANT: ENOLCK 77
CONSTANT: ENOSYS 78
CONSTANT: EFTYPE 79
CONSTANT: EAUTH 80
CONSTANT: ENEEDAUTH 81
CONSTANT: EIPSEC 82
CONSTANT: ENOATTR 83
CONSTANT: EILSEQ 84
CONSTANT: ENOMEDIUM 85
CONSTANT: EMEDIUMTYPE 86
CONSTANT: EOVERFLOW 87
CONSTANT: ECANCELED 88

View File

@ -1 +0,0 @@
openbsd

View File

@ -1 +0,0 @@
bsd

View File

@ -1 +0,0 @@
*BSD/Mac OS X support

View File

@ -9,8 +9,7 @@ IN: unix.ffi
{ {
{ [ os linux? ] [ "unix.ffi.linux" require ] } { [ os linux? ] [ "unix.ffi.linux" require ] }
{ [ os bsd? ] [ "unix.ffi.bsd" require ] } { [ os macosx? ] [ "unix.ffi.macosx" require ] }
{ [ os solaris? ] [ "unix.ffi.solaris" require ] }
} cond } cond
>> >>

View File

@ -3,6 +3,85 @@ classes.struct combinators kernel system unix unix.time
unix.types vocabs vocabs.loader ; unix.types vocabs vocabs.loader ;
IN: unix.ffi IN: unix.ffi
CONSTANT: MAXPATHLEN 1024
CONSTANT: O_RDONLY HEX: 0000
CONSTANT: O_WRONLY HEX: 0001
CONSTANT: O_RDWR HEX: 0002
CONSTANT: O_NONBLOCK HEX: 0004
CONSTANT: O_APPEND HEX: 0008
CONSTANT: O_CREAT HEX: 0200
CONSTANT: O_TRUNC HEX: 0400
CONSTANT: O_EXCL HEX: 0800
CONSTANT: O_NOCTTY HEX: 20000
ALIAS: O_NDELAY O_NONBLOCK
CONSTANT: SOL_SOCKET HEX: ffff
CONSTANT: SO_REUSEADDR HEX: 4
CONSTANT: SO_OOBINLINE HEX: 100
CONSTANT: SO_SNDTIMEO HEX: 1005
CONSTANT: SO_RCVTIMEO HEX: 1006
CONSTANT: F_SETFD 2
CONSTANT: F_SETFL 4
CONSTANT: FD_CLOEXEC 1
STRUCT: sockaddr-in
{ len uchar }
{ family uchar }
{ port ushort }
{ addr in_addr_t }
{ unused longlong } ;
STRUCT: sockaddr-in6
{ len uchar }
{ family uchar }
{ port ushort }
{ flowinfo uint }
{ addr uchar[16] }
{ scopeid uint } ;
STRUCT: sockaddr-un
{ len uchar }
{ family uchar }
{ path char[104] } ;
STRUCT: passwd
{ pw_name c-string }
{ pw_passwd c-string }
{ pw_uid uid_t }
{ pw_gid gid_t }
{ pw_change time_t }
{ pw_class c-string }
{ pw_gecos c-string }
{ pw_dir c-string }
{ pw_shell c-string }
{ pw_expire time_t }
{ pw_fields int } ;
CONSTANT: max-un-path 104
CONSTANT: SOCK_STREAM 1
CONSTANT: SOCK_DGRAM 2
CONSTANT: SOCK_RAW 3
CONSTANT: AF_UNSPEC 0
CONSTANT: AF_UNIX 1
CONSTANT: AF_INET 2
ALIAS: PF_UNSPEC AF_UNSPEC
ALIAS: PF_UNIX AF_UNIX
ALIAS: PF_INET AF_INET
CONSTANT: IPPROTO_TCP 6
CONSTANT: IPPROTO_UDP 17
CONSTANT: AI_PASSIVE 1
CONSTANT: SEEK_SET 0
CONSTANT: SEEK_CUR 1
CONSTANT: SEEK_END 2
CONSTANT: FD_SETSIZE 1024 CONSTANT: FD_SETSIZE 1024
CONSTANT: AF_INET6 30 CONSTANT: AF_INET6 30
@ -22,7 +101,7 @@ CONSTANT: _UTX_USERSIZE 256
CONSTANT: _UTX_LINESIZE 32 CONSTANT: _UTX_LINESIZE 32
CONSTANT: _UTX_IDSIZE 4 CONSTANT: _UTX_IDSIZE 4
CONSTANT: _UTX_HOSTSIZE 256 CONSTANT: _UTX_HOSTSIZE 256
STRUCT: utmpx STRUCT: utmpx
{ ut_user { char _UTX_USERSIZE } } { ut_user { char _UTX_USERSIZE } }
{ ut_id { char _UTX_IDSIZE } } { ut_id { char _UTX_IDSIZE } }

View File

@ -1 +0,0 @@
Slava Pestov

View File

@ -1 +0,0 @@
solaris

View File

@ -1,81 +0,0 @@
! Copyright (C) 2006 Patrick Mauritz.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types alien.syntax system kernel layouts ;
IN: unix.ffi
! Solaris.
CONSTANT: O_RDONLY HEX: 0000
CONSTANT: O_WRONLY HEX: 0001
CONSTANT: O_RDWR HEX: 0002
CONSTANT: O_APPEND HEX: 0008
CONSTANT: O_CREAT HEX: 0100
CONSTANT: O_TRUNC HEX: 0200
CONSTANT: SEEK_END 2
CONSTANT: SOL_SOCKET HEX: ffff
: FD_SETSIZE ( -- n ) cell 4 = 1024 65536 ? ;
CONSTANT: SO_REUSEADDR 4
CONSTANT: SO_OOBINLINE HEX: 0100
CONSTANT: SO_SNDTIMEO HEX: 1005
CONSTANT: SO_RCVTIMEO HEX: 1006
CONSTANT: F_SETFL 4 ! set file status flags
CONSTANT: O_NONBLOCK HEX: 80 ! no delay
STRUCT: addrinfo
{ flags int }
{ family int }
{ socktype int }
{ protocol int }
! #ifdef __sparcv9
! int _ai_pad;
! #endif
{ addrlen int }
{ canonname c-string }
{ addr void* }
{ next void* } ;
STRUCT: sockaddr-in
{ family ushort }
{ port ushort }
{ addr in_addr_t }
{ unused longlong } ;
STRUCT: sockaddr-in6
{ family ushort }
{ port ushort }
{ flowinfo uint }
{ addr uchar[16] }
{ scopeid uint } ;
CONSTANT: max-un-path 108
STRUCT: sockaddr-un
{ family ushort }
{ path { "char" max-un-path } } ;
CONSTANT: EINTR 4
CONSTANT: EAGAIN 11
CONSTANT: EINPROGRESS 150
CONSTANT: SOCK_STREAM 2
CONSTANT: SOCK_DGRAM 1
CONSTANT: AF_UNSPEC 0
CONSTANT: AF_UNIX 1
CONSTANT: AF_INET 2
CONSTANT: AF_INET6 26
ALIAS: PF_UNSPEC AF_UNSPEC
ALIAS: PF_UNIX AF_UNIX
ALIAS: PF_INET AF_INET
ALIAS: PF_INET6 AF_INET6
CONSTANT: IPPROTO_TCP 6
CONSTANT: IPPROTO_UDP 17
CONSTANT: AI_PASSIVE 8

View File

@ -1,11 +0,0 @@
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types alien.syntax unix.statfs.freebsd ;
IN: unix.getfsstat.freebsd
CONSTANT: MNT_WAIT 1 ! synchronously wait for I/O to complete
CONSTANT: MNT_NOWAIT 2 ! start all I/O, but do not wait for it
CONSTANT: MNT_LAZY 3 ! push data not written by filesystem syncer
CONSTANT: MNT_SUSPEND 4 ! Suspend file system after sync
FUNCTION: int getfsstat ( statfs* buf, int bufsize, int flags ) ;

View File

@ -1 +0,0 @@
freebsd

View File

@ -1 +0,0 @@
Doug Coleman

View File

@ -1,10 +0,0 @@
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types alien.syntax unix.statvfs.netbsd ;
IN: unix.getfsstat.netbsd
CONSTANT: MNT_WAIT 1 ! synchronously wait for I/O to complete
CONSTANT: MNT_NOWAIT 2 ! start all I/O, but do not wait for it
CONSTANT: MNT_LAZY 3 ! push data not written by filesystem syncer
FUNCTION: int getvfsstat ( statvfs* buf, int bufsize, int flags ) ;

View File

@ -1 +0,0 @@
netbsd

View File

@ -1 +0,0 @@
Doug Coleman

View File

@ -1,10 +0,0 @@
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types alien.syntax unix.statfs.openbsd ;
IN: unix.getfsstat.openbsd
CONSTANT: MNT_WAIT 1 ! synchronously wait for I/O to complete
CONSTANT: MNT_NOWAIT 2 ! start all I/O, but do not wait for it
CONSTANT: MNT_LAZY 3 ! push data not written by filesystem syncer
FUNCTION: int getfsstat ( statfs* buf, int bufsize, int flags ) ;

View File

@ -1 +0,0 @@
openbsd

View File

@ -1,22 +0,0 @@
USING: alien.c-types alien.syntax classes.struct unix.time ;
IN: unix.kqueue
STRUCT: kevent
{ ident ulong }
{ filter short }
{ flags ushort }
{ fflags uint }
{ data long }
{ udata void* } ;
FUNCTION: int kevent ( int kq, kevent* changelist, int nchanges, kevent* eventlist, int nevents, timespec* timeout ) ;
CONSTANT: EVFILT_READ -1
CONSTANT: EVFILT_WRITE -2
CONSTANT: EVFILT_AIO -3 ! attached to aio requests
CONSTANT: EVFILT_VNODE -4 ! attached to vnodes
CONSTANT: EVFILT_PROC -5 ! attached to struct proc
CONSTANT: EVFILT_SIGNAL -6 ! attached to struct proc
CONSTANT: EVFILT_TIMER -7 ! timers
CONSTANT: EVFILT_NETDEV -8 ! Mach ports
CONSTANT: EVFILT_FS -9 ! Filesystem events

View File

@ -1 +0,0 @@
freebsd

View File

@ -1,21 +0,0 @@
USING: alien.c-types alien.syntax classes.struct unix.time ;
IN: unix.kqueue
STRUCT: kevent
{ ident ulong }
{ filter uint }
{ flags uint }
{ fflags uint }
{ data longlong }
{ udata void* } ;
FUNCTION: int kevent ( int kq, kevent* changelist, size_t nchanges, kevent* eventlist, size_t nevents, timespec* timeout ) ;
CONSTANT: EVFILT_READ 0
CONSTANT: EVFILT_WRITE 1
CONSTANT: EVFILT_AIO 2 ! attached to aio requests
CONSTANT: EVFILT_VNODE 3 ! attached to vnodes
CONSTANT: EVFILT_PROC 4 ! attached to struct proc
CONSTANT: EVFILT_SIGNAL 5 ! attached to struct proc
CONSTANT: EVFILT_TIMER 6 ! timers
CONSTANT: EVFILT_SYSCOUNT 7 ! Filesystem events

View File

@ -1 +0,0 @@
netbsd

View File

@ -1,20 +0,0 @@
USING: alien.c-types alien.syntax classes.struct unix.time ;
IN: unix.kqueue
STRUCT: kevent
{ ident uint }
{ filter short }
{ flags ushort }
{ fflags uint }
{ data int }
{ udata void* } ;
FUNCTION: int kevent ( int kq, kevent* changelist, int nchanges, kevent* eventlist, int nevents, timespec* timeout ) ;
CONSTANT: EVFILT_READ -1
CONSTANT: EVFILT_WRITE -2
CONSTANT: EVFILT_AIO -3 ! attached to aio requests
CONSTANT: EVFILT_VNODE -4 ! attached to vnodes
CONSTANT: EVFILT_PROC -5 ! attached to struct proc
CONSTANT: EVFILT_SIGNAL -6 ! attached to struct proc
CONSTANT: EVFILT_TIMER -7 ! timers

View File

@ -1 +0,0 @@
openbsd

View File

@ -1 +1 @@
bsd macosx

View File

@ -1,29 +0,0 @@
USING: kernel alien.c-types alien.syntax math classes.struct
unix.time unix.types ;
IN: unix.stat
! FreeBSD 8.0-CURRENT
STRUCT: stat
{ st_dev __dev_t }
{ st_ino ino_t }
{ st_mode mode_t }
{ st_nlink nlink_t }
{ st_uid uid_t }
{ st_gid gid_t }
{ st_rdev __dev_t }
{ st_atimespec timespec }
{ st_mtimespec timespec }
{ st_ctimespec timespec }
{ st_size off_t }
{ st_blocks blkcnt_t }
{ st_blksize blksize_t }
{ st_flags fflags_t }
{ st_gen __uint32_t }
{ st_lspare __int32_t }
{ st_birthtimespec timespec }
{ pad0 __int32_t[2] } ;
FUNCTION: int stat ( c-string pathname, stat* buf ) ;
FUNCTION: int lstat ( c-string pathname, stat* buf ) ;
FUNCTION: int fstat ( int fd, stat* buf ) ;

View File

@ -1 +0,0 @@
freebsd

View File

@ -1,32 +0,0 @@
USING: kernel alien.c-types alien.syntax math classes.struct
unix.time unix.types ;
IN: unix.stat
! NetBSD 4.0
STRUCT: stat
{ st_dev dev_t }
{ st_mode mode_t }
{ st_ino ino_t }
{ st_nlink nlink_t }
{ st_uid uid_t }
{ st_gid gid_t }
{ st_rdev dev_t }
{ st_atimespec timespec }
{ st_mtimespec timespec }
{ st_ctimespec timespec }
{ st_birthtimespec timespec }
{ st_size off_t }
{ st_blocks blkcnt_t }
{ st_blksize blksize_t }
{ st_flags uint32_t }
{ st_gen uint32_t }
{ st_qspare uint32_t[2] } ;
FUNCTION: int __stat30 ( c-string pathname, stat* buf ) ;
FUNCTION: int __lstat30 ( c-string pathname, stat* buf ) ;
FUNCTION: int __fstat30 ( int fd, stat* buf ) ;
: stat ( pathname buf -- n ) __stat30 ;
: lstat ( pathname buf -- n ) __lstat30 ;
: fstat ( fd buf -- n ) __fstat30 ;

View File

@ -1 +0,0 @@
not loaded

View File

@ -1,32 +0,0 @@
USING: kernel alien.c-types alien.syntax math classes.struct
unix.time unix.types ;
IN: unix.stat
! NetBSD 4.0
STRUCT: stat
{ st_dev dev_t }
{ st_ino ino_t }
{ st_mode mode_t }
{ st_nlink nlink_t }
{ st_uid uid_t }
{ st_gid gid_t }
{ st_rdev dev_t }
{ st_atimespec timespec }
{ st_mtimespec timespec }
{ st_ctimespec timespec }
{ st_size off_t }
{ st_blocks blkcnt_t }
{ st_blksize blksize_t }
{ st_flags uint32_t }
{ st_gen uint32_t }
{ st_spare0 uint32_t }
{ st_birthtimespec timespec } ;
FUNCTION: int __stat13 ( c-string pathname, stat* buf ) ;
FUNCTION: int __lstat13 ( c-string pathname, stat* buf ) ;
FUNCTION: int __fstat13 ( int fd, stat* buf ) ;
: stat ( pathname buf -- n ) __stat13 ;
: lstat ( pathname buf -- n ) __lstat13 ;
: fstat ( fd buf -- n ) __fstat13 ;

View File

@ -1 +0,0 @@
not loaded

View File

@ -1,8 +0,0 @@
USING: layouts combinators vocabs alien.syntax ;
IN: unix.stat
cell-bits {
{ 32 [ "unix.stat.netbsd.32" require ] }
{ 64 [ "unix.stat.netbsd.64" require ] }
} case

View File

@ -1 +0,0 @@
netbsd

View File

@ -1,30 +0,0 @@
USING: kernel alien.c-types alien.syntax math classes.struct
unix.time unix.types ;
IN: unix.stat
! OpenBSD 4.2
STRUCT: stat
{ st_dev dev_t }
{ st_ino ino_t }
{ st_mode mode_t }
{ st_nlink nlink_t }
{ st_uid uid_t }
{ st_gid gid_t }
{ st_rdev dev_t }
{ st_lspare0 int32_t }
{ st_atimespec timespec }
{ st_mtimespec timespec }
{ st_ctimespec timespec }
{ st_size off_t }
{ st_blocks int64_t }
{ st_blksize u_int32_t }
{ st_flags u_int32_t }
{ st_gen u_int32_t }
{ st_lspare1 int32_t }
{ st_birthtimespec timespec }
{ st_qspare int64_t[2] } ;
FUNCTION: int stat ( c-string pathname, stat* buf ) ;
FUNCTION: int lstat ( c-string pathname, stat* buf ) ;
FUNCTION: int fstat ( int fd, stat* buf ) ;

View File

@ -1 +0,0 @@
openbsd

View File

@ -24,9 +24,6 @@ TYPEDEF: fsid fsid_t
<< os { << os {
{ linux [ "unix.stat.linux" require ] } { linux [ "unix.stat.linux" require ] }
{ macosx [ "unix.stat.macosx" require ] } { macosx [ "unix.stat.macosx" require ] }
{ freebsd [ "unix.stat.freebsd" require ] }
{ netbsd [ "unix.stat.netbsd" require ] }
{ openbsd [ "unix.stat.openbsd" require ] }
} case >> } case >>
: file-status ( pathname -- stat ) : file-status ( pathname -- stat )

View File

@ -1 +0,0 @@
Doug Coleman

View File

@ -1,34 +0,0 @@
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.syntax alien.c-types unix.types unix.stat classes.struct ;
IN: unix.statfs.freebsd
CONSTANT: MFSNAMELEN 16 ! length of type name including null */
CONSTANT: MNAMELEN 88 ! size of on/from name bufs
CONSTANT: STATFS_VERSION HEX: 20030518 ! current version number
STRUCT: statfs
{ f_version uint32_t }
{ f_type uint32_t }
{ f_flags uint64_t }
{ f_bsize uint64_t }
{ f_iosize uint64_t }
{ f_blocks uint64_t }
{ f_bfree uint64_t }
{ f_bavail int64_t }
{ f_files uint64_t }
{ f_ffree int64_t }
{ f_syncwrites uint64_t }
{ f_asyncwrites uint64_t }
{ f_syncreads uint64_t }
{ f_asyncreads uint64_t }
{ f_spare uint64_t[10] }
{ f_namemax uint32_t }
{ f_owner uid_t }
{ f_fsid fsid_t }
{ f_charspare char[80] }
{ f_fstypename { char MFSNAMELEN } }
{ f_mntfromname { char MNAMELEN } }
{ f_mntonname { char MNAMELEN } } ;
FUNCTION: int statfs ( c-string path, statfs* buf ) ;

View File

@ -1 +0,0 @@
freebsd

View File

@ -1,34 +0,0 @@
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types alien.syntax unix.types classes.struct
unix.stat ;
IN: unix.statfs.openbsd
CONSTANT: MFSNAMELEN 16
CONSTANT: MNAMELEN 90
STRUCT: statfs
{ f_flags u_int32_t }
{ f_bsize u_int32_t }
{ f_iosize u_int32_t }
{ f_blocks u_int64_t }
{ f_bfree u_int64_t }
{ f_bavail int64_t }
{ f_files u_int64_t }
{ f_ffree u_int64_t }
{ f_favail int64_t }
{ f_syncwrites u_int64_t }
{ f_syncreads u_int64_t }
{ f_asyncwrites u_int64_t }
{ f_asyncreads u_int64_t }
{ f_fsid fsid_t }
{ f_namemax u_int32_t }
{ f_owner uid_t }
{ f_ctime u_int32_t }
{ f_spare u_int32_t[3] }
{ f_fstypename { char MFSNAMELEN } }
{ f_mntonname { char MNAMELEN } }
{ f_mntfromname { char MNAMELEN } }
{ mount_info char[160] } ;
FUNCTION: int statfs ( c-string path, statfs* buf ) ;

View File

@ -1 +0,0 @@
openbsd

View File

@ -1 +0,0 @@
Doug Coleman

View File

@ -1,23 +0,0 @@
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types alien.syntax classes.struct unix.types ;
IN: unix.statvfs.freebsd
STRUCT: statvfs
{ f_bavail fsblkcnt_t }
{ f_bfree fsblkcnt_t }
{ f_blocks fsblkcnt_t }
{ f_favail fsfilcnt_t }
{ f_ffree fsfilcnt_t }
{ f_files fsfilcnt_t }
{ f_bsize ulong }
{ f_flag ulong }
{ f_frsize ulong }
{ f_fsid ulong }
{ f_namemax ulong } ;
! Flags
CONSTANT: ST_RDONLY HEX: 1 ! Read-only file system
CONSTANT: ST_NOSUID HEX: 2 ! Does not honor setuid/setgid
FUNCTION: int statvfs ( c-string path, statvfs* buf ) ;

View File

@ -1 +0,0 @@
freebsd

View File

@ -1 +0,0 @@
Doug Coleman

View File

@ -1,36 +0,0 @@
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types alien.syntax classes.struct unix.types
unix.stat ;
IN: unix.statvfs.netbsd
CONSTANT: _VFS_NAMELEN 32
CONSTANT: _VFS_MNAMELEN 1024
STRUCT: statvfs
{ f_flag ulong }
{ f_bsize ulong }
{ f_frsize ulong }
{ f_iosize ulong }
{ f_blocks fsblkcnt_t }
{ f_bfree fsblkcnt_t }
{ f_bavail fsblkcnt_t }
{ f_bresvd fsblkcnt_t }
{ f_files fsfilcnt_t }
{ f_ffree fsfilcnt_t }
{ f_favail fsfilcnt_t }
{ f_fresvd fsfilcnt_t }
{ f_syncreads uint64_t }
{ f_syncwrites uint64_t }
{ f_asyncreads uint64_t }
{ f_asyncwrites uint64_t }
{ f_fsidx fsid_t }
{ f_fsid ulong }
{ f_namemax ulong }
{ f_owner uid_t }
{ f_spare uint32_t[4] }
{ f_fstypename { char _VFS_NAMELEN } }
{ f_mntonname { char _VFS_MNAMELEN } }
{ f_mntfromname { char _VFS_MNAMELEN } } ;
FUNCTION: int statvfs ( c-string path, statvfs* buf ) ;

View File

@ -1 +0,0 @@
netbsd

View File

@ -1 +0,0 @@
Doug Coleman

View File

@ -1,22 +0,0 @@
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types alien.syntax classes.struct unix.types ;
IN: unix.statvfs.openbsd
STRUCT: statvfs
{ f_bsize ulong }
{ f_frsize ulong }
{ f_blocks fsblkcnt_t }
{ f_bfree fsblkcnt_t }
{ f_bavail fsblkcnt_t }
{ f_files fsfilcnt_t }
{ f_ffree fsfilcnt_t }
{ f_favail fsfilcnt_t }
{ f_fsid ulong }
{ f_flag ulong }
{ f_namemax ulong } ;
CONSTANT: ST_RDONLY 1
CONSTANT: ST_NOSUID 2
FUNCTION: int statvfs ( c-string path, statvfs* buf ) ;

View File

@ -1 +0,0 @@
openbsd

View File

@ -6,7 +6,4 @@ IN: unix.statvfs
os { os {
{ linux [ "unix.statvfs.linux" require ] } { linux [ "unix.statvfs.linux" require ] }
{ macosx [ "unix.statvfs.macosx" require ] } { macosx [ "unix.statvfs.macosx" require ] }
{ freebsd [ "unix.statvfs.freebsd" require ] }
{ netbsd [ "unix.statvfs.netbsd" require ] }
{ openbsd [ "unix.statvfs.openbsd" require ] }
} case } case

View File

@ -1,24 +0,0 @@
USING: alien.syntax alien.c-types ;
IN: unix.types
! FreeBSD 7 x86.32
TYPEDEF: ushort __uint16_t
TYPEDEF: uint __uint32_t
TYPEDEF: int __int32_t
TYPEDEF: longlong __int64_t
TYPEDEF: __uint32_t __dev_t
TYPEDEF: __uint32_t ino_t
TYPEDEF: __uint16_t mode_t
TYPEDEF: __uint16_t nlink_t
TYPEDEF: __uint32_t uid_t
TYPEDEF: __uint32_t gid_t
TYPEDEF: __int64_t off_t
TYPEDEF: __int64_t blkcnt_t
TYPEDEF: __uint32_t blksize_t
TYPEDEF: __uint32_t fflags_t
TYPEDEF: long ssize_t
TYPEDEF: int pid_t
TYPEDEF: long time_t

View File

@ -1 +0,0 @@
freebsd

View File

@ -1,6 +0,0 @@
USING: alien.syntax ;
IN: unix.types
! NetBSD 4.0
TYPEDEF: __uint64_t ino_t

View File

@ -1 +0,0 @@
not loaded

View File

@ -1,6 +0,0 @@
USING: alien.syntax ;
IN: unix.types
! NetBSD 4.0
TYPEDEF: __uint32_t ino_t

View File

@ -1 +0,0 @@
not loaded

View File

@ -1,24 +0,0 @@
USING: alien.syntax alien.c-types combinators layouts vocabs ;
IN: unix.types
! NetBSD 4.0
TYPEDEF: __uint32_t __dev_t
TYPEDEF: __uint32_t dev_t
TYPEDEF: __uint32_t mode_t
TYPEDEF: __uint32_t nlink_t
TYPEDEF: __uint32_t uid_t
TYPEDEF: __uint32_t __uid_t
TYPEDEF: __uint32_t gid_t
TYPEDEF: __int64_t off_t
TYPEDEF: __int64_t blkcnt_t
TYPEDEF: __uint32_t blksize_t
TYPEDEF: long ssize_t
TYPEDEF: int pid_t
TYPEDEF: int time_t
cell-bits {
{ 32 [ "unix.types.netbsd.32" require ] }
{ 64 [ "unix.types.netbsd.64" require ] }
} case

View File

@ -1 +0,0 @@
netbsd

View File

@ -1,19 +0,0 @@
USING: alien.syntax alien.c-types ;
IN: unix.types
! OpenBSD 4.2
TYPEDEF: __uint32_t __dev_t
TYPEDEF: __uint32_t dev_t
TYPEDEF: __uint32_t ino_t
TYPEDEF: __uint32_t mode_t
TYPEDEF: __uint32_t nlink_t
TYPEDEF: __uint32_t uid_t
TYPEDEF: __uint32_t gid_t
TYPEDEF: __int64_t off_t
TYPEDEF: __int64_t blkcnt_t
TYPEDEF: __uint32_t blksize_t
TYPEDEF: __uint32_t fflags_t
TYPEDEF: long ssize_t
TYPEDEF: int pid_t
TYPEDEF: int time_t

View File

@ -1 +0,0 @@
openbsd

Some files were not shown because too many files have changed in this diff Show More