move structs around AGAIN
parent
5e57f68814
commit
c4fdad4df6
|
@ -1,21 +1,13 @@
|
||||||
USING: alien alien.c-types alien.syntax arrays calendar
|
USING: alien alien.c-types alien.syntax arrays calendar
|
||||||
kernel structs math unix.time namespaces system ;
|
kernel structs math unix unix.time namespaces system ;
|
||||||
IN: calendar.unix
|
IN: calendar.unix
|
||||||
|
|
||||||
C-STRUCT: timeval
|
|
||||||
{ "long" "sec" }
|
|
||||||
{ "long" "usec" } ;
|
|
||||||
|
|
||||||
: make-timeval ( ms -- timeval )
|
: make-timeval ( ms -- timeval )
|
||||||
1000 /mod 1000 *
|
1000 /mod 1000 *
|
||||||
"timeval" <c-object>
|
"timeval" <c-object>
|
||||||
[ set-timeval-usec ] keep
|
[ set-timeval-usec ] keep
|
||||||
[ set-timeval-sec ] keep ;
|
[ set-timeval-sec ] keep ;
|
||||||
|
|
||||||
C-STRUCT: timespec
|
|
||||||
{ "time_t" "sec" }
|
|
||||||
{ "long" "nsec" } ;
|
|
||||||
|
|
||||||
: make-timespec ( ms -- timespec )
|
: make-timespec ( ms -- timespec )
|
||||||
1000 /mod 1000000 *
|
1000 /mod 1000000 *
|
||||||
"timespec" <c-object>
|
"timespec" <c-object>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
! Copyright (C) 2005, 2007 Slava Pestov.
|
! Copyright (C) 2005, 2007 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: alien alien.c-types alien.syntax kernel libc structs
|
USING: alien alien.c-types alien.syntax kernel libc
|
||||||
sequences continuations byte-arrays strings math namespaces
|
sequences continuations byte-arrays strings math namespaces
|
||||||
system combinators vocabs.loader qualified accessors
|
system combinators vocabs.loader qualified accessors
|
||||||
stack-checker macros locals generalizations unix.types
|
stack-checker macros locals generalizations unix.types
|
||||||
|
@ -29,6 +29,15 @@ C-STRUCT: group
|
||||||
{ "int" "gr_gid" }
|
{ "int" "gr_gid" }
|
||||||
{ "char**" "gr_mem" } ;
|
{ "char**" "gr_mem" } ;
|
||||||
|
|
||||||
|
C-STRUCT: timeval
|
||||||
|
{ "long" "sec" }
|
||||||
|
{ "long" "usec" } ;
|
||||||
|
|
||||||
|
C-STRUCT: timespec
|
||||||
|
{ "time_t" "sec" }
|
||||||
|
{ "long" "nsec" } ;
|
||||||
|
|
||||||
|
|
||||||
LIBRARY: factor
|
LIBRARY: factor
|
||||||
|
|
||||||
FUNCTION: void clear_err_no ( ) ;
|
FUNCTION: void clear_err_no ( ) ;
|
||||||
|
|
Loading…
Reference in New Issue