The use of Gestalt() was introduced in commit 2fe3834 to see if we're running on Lion or above. As of 10.8, this function is deprecated.
sysctl(3) should be used instead, perhaps.
sysctl(3) is a LOT harder than Gestalt() to check for, but sure. I'll patch that in.
Actually, I haven't found a way to use sysctl yet. Has anyone a hint for me? :D
size_t size = sizeof(str);
int ret = sysctlbyname("kern.osrelease", str, &size, NULL, 0);
Is the closest I can get-- but Darwin release numbers MAY or MAY NOT correspond to OS X.
I believe the kernel number for Lion was 11, if I'm not mistaken. Anything above that should be safe to use the Lion+ classes on.
We could also use NSAppKitVersionNumber which might be a cleaner way.
NSAppKitVersionNumber wasn't bumped from 10.7.4 to 10.8.0 (I believe), so it may not be entirely reliable.
Alright, then I'll open a PR for sysctl(3) tomorrow.