]> gitweb.factorcode.org Git - factor.git/commitdiff
system-info.macosx: Implement username
authorDoug Coleman <doug.coleman@gmail.com>
Sun, 31 Jan 2021 03:25:55 +0000 (21:25 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 31 Jan 2021 03:25:55 +0000 (21:25 -0600)
basis/system-info/macosx/macosx.factor

index f973ec8bd1cc740ab7fd63de8c1afa15afc2bfbd..e7e919d93031b5b481b74ea5158216daff28c23c 100644 (file)
@@ -3,7 +3,8 @@
 USING: alien.c-types alien.data alien.strings alien.syntax
 arrays assocs byte-arrays core-foundation io.binary
 io.encodings.utf8 kernel libc sequences specialized-arrays
-splitting system system-info ;
+splitting system system-info unix.users ;
+IN: system-info.macosx
 SPECIALIZED-ARRAY: int
 IN: system-info.macosx
 
@@ -104,3 +105,4 @@ M: macosx physical-mem { 6 24 } sysctl-query-ulonglong ;
 : available-cpus ( -- n ) { 6 25 } sysctl-query-uint ;
 
 M: macosx computer-name { 1 10 } sysctl-query-string "." split1 drop ;
+M: macosx username real-user-name ;
\ No newline at end of file