CONSTANT: SIGSYS 31
FUNCTION: ssize_t sendfile ( int out_fd, int in_fd, off_t* offset, size_t count ) ;
+
+
+CONSTANT: __UT_LINESIZE 32
+CONSTANT: __UT_NAMESIZE 32
+CONSTANT: __UT_HOSTSIZE 256
+
+STRUCT: exit_status
+ { e_termination short }
+ { e_exit short } ;
+
+STRUCT: utmpx
+ { ut_type short }
+ { ut_pid pid_t }
+ { ut_line short }
+ { ut_id short }
+ { ut_user short }
+ { ut_host short }
+ { ut_exit exit_status }
+ { ut_session long }
+ { ut_tv timeval }
+ { ut_addr_v6 int[4] }
+ { __unused char[20] } ;
+++ /dev/null
-Doug Coleman
\ No newline at end of file
+++ /dev/null
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test unix.utmpx.macosx ;
-IN: unix.utmpx.macosx.tests
+++ /dev/null
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax unix.ffi.macosx ;
-IN: unix.utmpx.macosx
-
-! empty
--- /dev/null
+! Copyright (C) 2013 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel tools.test unix.utmpx ;
+IN: unix.utmpx.tests
+
+{ } [ all-utmpx drop ] unit-test
CONSTANT: SIGNATURE 10
CONSTANT: SHUTDOWN_TIME 11
-C-TYPE: utmpx
-
FUNCTION: void setutxent ( ) ;
FUNCTION: void endutxent ( ) ;
FUNCTION: utmpx* getutxent ( ) ;
utmpx-record new ;
M: unix utmpx>utmpx-record ( utmpx -- utmpx-record )
- [ new-utmpx-record ] dip
- {
+ [ new-utmpx-record ] dip {
[ ut_user>> _UTX_USERSIZE memory>string >>user ]
[ ut_id>> _UTX_IDSIZE memory>string >>id ]
[ ut_line>> _UTX_LINESIZE memory>string >>line ]
[ utmpx>utmpx-record ]
produce nip
] with-utmpx ;
-
-os {
- { macosx [ "unix.utmpx.macosx" require ] }
-} case