I'm using a Leonardo (atmega32u4) and I want it to behave differently depending on which operating system it's connected to via USB.
It'll just simplify my code a bit if a function is out there which returns the operating system. If not I think I'll just have to code an operating system selector in or something.
Not really what you're looking for but you could get information on which OS the sketch was compiled on by parsing the FILE macro. However, that doesn't tell you anything about the OS running on any computer the device is connected to later.