title: How to get product name/version in C/C++ for macOS (ie get "Mac OS" and "10.12.5")
body: <p>I need to get the information in the title. I made sysctl calls to the following variables and it gave me other (not useful) information (usually regarding the kernel not the OS): KERN_VERSION, KERN_OSVERSION, KERN_TYPE, KERN_RELEASE.</p>
  
  <p>I looked at the source code for the command <code>sw_vers</code> here: <a href="https://opensource.apple.com/source/DarwinTools/DarwinTools-1/sw_vers.c" rel="nofollow noreferrer">https://opensource.apple.com/source/DarwinTools/DarwinTools-1/sw_vers.c</a> and tried to implement what they did however while I was able to include  my computer was unable to find  and thus I coulnd't implement. When I look through my /include/ directory I can't find /CoreFoundation/ at all so I don't know where I'm pulling it from.</p>
  
  <p>Any ideas on how I can get this using C/C++?</p>
  
  <p>Thanks</p>