diff --git a/GNUmakefile b/GNUmakefile index ea0ee832de..6582f743fc 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -80,22 +80,13 @@ default: help: @echo "Run '$(MAKE)' with one of the following parameters:" @echo "" - @echo "freebsd-x86-32" - @echo "freebsd-x86-64" @echo "linux-x86-32" @echo "linux-x86-64" @echo "linux-ppc-32" @echo "linux-ppc-64" @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-64" - @echo "macosx-ppc" - @echo "solaris-x86-32" - @echo "solaris-x86-64" @echo "windows-x86-32" @echo "windows-x86-64" @echo "" @@ -108,27 +99,6 @@ help: 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: $(MAKE) $(ALL) macosx.app CONFIG=vm/Config.macosx.x86.32 @@ -150,12 +120,6 @@ linux-ppc-64: 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: $(MAKE) $(ALL) CONFIG=vm/Config.windows.x86.32 $(MAKE) factor-console CONFIG=vm/Config.windows.x86.32 diff --git a/basis/alien/complex/complex.factor b/basis/alien/complex/complex.factor index eb28d95b5e..bb9d469b86 100644 --- a/basis/alien/complex/complex.factor +++ b/basis/alien/complex/complex.factor @@ -10,6 +10,6 @@ IN: alien.complex << ! 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 >> diff --git a/basis/compiler/tree/propagation/propagation-tests.factor b/basis/compiler/tree/propagation/propagation-tests.factor index 91706e53d4..facff988e5 100644 --- a/basis/compiler/tree/propagation/propagation-tests.factor +++ b/basis/compiler/tree/propagation/propagation-tests.factor @@ -755,7 +755,7 @@ MIXIN: empty-mixin [ 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 diff --git a/basis/cpu/x86/32/32.factor b/basis/cpu/x86/32/32.factor index eba669b909..019b1875fe 100755 --- a/basis/cpu/x86/32/32.factor +++ b/basis/cpu/x86/32/32.factor @@ -70,7 +70,7 @@ M: x86.32 return-struct-in-registers? ( c-type -- ? ) lookup-c-type [ return-in-registers?>> ] [ heap-size { 1 2 4 8 } member? ] bi - os { linux netbsd solaris } member? not + os linux? not and or ; ! On x86, parameters are usually never passed in registers, diff --git a/basis/images/loader/gtk/gtk.factor b/basis/images/loader/gtk/gtk.factor index c395bca5ab..9204b64442 100644 --- a/basis/images/loader/gtk/gtk.factor +++ b/basis/images/loader/gtk/gtk.factor @@ -4,13 +4,13 @@ USING: accessors alien.c-types alien.data arrays combinators destructors gdk.pixbuf.ffi gobject.ffi grouping images images.loader io kernel locals math sequences specialized-arrays ; -FROM: system => os linux freebsd netbsd openbsd ; +FROM: system => os linux? ; IN: images.loader.gtk SPECIALIZED-ARRAY: uchar SINGLETON: gtk-image -os { linux freebsd netbsd openbsd } member? [ +os linux ? [ "png" gtk-image register-image-class "tif" gtk-image register-image-class "tiff" gtk-image register-image-class diff --git a/basis/images/loader/gtk/platforms.txt b/basis/images/loader/gtk/platforms.txt index a26481a4e1..9603130824 100644 --- a/basis/images/loader/gtk/platforms.txt +++ b/basis/images/loader/gtk/platforms.txt @@ -1,2 +1,2 @@ linux -bsd +macosx diff --git a/basis/io/backend/unix/bsd/authors.txt b/basis/io/backend/unix/bsd/authors.txt deleted file mode 100755 index 1901f27a24..0000000000 --- a/basis/io/backend/unix/bsd/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Slava Pestov diff --git a/basis/io/backend/unix/bsd/bsd.factor b/basis/io/backend/unix/bsd/bsd.factor deleted file mode 100644 index 209d1ab1e0..0000000000 --- a/basis/io/backend/unix/bsd/bsd.factor +++ /dev/null @@ -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 ( -- ) - mx set-global ; diff --git a/basis/io/backend/unix/bsd/platforms.txt b/basis/io/backend/unix/bsd/platforms.txt deleted file mode 100644 index df796f15d4..0000000000 --- a/basis/io/backend/unix/bsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -bsd diff --git a/basis/io/backend/unix/freebsd/freebsd.factor b/basis/io/backend/unix/freebsd/freebsd.factor deleted file mode 100644 index 1c0471b330..0000000000 --- a/basis/io/backend/unix/freebsd/freebsd.factor +++ /dev/null @@ -1,3 +0,0 @@ -USING: io.backend.unix.bsd io.backend system ; - -freebsd set-io-backend diff --git a/basis/io/backend/unix/freebsd/platforms.txt b/basis/io/backend/unix/freebsd/platforms.txt deleted file mode 100644 index edfe86017d..0000000000 --- a/basis/io/backend/unix/freebsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -freebsd diff --git a/basis/io/backend/unix/macosx/macosx.factor b/basis/io/backend/unix/macosx/macosx.factor index 0bc2b85b32..00acf3a955 100644 --- a/basis/io/backend/unix/macosx/macosx.factor +++ b/basis/io/backend/unix/macosx/macosx.factor @@ -1,9 +1,17 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: io.backend system namespaces io.backend.unix.bsd -io.backend.unix.multiplexers io.backend.unix.multiplexers.run-loop ; +USING: io.backend system namespaces +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 +SINGLETON: macosx-kqueue + +M: macosx-kqueue init-io ( -- ) + mx set-global ; + M: macosx init-io ( -- ) mx set-global ; diff --git a/basis/io/backend/unix/multiplexers/kqueue/platforms.txt b/basis/io/backend/unix/multiplexers/kqueue/platforms.txt index df796f15d4..6e806f449e 100644 --- a/basis/io/backend/unix/multiplexers/kqueue/platforms.txt +++ b/basis/io/backend/unix/multiplexers/kqueue/platforms.txt @@ -1 +1 @@ -bsd +macosx diff --git a/basis/io/backend/unix/netbsd/netbsd.factor b/basis/io/backend/unix/netbsd/netbsd.factor deleted file mode 100644 index a47be300f8..0000000000 --- a/basis/io/backend/unix/netbsd/netbsd.factor +++ /dev/null @@ -1,3 +0,0 @@ -USING: io.backend.unix.bsd io.backend system ; - -netbsd set-io-backend diff --git a/basis/io/backend/unix/netbsd/platforms.txt b/basis/io/backend/unix/netbsd/platforms.txt deleted file mode 100644 index dccfe71042..0000000000 --- a/basis/io/backend/unix/netbsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -netbsd diff --git a/basis/io/backend/unix/openbsd/openbsd.factor b/basis/io/backend/unix/openbsd/openbsd.factor deleted file mode 100644 index a9e25134de..0000000000 --- a/basis/io/backend/unix/openbsd/openbsd.factor +++ /dev/null @@ -1,3 +0,0 @@ -USING: io.backend.unix.bsd io.backend system ; - -openbsd set-io-backend diff --git a/basis/io/backend/unix/openbsd/platforms.txt b/basis/io/backend/unix/openbsd/platforms.txt deleted file mode 100644 index 389b028aca..0000000000 --- a/basis/io/backend/unix/openbsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -openbsd diff --git a/basis/io/files/info/unix/bsd/bsd.factor b/basis/io/files/info/unix/bsd/bsd.factor deleted file mode 100644 index 64fcd0b5d6..0000000000 --- a/basis/io/files/info/unix/bsd/bsd.factor +++ /dev/null @@ -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 ; diff --git a/basis/io/files/info/unix/bsd/platforms.txt b/basis/io/files/info/unix/bsd/platforms.txt deleted file mode 100644 index df796f15d4..0000000000 --- a/basis/io/files/info/unix/bsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -bsd diff --git a/basis/io/files/info/unix/freebsd/freebsd.factor b/basis/io/files/info/unix/freebsd/freebsd.factor deleted file mode 100644 index 37a37f1958..0000000000 --- a/basis/io/files/info/unix/freebsd/freebsd.factor +++ /dev/null @@ -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 [ 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 [ 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 - [ dup byte-length 0 getfsstat io-error ] - [ [ f_mntonname>> utf8 alien>string file-system-info ] { } map-as ] bi ; diff --git a/basis/io/files/info/unix/freebsd/platforms.txt b/basis/io/files/info/unix/freebsd/platforms.txt deleted file mode 100644 index edfe86017d..0000000000 --- a/basis/io/files/info/unix/freebsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -freebsd diff --git a/basis/io/files/info/unix/macosx/macosx.factor b/basis/io/files/info/unix/macosx/macosx.factor index 26ed593646..d066b120e1 100644 --- a/basis/io/files/info/unix/macosx/macosx.factor +++ b/basis/io/files/info/unix/macosx/macosx.factor @@ -1,14 +1,27 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors alien.c-types alien.data alien.strings -combinators grouping io.encodings.utf8 io.files kernel math -sequences system unix io.files.unix arrays unix.statfs.macosx -unix.statvfs.macosx unix.getfsstat.macosx io.files.info.unix -io.files.info classes.struct specialized-arrays ; +USING: accessors alien.c-types alien.data alien.strings arrays +calendar.unix classes.struct combinators grouping +io.encodings.utf8 io.files io.files.info io.files.info.unix +io.files.unix kernel math sequences specialized-arrays +system unix unix.getfsstat.macosx unix.statfs.macosx +unix.statvfs.macosx ; SPECIALIZED-ARRAY: uint SPECIALIZED-ARRAY: statfs64 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 io-size owner type-id filesystem-subtype ; diff --git a/basis/io/files/info/unix/netbsd/netbsd.factor b/basis/io/files/info/unix/netbsd/netbsd.factor deleted file mode 100644 index 5be9a945d4..0000000000 --- a/basis/io/files/info/unix/netbsd/netbsd.factor +++ /dev/null @@ -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 [ 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 - [ dup byte-length 0 getvfsstat io-error ] - [ [ f_mntonname>> utf8 alien>string file-system-info ] { } map-as ] bi ; diff --git a/basis/io/files/info/unix/netbsd/platforms.txt b/basis/io/files/info/unix/netbsd/platforms.txt deleted file mode 100644 index dccfe71042..0000000000 --- a/basis/io/files/info/unix/netbsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -netbsd diff --git a/basis/io/files/info/unix/openbsd/openbsd.factor b/basis/io/files/info/unix/openbsd/openbsd.factor deleted file mode 100644 index 7373012914..0000000000 --- a/basis/io/files/info/unix/openbsd/openbsd.factor +++ /dev/null @@ -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 [ 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 [ 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 - [ dup byte-length 0 getfsstat io-error ] - [ [ f_mntonname>> utf8 alien>string file-system-info ] { } map-as ] bi ; diff --git a/basis/io/files/info/unix/openbsd/platforms.txt b/basis/io/files/info/unix/openbsd/platforms.txt deleted file mode 100644 index 389b028aca..0000000000 --- a/basis/io/files/info/unix/openbsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -openbsd diff --git a/basis/io/monitors/monitors.factor b/basis/io/monitors/monitors.factor index ef7b49d580..d7dc4184d0 100644 --- a/basis/io/monitors/monitors.factor +++ b/basis/io/monitors/monitors.factor @@ -78,5 +78,4 @@ SYMBOL: +rename-file+ { [ os macosx? ] [ "io.monitors.macosx" require ] } { [ os linux? ] [ "io.monitors.linux" require ] } { [ os windows? ] [ "io.monitors.windows" require ] } - { [ os bsd? ] [ ] } } cond diff --git a/basis/libc/libc-docs.factor b/basis/libc/libc-docs.factor index 74e96b08d3..c7abec6bcd 100644 --- a/basis/libc/libc-docs.factor +++ b/basis/libc/libc-docs.factor @@ -22,7 +22,7 @@ HELP: realloc HELP: memcpy { $values { "dst" c-ptr } { "src" c-ptr } { "size" "a non-negative integer" } } { $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 { $values { "c-ptr" "an alien address, byte array, or " { $link f } } } diff --git a/basis/math/floats/env/env-tests.factor b/basis/math/floats/env/env-tests.factor index c762d265c3..5ef5815199 100755 --- a/basis/math/floats/env/env-tests.factor +++ b/basis/math/floats/env/env-tests.factor @@ -110,80 +110,75 @@ os linux? cpu x86.64? and [ -1.0 3.0 /f double>bits ] unit-test -! FP traps cause a kernel panic on OpenBSD 4.5 i386 -os openbsd eq? cpu x86.32 eq? and [ +: fp-trap-error? ( error -- ? ) + 2 head { "kernel-error" 17 } = ; - : fp-trap-error? ( error -- ? ) - 2 head { "kernel-error" 17 } = ; +: test-traps ( traps inputs quot -- quot' fail-quot ) + append '[ _ _ with-fp-traps ] [ fp-trap-error? ] ; - : test-traps ( traps inputs quot -- quot' fail-quot ) - append '[ _ _ with-fp-traps ] [ fp-trap-error? ] ; +: test-traps-compiled ( traps inputs quot -- quot' fail-quot ) + swapd '[ @ [ _ _ with-fp-traps ] compile-call ] [ fp-trap-error? ] ; - : test-traps-compiled ( traps inputs quot -- quot' fail-quot ) - swapd '[ @ [ _ _ with-fp-traps ] compile-call ] [ fp-trap-error? ] ; +{ +fp-zero-divide+ } [ 1.0 0.0 ] [ /f ] test-traps must-fail-with +{ +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-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-compiled must-fail-with +{ +fp-inexact+ } [ 1.0 3.0 ] [ /f ] test-traps-compiled must-fail-with +{ +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 +{ +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 - { +fp-inexact+ } [ 1.0 3.0 ] [ /f ] test-traps-compiled must-fail-with - { +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 - { +fp-underflow+ +fp-inexact+ } [ 2.0 ] [ -100,000.0 ^ ] test-traps-compiled must-fail-with +! Ensure ordered comparisons raise traps +:: test-comparison-quot ( word -- quot ) + [ + { float float } declare + { +fp-invalid-operation+ } [ word execute ] with-fp-traps + ] ; - ! Ensure ordered comparisons raise traps - :: test-comparison-quot ( word -- quot ) - [ - { float float } declare - { +fp-invalid-operation+ } [ word execute ] with-fp-traps - ] ; +: test-comparison ( inputs word -- quot fail-quot ) + test-comparison-quot append [ fp-trap-error? ] ; - : test-comparison ( inputs word -- quot fail-quot ) - test-comparison-quot append [ fp-trap-error? ] ; +: test-comparison-compiled ( inputs word -- quot fail-quot ) + test-comparison-quot '[ @ _ compile-call ] [ fp-trap-error? ] ; - : test-comparison-compiled ( inputs word -- quot fail-quot ) - test-comparison-quot '[ @ _ compile-call ] [ fp-trap-error? ] ; +\ float< "intrinsic" word-prop [ + [ 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 [ - [ 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 - - [ 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 + [ 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 ! Ensure traps get cleared [ 1/0. ] [ 1.0 0.0 /f ] unit-test diff --git a/basis/openssl/libcrypto/libcrypto.factor b/basis/openssl/libcrypto/libcrypto.factor index 4ab59b7ad6..3e8252493b 100644 --- a/basis/openssl/libcrypto/libcrypto.factor +++ b/basis/openssl/libcrypto/libcrypto.factor @@ -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 macosx? ] [ "libcrypto" "libcrypto.dylib" cdecl add-library ] } { [ os unix? ] [ "libcrypto" "libcrypto.so" cdecl add-library ] } diff --git a/basis/openssl/libssl/libssl.factor b/basis/openssl/libssl/libssl.factor index 29f82977e0..8b3c2e9917 100644 --- a/basis/openssl/libssl/libssl.factor +++ b/basis/openssl/libssl/libssl.factor @@ -8,8 +8,6 @@ quotations math.bitwise alien.libraries literals ; IN: openssl.libssl << { - { [ os openbsd? ] [ ] } ! VM is linked with it - { [ os netbsd? ] [ ] } { [ os windows? ] [ "libssl" "ssleay32.dll" cdecl add-library ] } { [ os macosx? ] [ "libssl" "libssl.dylib" cdecl add-library ] } { [ os unix? ] [ "libssl" "libssl.so" cdecl add-library ] } diff --git a/basis/random/unix/unix.factor b/basis/random/unix/unix.factor index fd93d6492c..f06f029769 100644 --- a/basis/random/unix/unix.factor +++ b/basis/random/unix/unix.factor @@ -14,14 +14,7 @@ M: unix-random dispose reader>> dispose ; M: unix-random random-bytes* ( n tuple -- byte-array ) reader>> stream-read ; -os openbsd? [ - [ - "/dev/srandom" &dispose secure-random-generator set-global - "/dev/arandom" &dispose system-random-generator set-global - ] "random.unix" add-startup-hook -] [ - [ - "/dev/random" &dispose secure-random-generator set-global - "/dev/urandom" &dispose system-random-generator set-global - ] "random.unix" add-startup-hook -] if +[ + "/dev/random" &dispose secure-random-generator set-global + "/dev/urandom" &dispose system-random-generator set-global +] "random.unix" add-startup-hook diff --git a/basis/ui/text/pango/platforms.txt b/basis/ui/text/pango/platforms.txt index b60912bb4a..a08e1f35eb 100644 --- a/basis/ui/text/pango/platforms.txt +++ b/basis/ui/text/pango/platforms.txt @@ -1,4 +1 @@ linux -freebsd -netbsd -openbsd diff --git a/basis/unix/ffi/bsd/authors.txt b/basis/unix/ffi/bsd/authors.txt deleted file mode 100644 index 1901f27a24..0000000000 --- a/basis/unix/ffi/bsd/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Slava Pestov diff --git a/basis/unix/ffi/bsd/bsd.factor b/basis/unix/ffi/bsd/bsd.factor deleted file mode 100644 index ac145e04d7..0000000000 --- a/basis/unix/ffi/bsd/bsd.factor +++ /dev/null @@ -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 diff --git a/basis/unix/ffi/bsd/freebsd/freebsd.factor b/basis/unix/ffi/bsd/freebsd/freebsd.factor deleted file mode 100644 index cb45cf2b20..0000000000 --- a/basis/unix/ffi/bsd/freebsd/freebsd.factor +++ /dev/null @@ -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 diff --git a/basis/unix/ffi/bsd/freebsd/platforms.txt b/basis/unix/ffi/bsd/freebsd/platforms.txt deleted file mode 100644 index edfe86017d..0000000000 --- a/basis/unix/ffi/bsd/freebsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -freebsd diff --git a/basis/unix/ffi/bsd/netbsd/netbsd.factor b/basis/unix/ffi/bsd/netbsd/netbsd.factor deleted file mode 100644 index e15971b150..0000000000 --- a/basis/unix/ffi/bsd/netbsd/netbsd.factor +++ /dev/null @@ -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 } } ; diff --git a/basis/unix/ffi/bsd/netbsd/platforms.txt b/basis/unix/ffi/bsd/netbsd/platforms.txt deleted file mode 100644 index dccfe71042..0000000000 --- a/basis/unix/ffi/bsd/netbsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -netbsd diff --git a/basis/unix/ffi/bsd/openbsd/openbsd.factor b/basis/unix/ffi/bsd/openbsd/openbsd.factor deleted file mode 100644 index dba7ddd3cd..0000000000 --- a/basis/unix/ffi/bsd/openbsd/openbsd.factor +++ /dev/null @@ -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 diff --git a/basis/unix/ffi/bsd/openbsd/platforms.txt b/basis/unix/ffi/bsd/openbsd/platforms.txt deleted file mode 100644 index 389b028aca..0000000000 --- a/basis/unix/ffi/bsd/openbsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -openbsd diff --git a/basis/unix/ffi/bsd/platforms.txt b/basis/unix/ffi/bsd/platforms.txt deleted file mode 100644 index df796f15d4..0000000000 --- a/basis/unix/ffi/bsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -bsd diff --git a/basis/unix/ffi/bsd/summary.txt b/basis/unix/ffi/bsd/summary.txt deleted file mode 100644 index 9acec6c174..0000000000 --- a/basis/unix/ffi/bsd/summary.txt +++ /dev/null @@ -1 +0,0 @@ -*BSD/Mac OS X support diff --git a/basis/unix/ffi/ffi.factor b/basis/unix/ffi/ffi.factor index 8d384092ed..6798bb1307 100644 --- a/basis/unix/ffi/ffi.factor +++ b/basis/unix/ffi/ffi.factor @@ -9,8 +9,7 @@ IN: unix.ffi { { [ os linux? ] [ "unix.ffi.linux" require ] } - { [ os bsd? ] [ "unix.ffi.bsd" require ] } - { [ os solaris? ] [ "unix.ffi.solaris" require ] } + { [ os macosx? ] [ "unix.ffi.macosx" require ] } } cond >> diff --git a/basis/unix/ffi/bsd/macosx/macosx.factor b/basis/unix/ffi/macosx/macosx.factor similarity index 67% rename from basis/unix/ffi/bsd/macosx/macosx.factor rename to basis/unix/ffi/macosx/macosx.factor index 5a6775f214..7c7c6d1430 100644 --- a/basis/unix/ffi/bsd/macosx/macosx.factor +++ b/basis/unix/ffi/macosx/macosx.factor @@ -3,6 +3,85 @@ classes.struct combinators kernel system unix unix.time unix.types vocabs vocabs.loader ; 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: AF_INET6 30 @@ -22,7 +101,7 @@ CONSTANT: _UTX_USERSIZE 256 CONSTANT: _UTX_LINESIZE 32 CONSTANT: _UTX_IDSIZE 4 CONSTANT: _UTX_HOSTSIZE 256 - + STRUCT: utmpx { ut_user { char _UTX_USERSIZE } } { ut_id { char _UTX_IDSIZE } } diff --git a/basis/unix/ffi/bsd/macosx/platforms.txt b/basis/unix/ffi/macosx/platforms.txt similarity index 100% rename from basis/unix/ffi/bsd/macosx/platforms.txt rename to basis/unix/ffi/macosx/platforms.txt diff --git a/basis/unix/ffi/solaris/authors.txt b/basis/unix/ffi/solaris/authors.txt deleted file mode 100755 index 1901f27a24..0000000000 --- a/basis/unix/ffi/solaris/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Slava Pestov diff --git a/basis/unix/ffi/solaris/platforms.txt b/basis/unix/ffi/solaris/platforms.txt deleted file mode 100644 index 613a93b535..0000000000 --- a/basis/unix/ffi/solaris/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -solaris diff --git a/basis/unix/ffi/solaris/solaris.factor b/basis/unix/ffi/solaris/solaris.factor deleted file mode 100644 index a08785823a..0000000000 --- a/basis/unix/ffi/solaris/solaris.factor +++ /dev/null @@ -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 diff --git a/basis/unix/getfsstat/freebsd/freebsd.factor b/basis/unix/getfsstat/freebsd/freebsd.factor deleted file mode 100644 index fefd316fdb..0000000000 --- a/basis/unix/getfsstat/freebsd/freebsd.factor +++ /dev/null @@ -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 ) ; diff --git a/basis/unix/getfsstat/freebsd/platforms.txt b/basis/unix/getfsstat/freebsd/platforms.txt deleted file mode 100644 index edfe86017d..0000000000 --- a/basis/unix/getfsstat/freebsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -freebsd diff --git a/basis/unix/getfsstat/netbsd/authors.txt b/basis/unix/getfsstat/netbsd/authors.txt deleted file mode 100644 index 7c1b2f2279..0000000000 --- a/basis/unix/getfsstat/netbsd/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Doug Coleman diff --git a/basis/unix/getfsstat/netbsd/netbsd.factor b/basis/unix/getfsstat/netbsd/netbsd.factor deleted file mode 100644 index cdad20e4b5..0000000000 --- a/basis/unix/getfsstat/netbsd/netbsd.factor +++ /dev/null @@ -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 ) ; diff --git a/basis/unix/getfsstat/netbsd/platforms.txt b/basis/unix/getfsstat/netbsd/platforms.txt deleted file mode 100644 index dccfe71042..0000000000 --- a/basis/unix/getfsstat/netbsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -netbsd diff --git a/basis/unix/getfsstat/openbsd/authors.txt b/basis/unix/getfsstat/openbsd/authors.txt deleted file mode 100644 index 7c1b2f2279..0000000000 --- a/basis/unix/getfsstat/openbsd/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Doug Coleman diff --git a/basis/unix/getfsstat/openbsd/openbsd.factor b/basis/unix/getfsstat/openbsd/openbsd.factor deleted file mode 100644 index 07b45f5df5..0000000000 --- a/basis/unix/getfsstat/openbsd/openbsd.factor +++ /dev/null @@ -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 ) ; diff --git a/basis/unix/getfsstat/openbsd/platforms.txt b/basis/unix/getfsstat/openbsd/platforms.txt deleted file mode 100644 index 389b028aca..0000000000 --- a/basis/unix/getfsstat/openbsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -openbsd diff --git a/basis/unix/kqueue/freebsd/freebsd.factor b/basis/unix/kqueue/freebsd/freebsd.factor deleted file mode 100644 index 54f576ffc1..0000000000 --- a/basis/unix/kqueue/freebsd/freebsd.factor +++ /dev/null @@ -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 diff --git a/basis/unix/kqueue/freebsd/platforms.txt b/basis/unix/kqueue/freebsd/platforms.txt deleted file mode 100644 index edfe86017d..0000000000 --- a/basis/unix/kqueue/freebsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -freebsd diff --git a/basis/unix/kqueue/netbsd/netbsd.factor b/basis/unix/kqueue/netbsd/netbsd.factor deleted file mode 100644 index 9ba6202585..0000000000 --- a/basis/unix/kqueue/netbsd/netbsd.factor +++ /dev/null @@ -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 diff --git a/basis/unix/kqueue/netbsd/platforms.txt b/basis/unix/kqueue/netbsd/platforms.txt deleted file mode 100644 index dccfe71042..0000000000 --- a/basis/unix/kqueue/netbsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -netbsd diff --git a/basis/unix/kqueue/openbsd/openbsd.factor b/basis/unix/kqueue/openbsd/openbsd.factor deleted file mode 100644 index ab680345b6..0000000000 --- a/basis/unix/kqueue/openbsd/openbsd.factor +++ /dev/null @@ -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 diff --git a/basis/unix/kqueue/openbsd/platforms.txt b/basis/unix/kqueue/openbsd/platforms.txt deleted file mode 100644 index 389b028aca..0000000000 --- a/basis/unix/kqueue/openbsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -openbsd diff --git a/basis/unix/kqueue/platforms.txt b/basis/unix/kqueue/platforms.txt index df796f15d4..6e806f449e 100644 --- a/basis/unix/kqueue/platforms.txt +++ b/basis/unix/kqueue/platforms.txt @@ -1 +1 @@ -bsd +macosx diff --git a/basis/unix/stat/freebsd/freebsd.factor b/basis/unix/stat/freebsd/freebsd.factor deleted file mode 100644 index 8535e9f3fd..0000000000 --- a/basis/unix/stat/freebsd/freebsd.factor +++ /dev/null @@ -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 ) ; diff --git a/basis/unix/stat/freebsd/platforms.txt b/basis/unix/stat/freebsd/platforms.txt deleted file mode 100644 index edfe86017d..0000000000 --- a/basis/unix/stat/freebsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -freebsd diff --git a/basis/unix/stat/netbsd/32/32.factor b/basis/unix/stat/netbsd/32/32.factor deleted file mode 100644 index f89b67c25d..0000000000 --- a/basis/unix/stat/netbsd/32/32.factor +++ /dev/null @@ -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 ; diff --git a/basis/unix/stat/netbsd/32/tags.txt b/basis/unix/stat/netbsd/32/tags.txt deleted file mode 100644 index ebb74b4d5f..0000000000 --- a/basis/unix/stat/netbsd/32/tags.txt +++ /dev/null @@ -1 +0,0 @@ -not loaded diff --git a/basis/unix/stat/netbsd/64/64.factor b/basis/unix/stat/netbsd/64/64.factor deleted file mode 100644 index d6e2b73a25..0000000000 --- a/basis/unix/stat/netbsd/64/64.factor +++ /dev/null @@ -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 ; diff --git a/basis/unix/stat/netbsd/64/tags.txt b/basis/unix/stat/netbsd/64/tags.txt deleted file mode 100644 index ebb74b4d5f..0000000000 --- a/basis/unix/stat/netbsd/64/tags.txt +++ /dev/null @@ -1 +0,0 @@ -not loaded diff --git a/basis/unix/stat/netbsd/netbsd.factor b/basis/unix/stat/netbsd/netbsd.factor deleted file mode 100644 index ae865a79c9..0000000000 --- a/basis/unix/stat/netbsd/netbsd.factor +++ /dev/null @@ -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 - diff --git a/basis/unix/stat/netbsd/platforms.txt b/basis/unix/stat/netbsd/platforms.txt deleted file mode 100644 index dccfe71042..0000000000 --- a/basis/unix/stat/netbsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -netbsd diff --git a/basis/unix/stat/openbsd/openbsd.factor b/basis/unix/stat/openbsd/openbsd.factor deleted file mode 100644 index 6c805e82cb..0000000000 --- a/basis/unix/stat/openbsd/openbsd.factor +++ /dev/null @@ -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 ) ; diff --git a/basis/unix/stat/openbsd/platforms.txt b/basis/unix/stat/openbsd/platforms.txt deleted file mode 100644 index 389b028aca..0000000000 --- a/basis/unix/stat/openbsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -openbsd diff --git a/basis/unix/stat/stat.factor b/basis/unix/stat/stat.factor index d6b19bf2d5..2f15ac7e00 100644 --- a/basis/unix/stat/stat.factor +++ b/basis/unix/stat/stat.factor @@ -24,9 +24,6 @@ TYPEDEF: fsid fsid_t << os { { linux [ "unix.stat.linux" require ] } { macosx [ "unix.stat.macosx" require ] } - { freebsd [ "unix.stat.freebsd" require ] } - { netbsd [ "unix.stat.netbsd" require ] } - { openbsd [ "unix.stat.openbsd" require ] } } case >> : file-status ( pathname -- stat ) diff --git a/basis/unix/statfs/freebsd/authors.txt b/basis/unix/statfs/freebsd/authors.txt deleted file mode 100644 index b4bd0e7b35..0000000000 --- a/basis/unix/statfs/freebsd/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Doug Coleman \ No newline at end of file diff --git a/basis/unix/statfs/freebsd/freebsd.factor b/basis/unix/statfs/freebsd/freebsd.factor deleted file mode 100644 index f12473da92..0000000000 --- a/basis/unix/statfs/freebsd/freebsd.factor +++ /dev/null @@ -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 ) ; diff --git a/basis/unix/statfs/freebsd/platforms.txt b/basis/unix/statfs/freebsd/platforms.txt deleted file mode 100644 index edfe86017d..0000000000 --- a/basis/unix/statfs/freebsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -freebsd diff --git a/basis/unix/statfs/openbsd/openbsd.factor b/basis/unix/statfs/openbsd/openbsd.factor deleted file mode 100644 index 9c63bfa96b..0000000000 --- a/basis/unix/statfs/openbsd/openbsd.factor +++ /dev/null @@ -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 ) ; diff --git a/basis/unix/statfs/openbsd/platforms.txt b/basis/unix/statfs/openbsd/platforms.txt deleted file mode 100644 index 389b028aca..0000000000 --- a/basis/unix/statfs/openbsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -openbsd diff --git a/basis/unix/statvfs/freebsd/authors.txt b/basis/unix/statvfs/freebsd/authors.txt deleted file mode 100644 index 7c1b2f2279..0000000000 --- a/basis/unix/statvfs/freebsd/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Doug Coleman diff --git a/basis/unix/statvfs/freebsd/freebsd.factor b/basis/unix/statvfs/freebsd/freebsd.factor deleted file mode 100644 index 5e66a7daf9..0000000000 --- a/basis/unix/statvfs/freebsd/freebsd.factor +++ /dev/null @@ -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 ) ; diff --git a/basis/unix/statvfs/freebsd/platforms.txt b/basis/unix/statvfs/freebsd/platforms.txt deleted file mode 100644 index edfe86017d..0000000000 --- a/basis/unix/statvfs/freebsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -freebsd diff --git a/basis/unix/statvfs/netbsd/authors.txt b/basis/unix/statvfs/netbsd/authors.txt deleted file mode 100644 index 7c1b2f2279..0000000000 --- a/basis/unix/statvfs/netbsd/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Doug Coleman diff --git a/basis/unix/statvfs/netbsd/netbsd.factor b/basis/unix/statvfs/netbsd/netbsd.factor deleted file mode 100644 index f53d72f02e..0000000000 --- a/basis/unix/statvfs/netbsd/netbsd.factor +++ /dev/null @@ -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 ) ; diff --git a/basis/unix/statvfs/netbsd/platforms.txt b/basis/unix/statvfs/netbsd/platforms.txt deleted file mode 100644 index dccfe71042..0000000000 --- a/basis/unix/statvfs/netbsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -netbsd diff --git a/basis/unix/statvfs/openbsd/authors.txt b/basis/unix/statvfs/openbsd/authors.txt deleted file mode 100644 index 7c1b2f2279..0000000000 --- a/basis/unix/statvfs/openbsd/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Doug Coleman diff --git a/basis/unix/statvfs/openbsd/openbsd.factor b/basis/unix/statvfs/openbsd/openbsd.factor deleted file mode 100644 index 146db770ef..0000000000 --- a/basis/unix/statvfs/openbsd/openbsd.factor +++ /dev/null @@ -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 ) ; diff --git a/basis/unix/statvfs/openbsd/platforms.txt b/basis/unix/statvfs/openbsd/platforms.txt deleted file mode 100644 index 389b028aca..0000000000 --- a/basis/unix/statvfs/openbsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -openbsd diff --git a/basis/unix/statvfs/statvfs.factor b/basis/unix/statvfs/statvfs.factor index a609731c28..89198df243 100644 --- a/basis/unix/statvfs/statvfs.factor +++ b/basis/unix/statvfs/statvfs.factor @@ -6,7 +6,4 @@ IN: unix.statvfs os { { linux [ "unix.statvfs.linux" require ] } { macosx [ "unix.statvfs.macosx" require ] } - { freebsd [ "unix.statvfs.freebsd" require ] } - { netbsd [ "unix.statvfs.netbsd" require ] } - { openbsd [ "unix.statvfs.openbsd" require ] } } case diff --git a/basis/unix/types/freebsd/freebsd.factor b/basis/unix/types/freebsd/freebsd.factor deleted file mode 100644 index 41cf7ac188..0000000000 --- a/basis/unix/types/freebsd/freebsd.factor +++ /dev/null @@ -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 diff --git a/basis/unix/types/freebsd/platforms.txt b/basis/unix/types/freebsd/platforms.txt deleted file mode 100644 index edfe86017d..0000000000 --- a/basis/unix/types/freebsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -freebsd diff --git a/basis/unix/types/netbsd/32/32.factor b/basis/unix/types/netbsd/32/32.factor deleted file mode 100644 index 892626c416..0000000000 --- a/basis/unix/types/netbsd/32/32.factor +++ /dev/null @@ -1,6 +0,0 @@ -USING: alien.syntax ; -IN: unix.types - -! NetBSD 4.0 - -TYPEDEF: __uint64_t ino_t diff --git a/basis/unix/types/netbsd/32/tags.txt b/basis/unix/types/netbsd/32/tags.txt deleted file mode 100644 index ebb74b4d5f..0000000000 --- a/basis/unix/types/netbsd/32/tags.txt +++ /dev/null @@ -1 +0,0 @@ -not loaded diff --git a/basis/unix/types/netbsd/64/64.factor b/basis/unix/types/netbsd/64/64.factor deleted file mode 100644 index e475bd449b..0000000000 --- a/basis/unix/types/netbsd/64/64.factor +++ /dev/null @@ -1,6 +0,0 @@ -USING: alien.syntax ; -IN: unix.types - -! NetBSD 4.0 - -TYPEDEF: __uint32_t ino_t diff --git a/basis/unix/types/netbsd/64/tags.txt b/basis/unix/types/netbsd/64/tags.txt deleted file mode 100644 index ebb74b4d5f..0000000000 --- a/basis/unix/types/netbsd/64/tags.txt +++ /dev/null @@ -1 +0,0 @@ -not loaded diff --git a/basis/unix/types/netbsd/netbsd.factor b/basis/unix/types/netbsd/netbsd.factor deleted file mode 100644 index 2f0ad775c7..0000000000 --- a/basis/unix/types/netbsd/netbsd.factor +++ /dev/null @@ -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 - diff --git a/basis/unix/types/netbsd/platforms.txt b/basis/unix/types/netbsd/platforms.txt deleted file mode 100644 index dccfe71042..0000000000 --- a/basis/unix/types/netbsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -netbsd diff --git a/basis/unix/types/openbsd/openbsd.factor b/basis/unix/types/openbsd/openbsd.factor deleted file mode 100644 index 30bc539207..0000000000 --- a/basis/unix/types/openbsd/openbsd.factor +++ /dev/null @@ -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 diff --git a/basis/unix/types/openbsd/platforms.txt b/basis/unix/types/openbsd/platforms.txt deleted file mode 100644 index 389b028aca..0000000000 --- a/basis/unix/types/openbsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -openbsd diff --git a/basis/unix/types/types.factor b/basis/unix/types/types.factor index cabbed946d..08cb5cea1b 100644 --- a/basis/unix/types/types.factor +++ b/basis/unix/types/types.factor @@ -47,7 +47,4 @@ C-TYPE: sockaddr os { { linux [ "unix.types.linux" require ] } { macosx [ "unix.types.macosx" require ] } - { freebsd [ "unix.types.freebsd" require ] } - { openbsd [ "unix.types.openbsd" require ] } - { netbsd [ "unix.types.netbsd" require ] } } case diff --git a/basis/unix/users/bsd/authors.txt b/basis/unix/users/bsd/authors.txt deleted file mode 100644 index 7c1b2f2279..0000000000 --- a/basis/unix/users/bsd/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Doug Coleman diff --git a/basis/unix/users/bsd/platforms.txt b/basis/unix/users/bsd/platforms.txt deleted file mode 100644 index df796f15d4..0000000000 --- a/basis/unix/users/bsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -bsd diff --git a/basis/unix/getfsstat/freebsd/authors.txt b/basis/unix/users/macosx/authors.txt similarity index 100% rename from basis/unix/getfsstat/freebsd/authors.txt rename to basis/unix/users/macosx/authors.txt diff --git a/basis/unix/users/bsd/bsd.factor b/basis/unix/users/macosx/macosx.factor similarity index 64% rename from basis/unix/users/bsd/bsd.factor rename to basis/unix/users/macosx/macosx.factor index 2c41a05a7f..d9c378e629 100644 --- a/basis/unix/users/bsd/bsd.factor +++ b/basis/unix/users/macosx/macosx.factor @@ -2,14 +2,13 @@ ! See http://factorcode.org/license.txt for BSD license. USING: combinators accessors kernel unix.users system ; -IN: unix.users.bsd -QUALIFIED: unix +IN: unix.users.macosx -TUPLE: bsd-passwd < passwd change class expire fields ; +TUPLE: macosx-passwd < passwd change class expire fields ; -M: bsd new-passwd ( -- bsd-passwd ) bsd-passwd new ; +M: macosx new-passwd ( -- macosx-passwd ) macosx-passwd new ; -M: bsd passwd>new-passwd ( passwd -- bsd-passwd ) +M: macosx passwd>new-passwd ( passwd -- macosx-passwd ) [ call-next-method ] keep { [ pw_change>> >>change ] diff --git a/basis/unix/users/macosx/platforms.txt b/basis/unix/users/macosx/platforms.txt new file mode 100644 index 0000000000..6e806f449e --- /dev/null +++ b/basis/unix/users/macosx/platforms.txt @@ -0,0 +1 @@ +macosx diff --git a/basis/unix/users/users.factor b/basis/unix/users/users.factor index 84b4ead898..d0ed5cd0fd 100644 --- a/basis/unix/users/users.factor +++ b/basis/unix/users/users.factor @@ -130,6 +130,6 @@ M: string set-effective-user ( string -- ) ?user-id (set-effective-user) ; os { - { [ dup bsd? ] [ drop "unix.users.bsd" require ] } + { [ dup macosx? ] [ drop "unix.users.macosx" require ] } { [ dup linux? ] [ drop ] } } cond diff --git a/basis/unix/utmpx/macosx/macosx.factor b/basis/unix/utmpx/macosx/macosx.factor index faae29ffa4..b33c448a26 100644 --- a/basis/unix/utmpx/macosx/macosx.factor +++ b/basis/unix/utmpx/macosx/macosx.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax unix.ffi.bsd.macosx ; +USING: alien.syntax unix.ffi.macosx ; IN: unix.utmpx.macosx ! empty diff --git a/basis/unix/utmpx/netbsd/authors.txt b/basis/unix/utmpx/netbsd/authors.txt deleted file mode 100644 index b4bd0e7b35..0000000000 --- a/basis/unix/utmpx/netbsd/authors.txt +++ /dev/null @@ -1 +0,0 @@ -Doug Coleman \ No newline at end of file diff --git a/basis/unix/utmpx/netbsd/netbsd-tests.factor b/basis/unix/utmpx/netbsd/netbsd-tests.factor deleted file mode 100644 index 5bd0e4622f..0000000000 --- a/basis/unix/utmpx/netbsd/netbsd-tests.factor +++ /dev/null @@ -1,4 +0,0 @@ -! Copyright (C) 2008 Doug Coleman. -! See http://factorcode.org/license.txt for BSD license. -USING: tools.test unix.utmpx.netbsd ; -IN: unix.utmpx.netbsd.tests diff --git a/basis/unix/utmpx/netbsd/netbsd.factor b/basis/unix/utmpx/netbsd/netbsd.factor deleted file mode 100644 index 93092a7cbf..0000000000 --- a/basis/unix/utmpx/netbsd/netbsd.factor +++ /dev/null @@ -1,20 +0,0 @@ -! Copyright (C) 2008 Doug Coleman. -! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax unix unix.utmpx unix.ffi.bsd.netbsd accessors -system kernel combinators ; -IN: unix.utmpx.netbsd - -TUPLE: netbsd-utmpx-record < utmpx-record -termination exit sockaddr ; - -M: netbsd new-utmpx-record ( -- utmpx-record ) - netbsd-utmpx-record new ; - -M: netbsd utmpx>utmpx-record ( utmpx -- record ) - [ new-utmpx-record ] dip - [ - ut_exit>> - [ e_termination>> >>termination ] - [ e_exit>> >>exit ] bi - ] - [ ut_ss>> >>sockaddr ] bi ; diff --git a/basis/unix/utmpx/netbsd/platforms.txt b/basis/unix/utmpx/netbsd/platforms.txt deleted file mode 100644 index dccfe71042..0000000000 --- a/basis/unix/utmpx/netbsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -netbsd diff --git a/basis/unix/utmpx/platforms.txt b/basis/unix/utmpx/platforms.txt index abe56c1458..6e806f449e 100644 --- a/basis/unix/utmpx/platforms.txt +++ b/basis/unix/utmpx/platforms.txt @@ -1,2 +1 @@ macosx -netbsd diff --git a/basis/unix/utmpx/utmpx.factor b/basis/unix/utmpx/utmpx.factor index f9beda27d6..64a38a3c7c 100644 --- a/basis/unix/utmpx/utmpx.factor +++ b/basis/unix/utmpx/utmpx.factor @@ -64,5 +64,4 @@ M: unix utmpx>utmpx-record ( utmpx -- utmpx-record ) os { { macosx [ "unix.utmpx.macosx" require ] } - { netbsd [ "unix.utmpx.netbsd" require ] } } case diff --git a/build-support/factor.sh b/build-support/factor.sh index 5e1aa5fed5..f0608417c6 100755 --- a/build-support/factor.sh +++ b/build-support/factor.sh @@ -84,22 +84,19 @@ set_md5sum() { set_gcc() { case $OS in - openbsd) ensure_program_installed egcc; CC=egcc;; + macosx) + if xcodebuild -version | grep 'Xcode 4' >/dev/null; then + CC=clang + else + CC=gcc + fi + ;; *) CC=gcc;; esac } set_make() { - case $OS in - netbsd) MAKE='gmake';; - freebsd) MAKE='gmake';; - openbsd) MAKE='gmake';; - dragonflybsd) MAKE='gmake';; - *) MAKE='make';; - esac - if [[ $MAKE = 'gmake' ]] ; then - ensure_program_installed gmake - fi + MAKE='make' } check_installed_programs() { @@ -186,11 +183,46 @@ find_os() { *Darwin*) OS=macosx;; *linux*) OS=linux;; *Linux*) OS=linux;; - *NetBSD*) OS=netbsd;; - *FreeBSD*) OS=freebsd;; - *OpenBSD*) OS=openbsd;; - *DragonFly*) OS=dragonflybsd;; - SunOS) OS=solaris;; + *BSD*) + echo "Here's a nickel, kid:" + echo " ..;;iiiittttjjttttii;;........ " + echo " ..ttLLGGGGffttjjjjttttttjjjjtt;;.... " + echo " ..iiLLLLjjffffiiiiffttLLjjiiiiiiiiffjjii.... " + echo " ;;LLttii;;iiiittttiiiittttffLLGGiiii;;iiLLLL;;.. " + echo " ..iiGGii..ii;;iiiittiittiiiiiittffffGGtt;;;;;;ffDDii.. " + echo " iiDD;;;;..;;ttttiittiittttiiiittttffDDEE;;,,;;;;ffKKtt.. " + echo " iiKKii..,,..iiii;;ii;;iittttttttttjjjjffGGLL::....;;LLWWtt.. " + echo " ..DDff..;;ii;;ii::,,;;;;iiiittttttjjffttjjLLDDtt..iiii;;KKWWii.. " + echo " LLLL;;;;ii;;;;;;,,;;;;;;ii;;ttttffffttttttLLGGKK..iiiiiiiiWWDD;; " + echo " ;;DD;;;;ii;;;;;;;;,,;;;;iiiiiiiijjffffffttttLLGGWWii..iiiiiiGG##jj.. " + echo " LLtt::ii;;....ii::;;,,;;;;iiiittttLLLLLLttttttGGKKGG;;;;iiiiii##KK;; " + echo " ..LL..iiii;;::::;;;;,,,,;;;;ii;;ttiiDDLLtttt;;iittLL##ii;;iiii;;WW##tt.. " + echo " ii;;;;iiff ..;;..ii..;;;;;;ii;;iiiiDDLLiiii;;ttLLEE##tt;;;;ii;;DD##GG.. " + echo " tt..iiGG::....ii..;;;;;;;;;;;;;;iiiiDDLLiiiiiiffGGWWKKiiii;;ii..tt##KK;; " + echo " ff;;GGtt..,, tt..;;;;,,;;iiii;;iittGGLLttffLLGGKKDDjjLLii;;;;,,ii##WWii " + echo " GGttii..;;.. ff::;;..;;iiiitt..iiiittGGffLLEEffEE;;;;EEtt;;::..;;WW##tt " + echo " GGjjii..ii..,,ff..::;;iiiiiitt..;;iiffttttffGGWWKKiiiiLLDD..;;....WW##tt " + echo " GGff,,..ii..iiii,,..::iiiiii;;..;;jjjjiiiiffGG##DDttiiffKK;;.. ..WW##jj " + echo " GGff..;;;;..LL..;;;;..;;iiii..;;ttLLiiiiiiffGGKKEE..jjLLKKjj.. ..WW##tt " + echo " LLff..ii..iiGG..::......;;;;;;;;LL;;iittttttLLKKLLffKKLLKKff.. ;;####ii " + echo " LLjj..;; LLii;;..;;......;;;;iitt;;ttLLttiiGGGGGGffDDKKii::.. tt##WW;; " + echo " jjtt....;;GGttjj ......;;ii;;iitt;;ttffttttLLDDGGttDDKK;;.. LL##KK.. " + echo " ;;ii;;..LLtt;;;; ....;;ii....iiGG;;iijjffLLGGKKjjGGKKGG.... KK##LL " + echo " ..ffiittttiiii;; ....;;ii,,;;ttLLttiittjjLLGGttjjGGKKtt iiWW##ii " + echo " ttLLii;;iiii;; ....,,;; ..;;ttDDiiiiffffffffGGGGGG.. GG##KK.. " + echo " ..LLjjii;;;;....::;;,,;;;;..;;ttDDttttjjttffLLLLDDff ;;WW##tt " + echo " iiGGii,,....,,iiiiii,,ii ::ttEEttffDDttLLttLLKKii GG##KK.. " + echo " LLtt......,,;;;;;;iiiiii;;;;KKffLLKK;;;;tttttt tt##WWii " + echo " ..ii;;;;..;;iiii;;tt,,jj iiGGffLLKK....;;.... ;;WW##ff.. " + echo " ..;;..::;;iiiiii;;..jj;;..GGttffEE........ iiKK##LL.. " + echo " ..,,..;;;;;;;;..;;iitt,,ttttjjLL iiKK##LL.. " + echo " ............ ,,;;;;..;;;;LLii ..ttKKKKtt.. " + echo " ..::........;;......;;;;;; ..iiDDWWLL,, " + echo " ....;;................iittGGDDff;; " + echo " ....;;;;;;;;;;iiiiii::.. " + echo "Get yourself a real OS." + echo "http://www.microsoft.com/" + exit_script 1 esac } @@ -471,10 +503,7 @@ update_boot_images() { get_url http://downloads.factorcode.org/images/latest/checksums.txt factorcode_md5=`cat checksums.txt|grep $BOOT_IMAGE|cut -f2 -d' '`; set_md5sum - case $OS in - netbsd) disk_md5=`md5 $BOOT_IMAGE | cut -f4 -d' '`;; - *) disk_md5=`$MD5SUM $BOOT_IMAGE|cut -f1 -d' '` ;; - esac + disk_md5=`$MD5SUM $BOOT_IMAGE|cut -f1 -d' '` ;; $ECHO "Factorcode md5: $factorcode_md5"; $ECHO "Disk md5: $disk_md5"; if [[ "$factorcode_md5" == "$disk_md5" ]] ; then diff --git a/core/kernel/kernel-tests.factor b/core/kernel/kernel-tests.factor index 7d5f7b538b..3432026e92 100644 --- a/core/kernel/kernel-tests.factor +++ b/core/kernel/kernel-tests.factor @@ -49,10 +49,10 @@ IN: kernel.tests : overflow-c ( -- ) overflow-c overflow-c ; -! The VM cannot recover from callstack overflow on Windows or -! OpenBSD, because no facility exists to run memory protection +! The VM cannot recover from callstack overflow on Windows, +! because no facility exists to run memory protection ! fault handlers on an alternate callstack. -os [ windows? ] [ openbsd? ] bi or [ +os windows? [ [ overflow-c ] [ { "kernel-error" 15 f f } = ] must-fail-with ] unless diff --git a/core/system/system-docs.factor b/core/system/system-docs.factor index 9829eeca9b..7efee3d60a 100644 --- a/core/system/system-docs.factor +++ b/core/system/system-docs.factor @@ -37,17 +37,12 @@ ARTICLE: "os" "Operating system detection" { $subsections os } "Supported operating systems:" { $subsections - freebsd linux macosx - openbsd - netbsd - solaris windows } "Operating system families:" { $subsections - bsd unix windows } ; diff --git a/core/system/system.factor b/core/system/system.factor index db053007d3..731cbd3108 100644 --- a/core/system/system.factor +++ b/core/system/system.factor @@ -11,15 +11,9 @@ UNION: ppc ppc.32 ppc.64 ; : cpu ( -- class ) \ cpu get-global ; foldable -SINGLETON: windows +SINGLETONS: windows macosx linux ; -SINGLETONS: freebsd netbsd openbsd solaris macosx linux ; - -SINGLETON: haiku - -UNION: bsd freebsd netbsd openbsd macosx ; - -UNION: unix bsd solaris linux haiku ; +UNION: unix macosx linux ; : os ( -- class ) \ os get-global ; foldable @@ -39,13 +33,8 @@ UNION: unix bsd solaris linux haiku ; : string>os ( str -- class ) H{ { "windows" windows } - { "freebsd" freebsd } - { "netbsd" netbsd } - { "openbsd" openbsd } - { "solaris" solaris } { "macosx" macosx } { "linux" linux } - { "haiku" haiku } } at ; PRIVATE> diff --git a/extra/io/serial/unix/bsd/bsd.factor b/extra/io/serial/unix/bsd/bsd.factor deleted file mode 100644 index 14d4f515ae..0000000000 --- a/extra/io/serial/unix/bsd/bsd.factor +++ /dev/null @@ -1,87 +0,0 @@ -! Copyright (C) 2008 Doug Coleman. -! See http://factorcode.org/license.txt for BSD license. -USING: alien.syntax kernel math.bitwise sequences system io.serial -literals ; -IN: io.serial.unix - -M: bsd lookup-baud ( m -- n ) - dup { - 0 50 75 110 134 150 200 300 600 1200 1800 2400 4800 - 7200 9600 14400 19200 28800 38400 57600 76800 115200 - 230400 460800 921600 - } member? [ invalid-baud ] unless ; - -CONSTANT: TCSANOW 0 -CONSTANT: TCSADRAIN 1 -CONSTANT: TCSAFLUSH 2 -CONSTANT: TCSASOFT HEX: 10 - -CONSTANT: TCIFLUSH 1 -CONSTANT: TCOFLUSH 2 -CONSTANT: TCIOFLUSH 3 -CONSTANT: TCOOFF 1 -CONSTANT: TCOON 2 -CONSTANT: TCIOFF 3 -CONSTANT: TCION 4 - -! iflags -CONSTANT: IGNBRK HEX: 00000001 -CONSTANT: BRKINT HEX: 00000002 -CONSTANT: IGNPAR HEX: 00000004 -CONSTANT: PARMRK HEX: 00000008 -CONSTANT: INPCK HEX: 00000010 -CONSTANT: ISTRIP HEX: 00000020 -CONSTANT: INLCR HEX: 00000040 -CONSTANT: IGNCR HEX: 00000080 -CONSTANT: ICRNL HEX: 00000100 -CONSTANT: IXON HEX: 00000200 -CONSTANT: IXOFF HEX: 00000400 -CONSTANT: IXANY HEX: 00000800 -CONSTANT: IMAXBEL HEX: 00002000 -CONSTANT: IUTF8 HEX: 00004000 - -! oflags -CONSTANT: OPOST HEX: 00000001 -CONSTANT: ONLCR HEX: 00000002 -CONSTANT: OXTABS HEX: 00000004 -CONSTANT: ONOEOT HEX: 00000008 - -! cflags -CONSTANT: CIGNORE HEX: 00000001 -CONSTANT: CSIZE HEX: 00000300 -CONSTANT: CS5 HEX: 00000000 -CONSTANT: CS6 HEX: 00000100 -CONSTANT: CS7 HEX: 00000200 -CONSTANT: CS8 HEX: 00000300 -CONSTANT: CSTOPB HEX: 00000400 -CONSTANT: CREAD HEX: 00000800 -CONSTANT: PARENB HEX: 00001000 -CONSTANT: PARODD HEX: 00002000 -CONSTANT: HUPCL HEX: 00004000 -CONSTANT: CLOCAL HEX: 00008000 -CONSTANT: CCTS_OFLOW HEX: 00010000 -CONSTANT: CRTS_IFLOW HEX: 00020000 -CONSTANT: CRTSCTS flags{ CCTS_OFLOW CRTS_IFLOW } -CONSTANT: CDTR_IFLOW HEX: 00040000 -CONSTANT: CDSR_OFLOW HEX: 00080000 -CONSTANT: CCAR_OFLOW HEX: 00100000 -CONSTANT: MDMBUF HEX: 00100000 - -! lflags -CONSTANT: ECHOKE HEX: 00000001 -CONSTANT: ECHOE HEX: 00000002 -CONSTANT: ECHOK HEX: 00000004 -CONSTANT: ECHO HEX: 00000008 -CONSTANT: ECHONL HEX: 00000010 -CONSTANT: ECHOPRT HEX: 00000020 -CONSTANT: ECHOCTL HEX: 00000040 -CONSTANT: ISIG HEX: 00000080 -CONSTANT: ICANON HEX: 00000100 -CONSTANT: ALTWERASE HEX: 00000200 -CONSTANT: IEXTEN HEX: 00000400 -CONSTANT: EXTPROC HEX: 00000800 -CONSTANT: TOSTOP HEX: 00400000 -CONSTANT: FLUSHO HEX: 00800000 -CONSTANT: NOKERNINFO HEX: 02000000 -CONSTANT: PENDIN HEX: 20000000 -CONSTANT: NOFLSH HEX: 80000000 diff --git a/extra/io/serial/unix/bsd/platforms.txt b/extra/io/serial/unix/bsd/platforms.txt deleted file mode 100644 index df796f15d4..0000000000 --- a/extra/io/serial/unix/bsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -bsd diff --git a/extra/io/serial/unix/termios/bsd/platforms.txt b/extra/io/serial/unix/termios/bsd/platforms.txt deleted file mode 100644 index df796f15d4..0000000000 --- a/extra/io/serial/unix/termios/bsd/platforms.txt +++ /dev/null @@ -1 +0,0 @@ -bsd diff --git a/extra/io/serial/unix/termios/bsd/bsd.factor b/extra/io/serial/unix/termios/macosx/macosx.factor similarity index 100% rename from extra/io/serial/unix/termios/bsd/bsd.factor rename to extra/io/serial/unix/termios/macosx/macosx.factor diff --git a/extra/io/serial/unix/termios/macosx/platforms.txt b/extra/io/serial/unix/termios/macosx/platforms.txt new file mode 100644 index 0000000000..6e806f449e --- /dev/null +++ b/extra/io/serial/unix/termios/macosx/platforms.txt @@ -0,0 +1 @@ +macosx diff --git a/extra/io/serial/unix/termios/termios.factor b/extra/io/serial/unix/termios/termios.factor index 9001287d81..87bddb5cb5 100644 --- a/extra/io/serial/unix/termios/termios.factor +++ b/extra/io/serial/unix/termios/termios.factor @@ -5,5 +5,5 @@ IN: io.serial.unix.termios { { [ os linux? ] [ "io.serial.unix.termios.linux" ] } - { [ os bsd? ] [ "io.serial.unix.termios.bsd" ] } + { [ os macosx? ] [ "io.serial.unix.termios.macosx" ] } } cond require diff --git a/extra/io/serial/unix/unix-tests.factor b/extra/io/serial/unix/unix-tests.factor index f9b047c87b..9c3e405fcf 100644 --- a/extra/io/serial/unix/unix-tests.factor +++ b/extra/io/serial/unix/unix-tests.factor @@ -4,11 +4,6 @@ USING: accessors io io.serial io.serial.unix kernel literals math.bitwise tools.test ; IN: io.serial.unix -! "/dev/ttyS0" ! netbsd -! "/dev/dty00" ! netbsd -! "/dev/ttyd0" ! freebsd -! "/dev/ttyU0" ! openbsd - : ( -- serial-port ) "/dev/ttyS0" 19200 ; diff --git a/extra/io/serial/unix/unix.factor b/extra/io/serial/unix/unix.factor index f048b13c02..ffc07683a9 100644 --- a/extra/io/serial/unix/unix.factor +++ b/extra/io/serial/unix/unix.factor @@ -9,7 +9,6 @@ IN: io.serial.unix << { { [ os linux? ] [ "io.serial.unix.linux" ] } - { [ os bsd? ] [ "io.serial.unix.bsd" ] } } cond require >> FUNCTION: speed_t cfgetispeed ( termios* t ) ; diff --git a/extra/mason/platform/platform.factor b/extra/mason/platform/platform.factor index 4564815cc0..0c52a8cd3e 100644 --- a/extra/mason/platform/platform.factor +++ b/extra/mason/platform/platform.factor @@ -12,7 +12,7 @@ IN: mason.platform target-variant get [ "-" glue ] when* ; : gnu-make ( -- string ) - target-os get { freebsd openbsd netbsd } member? "gmake" "make" ? ; + "make" ; : boot-image-arch ( -- string ) target-os get target-cpu get arch ; diff --git a/extra/mason/release/branch/branch-tests.factor b/extra/mason/release/branch/branch-tests.factor index 47ebe3b404..21612a03a6 100644 --- a/extra/mason/release/branch/branch-tests.factor +++ b/extra/mason/release/branch/branch-tests.factor @@ -13,13 +13,13 @@ system ; ] with-scope ] unit-test -[ { "scp" "boot.unix-x86.64.image" "joe@blah.com:/stuff/clean/netbsd-x86-64" } ] [ +[ { "scp" "boot.unix-x86.64.image" "joe@blah.com:/stuff/clean/windows-x86-64" } ] [ [ "scp" scp-command set "joe" image-username set "blah.com" image-host set "/stuff/clean" image-directory set - netbsd target-os set + windows target-os set x86.64 target-cpu set upload-clean-image-cmd ] with-scope diff --git a/extra/update/util/util.factor b/extra/update/util/util.factor index d0290ed94f..d5eb337dca 100644 --- a/extra/update/util/util.factor +++ b/extra/update/util/util.factor @@ -46,7 +46,7 @@ DEFER: to-strings ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! : gnu-make ( -- string ) - os { freebsd openbsd netbsd } member? [ "gmake" ] [ "make" ] if ; + "make" ; ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/vm/Config.freebsd b/vm/Config.freebsd deleted file mode 100644 index 1878e994b1..0000000000 --- a/vm/Config.freebsd +++ /dev/null @@ -1,3 +0,0 @@ -include vm/Config.unix -PLAF_DLL_OBJS += vm/os-genunix.o vm/os-freebsd.o vm/mvm-unix.o -LIBS = -L/usr/local/lib/ -lm -lrt $(X11_UI_LIBS) -Wl,--export-dynamic diff --git a/vm/Config.freebsd.x86.32 b/vm/Config.freebsd.x86.32 deleted file mode 100644 index 969ba1cea6..0000000000 --- a/vm/Config.freebsd.x86.32 +++ /dev/null @@ -1,2 +0,0 @@ -include vm/Config.freebsd -include vm/Config.x86.32 diff --git a/vm/Config.freebsd.x86.64 b/vm/Config.freebsd.x86.64 deleted file mode 100644 index 2151a4a6f6..0000000000 --- a/vm/Config.freebsd.x86.64 +++ /dev/null @@ -1,3 +0,0 @@ -include vm/Config.freebsd -include vm/Config.x86.64 -LIBS += -lpthread diff --git a/vm/Config.macosx.ppc b/vm/Config.macosx.ppc deleted file mode 100644 index b4bf8e338f..0000000000 --- a/vm/Config.macosx.ppc +++ /dev/null @@ -1,3 +0,0 @@ -include vm/Config.macosx -PLAF_DLL_OBJS += vm/cpu-ppc.macosx.o -CFLAGS += -arch ppc -force_cpusubtype_ALL diff --git a/vm/Config.netbsd b/vm/Config.netbsd deleted file mode 100644 index 29782c2209..0000000000 --- a/vm/Config.netbsd +++ /dev/null @@ -1,4 +0,0 @@ -include vm/Config.unix -PLAF_DLL_OBJS += vm/os-genunix.o vm/os-netbsd.o vm/mvm-none.o -LIBPATH = -L/usr/X11R7/lib -Wl,-rpath,/usr/X11R7/lib -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -LIBS = -lm -lrt -lssl -lcrypto $(X11_UI_LIBS) -Wl,--export-dynamic diff --git a/vm/Config.netbsd.x86.32 b/vm/Config.netbsd.x86.32 deleted file mode 100644 index 849bd65732..0000000000 --- a/vm/Config.netbsd.x86.32 +++ /dev/null @@ -1,2 +0,0 @@ -include vm/Config.netbsd -include vm/Config.x86.32 diff --git a/vm/Config.netbsd.x86.64 b/vm/Config.netbsd.x86.64 deleted file mode 100644 index 24f86d0118..0000000000 --- a/vm/Config.netbsd.x86.64 +++ /dev/null @@ -1,2 +0,0 @@ -include vm/Config.netbsd -include vm/Config.x86.64 diff --git a/vm/Config.openbsd b/vm/Config.openbsd deleted file mode 100644 index 8290d77056..0000000000 --- a/vm/Config.openbsd +++ /dev/null @@ -1,6 +0,0 @@ -include vm/Config.unix -PLAF_DLL_OBJS += vm/os-genunix.o vm/os-openbsd.o vm/mvm-unix.o -CC = egcc -CPP = eg++ -CFLAGS += -fno-inline-functions -LIBS = -L/usr/local/lib/ -lm $(X11_UI_LIBS) -lz -lssl -lcrypto -lpthread -Wl,--export-dynamic diff --git a/vm/Config.openbsd.x86.32 b/vm/Config.openbsd.x86.32 deleted file mode 100644 index 407083d38e..0000000000 --- a/vm/Config.openbsd.x86.32 +++ /dev/null @@ -1,2 +0,0 @@ -include vm/Config.openbsd -include vm/Config.x86.32 diff --git a/vm/Config.openbsd.x86.64 b/vm/Config.openbsd.x86.64 deleted file mode 100644 index d254e61bf8..0000000000 --- a/vm/Config.openbsd.x86.64 +++ /dev/null @@ -1,2 +0,0 @@ -include vm/Config.openbsd -include vm/Config.x86.64 diff --git a/vm/Config.solaris b/vm/Config.solaris deleted file mode 100644 index cb99c2239a..0000000000 --- a/vm/Config.solaris +++ /dev/null @@ -1,6 +0,0 @@ -include vm/Config.unix -PLAF_DLL_OBJS += vm/os-genunix.o vm/os-solaris.o -CFLAGS += -D_STDC_C99 -Drestrict="" -LIBS += -ldl -lsocket -lnsl -lm -lrt -R/opt/PM/lib -R/opt/csw/lib \ - -R/usr/local/lib -R/usr/sfw/lib -R/usr/X11R6/lib \ - -R/opt/sfw/lib $(X11_UI_LIBS) -Wl,--export-dynamic diff --git a/vm/Config.solaris.x86.32 b/vm/Config.solaris.x86.32 deleted file mode 100644 index ffe59be468..0000000000 --- a/vm/Config.solaris.x86.32 +++ /dev/null @@ -1,2 +0,0 @@ -include vm/Config.solaris -include vm/Config.x86.32 diff --git a/vm/Config.solaris.x86.64 b/vm/Config.solaris.x86.64 deleted file mode 100644 index 116725daed..0000000000 --- a/vm/Config.solaris.x86.64 +++ /dev/null @@ -1,2 +0,0 @@ -include vm/Config.solaris -include vm/Config.x86.64 diff --git a/vm/factor.cpp b/vm/factor.cpp index f861374b35..8b777f87b5 100755 --- a/vm/factor.cpp +++ b/vm/factor.cpp @@ -15,9 +15,7 @@ void factor_vm::default_parameters(vm_parameters *p) p->datastack_size = 32 * sizeof(cell); p->retainstack_size = 32 * sizeof(cell); -#if defined(__OpenBSD__) && defined(FACTOR_X86) - p->callstack_size = 64 * sizeof(cell); -#elif defined(FACTOR_PPC) +#if defined(FACTOR_PPC) p->callstack_size = 256 * sizeof(cell); #else p->callstack_size = 128 * sizeof(cell); diff --git a/vm/mvm-none.cpp b/vm/mvm-none.cpp index b6198afd25..56692d16de 100644 --- a/vm/mvm-none.cpp +++ b/vm/mvm-none.cpp @@ -1,8 +1,5 @@ #include "master.hpp" -/* Multi-VM threading is not supported on NetBSD due to -http://gnats.netbsd.org/25563 */ - namespace factor { diff --git a/vm/os-freebsd-x86.32.hpp b/vm/os-freebsd-x86.32.hpp deleted file mode 100644 index 664da1e997..0000000000 --- a/vm/os-freebsd-x86.32.hpp +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include - -namespace factor -{ - -inline static unsigned int uap_fpu_status(void *uap) -{ - ucontext_t *ucontext = (ucontext_t *)uap; - if (ucontext->uc_mcontext.mc_fpformat == _MC_FPFMT_387) - { - struct save87 *x87 = (struct save87 *)(&ucontext->uc_mcontext.mc_fpstate); - return x87->sv_env.en_sw; - } - else if (ucontext->uc_mcontext.mc_fpformat == _MC_FPFMT_XMM) - { - struct savexmm *xmm = (struct savexmm *)(&ucontext->uc_mcontext.mc_fpstate); - return xmm->sv_env.en_sw | xmm->sv_env.en_mxcsr; - } - else - return 0; -} - -inline static void uap_clear_fpu_status(void *uap) -{ - ucontext_t *ucontext = (ucontext_t *)uap; - if (ucontext->uc_mcontext.mc_fpformat == _MC_FPFMT_387) - { - struct save87 *x87 = (struct save87 *)(&ucontext->uc_mcontext.mc_fpstate); - x87->sv_env.en_sw = 0; - } - else if (ucontext->uc_mcontext.mc_fpformat == _MC_FPFMT_XMM) - { - struct savexmm *xmm = (struct savexmm *)(&ucontext->uc_mcontext.mc_fpstate); - xmm->sv_env.en_sw = 0; - xmm->sv_env.en_mxcsr &= 0xffffffc0; - } -} - - -#define UAP_STACK_POINTER(ucontext) (((ucontext_t *)ucontext)->uc_mcontext.mc_esp) -#define UAP_PROGRAM_COUNTER(ucontext) (((ucontext_t *)ucontext)->uc_mcontext.mc_eip) - -} diff --git a/vm/os-freebsd-x86.64.hpp b/vm/os-freebsd-x86.64.hpp deleted file mode 100644 index c691409dd1..0000000000 --- a/vm/os-freebsd-x86.64.hpp +++ /dev/null @@ -1,34 +0,0 @@ -#include -#include - -namespace factor -{ - -inline static unsigned int uap_fpu_status(void *uap) -{ - ucontext_t *ucontext = (ucontext_t *)uap; - if (ucontext->uc_mcontext.mc_fpformat == _MC_FPFMT_XMM) - { - struct savefpu *xmm = (struct savefpu *)(&ucontext->uc_mcontext.mc_fpstate); - return xmm->sv_env.en_sw | xmm->sv_env.en_mxcsr; - } - else - return 0; -} - -inline static void uap_clear_fpu_status(void *uap) -{ - ucontext_t *ucontext = (ucontext_t *)uap; - if (ucontext->uc_mcontext.mc_fpformat == _MC_FPFMT_XMM) - { - struct savefpu *xmm = (struct savefpu *)(&ucontext->uc_mcontext.mc_fpstate); - xmm->sv_env.en_sw = 0; - xmm->sv_env.en_mxcsr &= 0xffffffc0; - } -} - - -#define UAP_STACK_POINTER(ucontext) (((ucontext_t *)ucontext)->uc_mcontext.mc_rsp) -#define UAP_PROGRAM_COUNTER(ucontext) (((ucontext_t *)ucontext)->uc_mcontext.mc_rip) - -} diff --git a/vm/os-freebsd.cpp b/vm/os-freebsd.cpp deleted file mode 100644 index d259658284..0000000000 --- a/vm/os-freebsd.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include "master.hpp" - -namespace factor -{ - -/* From SBCL */ -const char *vm_executable_path() -{ - char path[PATH_MAX + 1]; - - if (getosreldate() >= 600024) - { - /* KERN_PROC_PATHNAME is available */ - size_t len = PATH_MAX + 1; - int mib[4]; - - mib[0] = CTL_KERN; - mib[1] = KERN_PROC; - mib[2] = KERN_PROC_PATHNAME; - mib[3] = -1; - if (sysctl(mib, 4, &path, &len, NULL, 0) != 0) - return NULL; - } - else - { - int size; - size = readlink("/proc/curproc/file", path, sizeof(path) - 1); - if (size < 0) - return NULL; - path[size] = '\0'; - } - - if(strcmp(path, "unknown") == 0) - return NULL; - - return safe_strdup(path); -} - -} diff --git a/vm/os-freebsd.hpp b/vm/os-freebsd.hpp deleted file mode 100644 index cd49e07a1b..0000000000 --- a/vm/os-freebsd.hpp +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include - -extern "C" int getosreldate(); - -#ifndef KERN_PROC_PATHNAME -#define KERN_PROC_PATHNAME 12 -#endif - -#define UAP_STACK_POINTER_TYPE __register_t - -#define CODE_TO_FUNCTION_POINTER(code) (void)0 -#define CODE_TO_FUNCTION_POINTER_CALLBACK(vm, code) (void)0 -#define FUNCTION_CODE_POINTER(ptr) ptr -#define FUNCTION_TOC_POINTER(ptr) ptr -#define UAP_SET_TOC_POINTER(uap, ptr) (void)0 diff --git a/vm/os-netbsd-x86.32.hpp b/vm/os-netbsd-x86.32.hpp deleted file mode 100644 index 21b3557239..0000000000 --- a/vm/os-netbsd-x86.32.hpp +++ /dev/null @@ -1,11 +0,0 @@ -#include - -namespace factor -{ - -static inline unsigned int uap_fpu_status(void *uap) { return 0; } -static inline void uap_clear_fpu_status(void *uap) {} - -#define UAP_STACK_POINTER(ucontext) (_UC_MACHINE_SP((ucontext_t *)ucontext)) - -} diff --git a/vm/os-netbsd-x86.64.hpp b/vm/os-netbsd-x86.64.hpp deleted file mode 100644 index 3e94998993..0000000000 --- a/vm/os-netbsd-x86.64.hpp +++ /dev/null @@ -1,11 +0,0 @@ -#include - -namespace factor -{ - -static inline unsigned int uap_fpu_status(void *uap) { return 0; } -static inline void uap_clear_fpu_status(void *uap) {} - -#define UAP_STACK_POINTER(ucontext) (((ucontext_t *)ucontext)->uc_mcontext.__gregs[_REG_URSP]) - -} diff --git a/vm/os-netbsd.cpp b/vm/os-netbsd.cpp deleted file mode 100644 index e1bdc30460..0000000000 --- a/vm/os-netbsd.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include "master.hpp" - -namespace factor -{ - -extern "C" int main(); - -const char *vm_executable_path() -{ - static Dl_info info = {0}; - if (!info.dli_fname) - dladdr((void *)main, &info); - return safe_strdup(info.dli_fname); -} - -} diff --git a/vm/os-netbsd.hpp b/vm/os-netbsd.hpp deleted file mode 100644 index fa27b23287..0000000000 --- a/vm/os-netbsd.hpp +++ /dev/null @@ -1,11 +0,0 @@ -#include - -#define UAP_PROGRAM_COUNTER(uap) _UC_MACHINE_PC((ucontext_t *)uap) - -#define UAP_STACK_POINTER_TYPE __greg_t - -#define UAP_SET_TOC_POINTER(uap, ptr) (void)0 -#define CODE_TO_FUNCTION_POINTER(code) (void)0 -#define CODE_TO_FUNCTION_POINTER_CALLBACK(vm, code) (void)0 -#define FUNCTION_CODE_POINTER(ptr) ptr -#define FUNCTION_TOC_POINTER(ptr) ptr diff --git a/vm/os-openbsd-x86.32.hpp b/vm/os-openbsd-x86.32.hpp deleted file mode 100644 index 34a641c235..0000000000 --- a/vm/os-openbsd-x86.32.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#include - -namespace factor -{ - -static inline unsigned int uap_fpu_status(void *uap) { return 0; } -static inline void uap_clear_fpu_status(void *uap) {} - -#define UAP_STACK_POINTER(ucontext) (((struct sigcontext *)ucontext)->sc_esp) -#define UAP_PROGRAM_COUNTER(ucontext) (((struct sigcontext *)ucontext)->sc_eip) - -} diff --git a/vm/os-openbsd-x86.64.hpp b/vm/os-openbsd-x86.64.hpp deleted file mode 100644 index 032e77b154..0000000000 --- a/vm/os-openbsd-x86.64.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#include - -namespace factor -{ - -static inline unsigned int uap_fpu_status(void *uap) { return 0; } -static inline void uap_clear_fpu_status(void *uap) {} - -#define UAP_STACK_POINTER(ucontext) (((struct sigcontext *)ucontext)->sc_rsp) -#define UAP_PROGRAM_COUNTER(ucontext) (((struct sigcontext *)ucontext)->sc_rip) - -} diff --git a/vm/os-openbsd.cpp b/vm/os-openbsd.cpp deleted file mode 100644 index f763f8055f..0000000000 --- a/vm/os-openbsd.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "master.hpp" - -namespace factor -{ - -const char *vm_executable_path() -{ - return NULL; -} - -} diff --git a/vm/os-openbsd.hpp b/vm/os-openbsd.hpp deleted file mode 100644 index 1eca1ec03b..0000000000 --- a/vm/os-openbsd.hpp +++ /dev/null @@ -1,7 +0,0 @@ -#define UAP_STACK_POINTER_TYPE __register_t - -#define UAP_SET_TOC_POINTER(uap, ptr) (void)0 -#define CODE_TO_FUNCTION_POINTER(code) (void)0 -#define CODE_TO_FUNCTION_POINTER_CALLBACK(vm, code) (void)0 -#define FUNCTION_CODE_POINTER(ptr) ptr -#define FUNCTION_TOC_POINTER(ptr) ptr diff --git a/vm/os-solaris-x86.32.hpp b/vm/os-solaris-x86.32.hpp deleted file mode 100644 index d098ac8f93..0000000000 --- a/vm/os-solaris-x86.32.hpp +++ /dev/null @@ -1,14 +0,0 @@ -#include - -namespace factor -{ - -#define UAP_STACK_POINTER(ucontext) (((ucontext_t *)ucontext)->uc_mcontext.gregs[ESP]) -#define UAP_PROGRAM_COUNTER(ucontext) (((ucontext_t *)ucontext)->uc_mcontext.gregs[EIP]) - -#define UAP_SET_TOC_POINTER(uap, ptr) (void)0 -#define CODE_TO_FUNCTION_POINTER(code) (void)0 -#define CODE_TO_FUNCTION_POINTER_CALLBACK(vm, code) (void)0 -#define FUNCTION_CODE_POINTER(ptr) ptr -#define FUNCTION_TOC_POINTER(ptr) ptr -} diff --git a/vm/os-solaris-x86.64.hpp b/vm/os-solaris-x86.64.hpp deleted file mode 100644 index d13f5c6bc6..0000000000 --- a/vm/os-solaris-x86.64.hpp +++ /dev/null @@ -1,14 +0,0 @@ -#include - -namespace factor -{ - -#define UAP_STACK_POINTER(ucontext) (((ucontext_t *)ucontext)->uc_mcontext.gregs[RSP]) -#define UAP_PROGRAM_COUNTER(ucontext) (((ucontext_t *)ucontext)->uc_mcontext.gregs[RIP]) - -#define UAP_SET_TOC_POINTER(uap, ptr) (void)0 -#define CODE_TO_FUNCTION_POINTER(code) (void)0 -#define CODE_TO_FUNCTION_POINTER_CALLBACK(vm, code) (void)0 -#define FUNCTION_CODE_POINTER(ptr) ptr -#define FUNCTION_TOC_POINTER(ptr) ptr -} diff --git a/vm/os-solaris.cpp b/vm/os-solaris.cpp deleted file mode 100644 index f763f8055f..0000000000 --- a/vm/os-solaris.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "master.hpp" - -namespace factor -{ - -const char *vm_executable_path() -{ - return NULL; -} - -} diff --git a/vm/platform.hpp b/vm/platform.hpp index 9494b7de56..959e622a51 100755 --- a/vm/platform.hpp +++ b/vm/platform.hpp @@ -31,41 +31,7 @@ #else #include "os-genunix.hpp" - #ifdef __FreeBSD__ - #define FACTOR_OS_STRING "freebsd" - #include "os-freebsd.hpp" - - #if defined(FACTOR_X86) - #include "os-freebsd-x86.32.hpp" - #elif defined(FACTOR_AMD64) - #include "os-freebsd-x86.64.hpp" - #else - #error "Unsupported FreeBSD flavor" - #endif - #elif defined(__OpenBSD__) - #define FACTOR_OS_STRING "openbsd" - #include "os-openbsd.hpp" - - #if defined(FACTOR_X86) - #include "os-openbsd-x86.32.hpp" - #elif defined(FACTOR_AMD64) - #include "os-openbsd-x86.64.hpp" - #else - #error "Unsupported OpenBSD flavor" - #endif - #elif defined(__NetBSD__) - #define FACTOR_OS_STRING "netbsd" - #include "os-netbsd.hpp" - - #if defined(FACTOR_X86) - #include "os-netbsd-x86.32.hpp" - #elif defined(FACTOR_AMD64) - #include "os-netbsd-x86.64.hpp" - #else - #error "Unsupported NetBSD flavor" - #endif - - #elif defined(linux) + #if defined(linux) #define FACTOR_OS_STRING "linux" #include "os-linux.hpp" @@ -82,17 +48,6 @@ #else #error "Unsupported Linux flavor" #endif - #elif defined(__SVR4) && defined(sun) - #define FACTOR_OS_STRING "solaris" - - #if defined(FACTOR_X86) - #include "os-solaris-x86.32.hpp" - #elif defined(FACTOR_AMD64) - #include "os-solaris-x86.64.hpp" - #else - #error "Unsupported Solaris flavor" - #endif - #else #error "Unsupported OS" #endif