Skip to content

Instantly share code, notes, and snippets.

@matheuss
Created November 16, 2013 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matheuss/7503767 to your computer and use it in GitHub Desktop.
Save matheuss/7503767 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#if defined __unix__
#define os 1
#elif defined _WIN32
#define os 2
#endif
int main()
{
if(os == 1)
{
printf("Unix\n");
}
else if(os == 2)
{
printf("Windows\n");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment