Determining OS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey.

I want to create a C function that returns the OS that this program is runing on - so, a „basic“ uname. What is the best way to achieve this, cross-platform? The possible build environments might be

	- Linux + GCC or Clang
	- Mac OS X with Clang
	- Windows with cl.exe or GCC or clang

I want to return an entry of an enum, or something similar. Values might be:

	- linux
	- win32
	- mingw
	- mac

How can I best do this?

Kind regards, Ingwie




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux