Diff for /imach/src/imach.c between versions 1.173 and 1.174

version 1.173, 2015/01/03 12:06:26 version 1.174, 2015/01/03 16:15:49
Line 1 Line 1
 /* $Id$  /* $Id$
   $State$    $State$
   $Log$    $Log$
     Revision 1.174  2015/01/03 16:15:49  brouard
     Summary: Still in cross-compilation
   
   Revision 1.173  2015/01/03 12:06:26  brouard    Revision 1.173  2015/01/03 12:06:26  brouard
   Summary: trying to detect cross-compilation    Summary: trying to detect cross-compilation
   
Line 5498  BOOL IsWow64() Line 5501  BOOL IsWow64()
 void syscompilerinfo()  void syscompilerinfo()
  {   {
    /* #include "syscompilerinfo.h"*/     /* #include "syscompilerinfo.h"*/
    /* #include <gnu/libc-version.h> */ /* Only on gnu */  #if defined(__GNUC__) 
   #include <gnu/libc-version.h>  /* Only on gnu */
   #endif
   
 #include <stdint.h>  #include <stdint.h>
    printf("Compiled with:");fprintf(ficlog,"Compiled with:");     printf("Compiled with:");fprintf(ficlog,"Compiled with:");
 #if defined(__clang__)  #if defined(__clang__)
Line 5525  void syscompilerinfo() Line 5531  void syscompilerinfo()
 #if defined(__SUNPRO_C) || defined(__SUNPRO_CC)  #if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
    printf(" Oracle Solaris Studio");fprintf(ficlog," Oracle Solaris Studio\n");/* Oracle Solaris Studio. ----------------------------------- */     printf(" Oracle Solaris Studio");fprintf(ficlog," Oracle Solaris Studio\n");/* Oracle Solaris Studio. ----------------------------------- */
 #endif  #endif
    printf(". ");fprintf(ficlog,". ");     printf(" for ");fprintf(ficlog," for ");
         
 // http://stackoverflow.com/questions/4605842/how-to-identify-platform-compiler-from-preprocessor-macros  // http://stackoverflow.com/questions/4605842/how-to-identify-platform-compiler-from-preprocessor-macros
 #ifdef _WIN32 // note the underscore: without it, it's not msdn official!  #ifdef _WIN32 // note the underscore: without it, it's not msdn official!
     // Windows (x64 and x86)      // Windows (x64 and x86)
    printf("Windows (x64 and x86). ");fprintf(ficlog,"Windows (x64 and x86). ");     printf("Windows (x64 and x86) ");fprintf(ficlog,"Windows (x64 and x86) ");
 #elif __unix__ // all unices, not all compilers  #elif __unix__ // all unices, not all compilers
     // Unix      // Unix
    printf("Unix. ");fprintf(ficlog,"Unix. ");     printf("Unix ");fprintf(ficlog,"Unix ");
 #elif __linux__  #elif __linux__
     // linux      // linux
    printf("linux. ");fprintf(ficlog,"linux. ");     printf("linux ");fprintf(ficlog,"linux ");
 #elif __APPLE__  #elif __APPLE__
     // Mac OS, not sure if this is covered by __posix__ and/or __unix__ though...      // Mac OS, not sure if this is covered by __posix__ and/or __unix__ though..
    printf("Mac OS. ");fprintf(ficlog,"Mac OS. ");     printf("Mac OS ");fprintf(ficlog,"Mac OS ");
 #endif  #endif
   
 /*  __MINGW32__   */  /*  __MINGW32__   */
Line 5553  void syscompilerinfo() Line 5559  void syscompilerinfo()
 /* _DEBUG // Defined when you compile with /LDd, /MDd, and /MTd. */  /* _DEBUG // Defined when you compile with /LDd, /MDd, and /MTd. */
   
 #if UINTPTR_MAX == 0xffffffff  #if UINTPTR_MAX == 0xffffffff
    printf(" 32-bit.\n"); fprintf(ficlog," 32-bit.\n");/* 32-bit */     printf(" 32-bit"); fprintf(ficlog," 32-bit");/* 32-bit */
 #elif UINTPTR_MAX == 0xffffffffffffffff  #elif UINTPTR_MAX == 0xffffffffffffffff
    printf(" 64-bit.\n"); fprintf(ficlog," 64-bit.\n");/* 64-bit */     printf(" 64-bit"); fprintf(ficlog," 64-bit");/* 64-bit */
 #else  #else
    printf(" wtf-bit.\n"); fprintf(ficlog," wtf-bit.\n");/* wtf */     printf(" wtf-bit"); fprintf(ficlog," wtf-bit");/* wtf */
 #endif  #endif
   
 /* struct utsname sysInfo;  /* struct utsname sysInfo;
Line 5578  void syscompilerinfo() Line 5584  void syscompilerinfo()
 #  define __GNUC_VERSION__ (__GNUC__ * 10000 \  #  define __GNUC_VERSION__ (__GNUC__ * 10000 \
                             + __GNUC_MINOR__ * 100)                              + __GNUC_MINOR__ * 100)
 # endif  # endif
    printf("GNU C version %d.\n", __GNUC_VERSION__);     printf(" using GNU C version %d.\n", __GNUC_VERSION__);
    fprintf(ficlog, "GNU C version %d.\n", __GNUC_VERSION__);     fprintf(ficlog, " using GNU C version %d.\n", __GNUC_VERSION__);
      printf("GNU libc version: %s\n", gnu_get_libc_version()); 
      fprintf(ficlog,"GNU libc version: %s\n", gnu_get_libc_version()); 
   
 #endif  #endif
   
    //   void main()     //   void main()
    //   {     //   {
 #if defined(_MSC_VER)  #if defined(_MSC_VER)
    if (IsWow64())     if (IsWow64()){
            printf("The process is running under WOW64.\n");             printf("The program (probably compile for 32bit) is running under WOW64 (64bit) emulation.\n");
    else             fprintf(ficlog, "The program (ie 32bit) is running under WOW64 (64bit) emulation.\n");
            printf("The process is not running under WOW64.\n");     }
      else{
              printf("The process is not running under WOW64 (i.e probably on a 64bits windows).\n");
              frintf(ficlog,"The programm is not running under WOW64 (i.e probably on a 64bits windows).\n");
      }
    //      printf("\nPress Enter to continue...");     //      printf("\nPress Enter to continue...");
    //      getchar();     //      getchar();
    //   }     //   }
   
 #endif  #endif
         
   /* printf("GNU libc version: %s\n", gnu_get_libc_version()); */  
   
  }   }
   

Removed from v.1.173  
changed lines
  Added in v.1.174


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>