Closed ghost closed 4 years ago
I am using Arch, not macXD I got that chunk of code from fff:
Lol I love that 'fff' name.
In that case, hopefully somebody else with a Mac can help with this.
Had my buddy who has a Mac get this output for you, so here you go
Darrens-MacBook-Pro:~ nothing$ uname -s
Darwin
Darrens-MacBook-Pro:~ nothing$ cat /proc/version
cat: /proc/version: No such file or directory
So, as you can see /proc/version doesn't exist (There probably is some other similar file you could use, but this one isn't here.) and uname -s is 'Darwin'
Thanks! That's gonna help a lot.
Had my buddy who has a Mac get this output for you, so here you go
Darrens-MacBook-Pro:~ nothing$ uname -s Darwin Darrens-MacBook-Pro:~ nothing$ cat /proc/version cat: /proc/version: No such file or directory
So, as you can see /proc/version doesn't exist (There probably is some other similar file you could use, but this one isn't here.) and uname -s is 'Darwin'
So it means that I can only use Darwin and we can apply it to macos?
Yeah (if you mean create a check for Darwin
based on the output from uname -s
, but don't count on it too much, in-case different versions of MacOS have different output. Hopefully it's always Darwin.
Can you run
uname -s
on your Mac rig? I need to see what is typically displayed. Your OSTYPE check needs addressing, as I believe it's not defined by POSIX, and is probably not best relied upon anyway. However, I'm lead to believe thatuname
is commonplace.Can you also run:
cat /proc/version
(another method, which I've never been able to try on Mac)