Mercurial > hg > orthanc-book
changeset 60:298b8b5e3dbc
os info
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 16 Nov 2016 16:20:28 +0100 |
parents | 235fa90a2527 |
children | fc8af28a8eea |
files | HelloWorld/main.cpp |
diffstat | 1 files changed, 18 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/HelloWorld/main.cpp Wed Nov 16 15:51:24 2016 +0100 +++ b/HelloWorld/main.cpp Wed Nov 16 16:20:28 2016 +0100 @@ -4,8 +4,7 @@ int main() { - printf("Hello world!\n"); - + printf("\nHello world!\n\n"); #ifdef NDEBUG printf("This is a release build.\n"); @@ -13,10 +12,9 @@ printf("This is a debug build.\n"); #endif - -#if defined(__MINW64__) +#if defined(__MINGW64__) printf("This build was compiled using MinGW64.\n"); -#elif defined(__MINW32__) +#elif defined(__MINGW32__) printf("This build was compiled using MinGW32.\n"); #elif defined(__GNUC__) printf("This build was compiled using gcc.\n"); @@ -29,5 +27,20 @@ #endif +#if defined(_WIN64) + printf("Running under Windows 64bit.\n"); +#elif defined(_WIN32) + printf("Running under Windows 32bit.\n"); +#elif defined(__linux__) + printf("Running under Linux.\n"); +#elif defined(__APPLE__) && defined(__MACH__) + printf("Running under Apple OS X.\n"); +#else + printf("WARNING: Unknown operating system.\n"); +#endif + + + printf("\n"); + return 0; }