native uname
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use v6; | |
| use NativeCall; | |
| class Utsname is repr('CStruct') { | |
| has Str $.sysname; | |
| has Str $.nodename; | |
| has Str $.release; | |
| has Str $.version; | |
| has Str $.machine; | |
| } | |
| sub uname(Utsname $utsname --> Int) is native { ... } | |
| my $a = Utsname.new; | |
| say $a; | |
| say uname($a); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment