unix: some using cleanups.

db4
John Benediktsson 2014-12-24 11:16:11 -08:00
parent 3f98ac4a30
commit 28ca2f5275
5 changed files with 11 additions and 16 deletions

View File

@ -1,7 +1,5 @@
USING: kernel alien.c-types alien.data alien.strings sequences
math alien.syntax unix namespaces continuations threads assocs
io.backend.unix io.encodings.utf8 libc unix.types unix.utilities
fry unix.ffi ;
USING: alien.c-types alien.data alien.syntax io.encodings.utf8
kernel libc math sequences unix unix.types unix.utilities ;
IN: unix.process
! Low-level Unix process launching utilities. These are used
@ -28,13 +26,13 @@ FUNCTION: int execve ( c-string path, c-string* argv, c-string* envp ) ;
[ utf8 strings>alien ] tri* execve ;
: exec-args ( seq -- int )
[ first ] [ ] bi exec ;
[ first ] keep exec ;
: exec-args-with-path ( seq -- int )
[ first ] [ ] bi exec-with-path ;
[ first ] keep exec-with-path ;
: exec-args-with-env ( seq seq -- int )
[ [ first ] [ ] bi ] dip exec-with-env ;
[ [ first ] keep ] dip exec-with-env ;
: with-fork ( child parent -- )
[ fork-process ] 2dip if-zero ; inline

View File

@ -1,5 +1,5 @@
USING: alien.c-types arrays accessors combinators classes.struct
alien.syntax unix.time unix.types unix.ffi ;
USING: alien.c-types alien.syntax classes.struct unix.time
unix.types ;
IN: unix.stat
! Mac OS X

View File

@ -1,9 +1,7 @@
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types io.encodings.utf8 io.encodings.string
kernel sequences unix.stat accessors unix combinators math
grouping system alien.strings math.bitwise alien.syntax
unix.types classes.struct unix.ffi literals ;
USING: alien.c-types alien.syntax classes.struct literals
unix.ffi unix.types ;
IN: unix.statfs.macosx
CONSTANT: MNT_RDONLY 0x00000001

View File

@ -1,6 +1,6 @@
USING: alien alien.c-types alien.enums alien.libraries
alien.syntax classes.struct combinators kernel math
system unix.types words ;
system words ;
IN: curl.ffi

View File

@ -1,8 +1,7 @@
! Copyright (C) 2014 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.libraries
alien.libraries.finder alien.syntax classes.struct kernel
unix.types ;
alien.libraries.finder alien.syntax classes.struct kernel ;
IN: forestdb.ffi
! Functions with LIBFDB_API are exported.