]> henry.ined.fr Git - .git/commitdiff
Summary: Back from Visual C
authorN. Brouard <brouard@ined.fr>
Tue, 23 Dec 2014 13:26:59 +0000 (13:26 +0000)
committerN. Brouard <brouard@ined.fr>
Tue, 23 Dec 2014 13:26:59 +0000 (13:26 +0000)
Still problem with utsname.h on Windows

src/imach.c

index eddf50d3a9743545147347bb4ed25732ed49ad43..6be7e7903d7ec75b0dbbc27404acbae26ef26a9b 100644 (file)
@@ -1,6 +1,11 @@
 /* $Id$
   $State$
   $Log$
+  Revision 1.170  2014/12/23 11:17:12  brouard
+  Summary: Cleaning some \%% back to %%
+
+  The escape was mandatory for a specific compiler (which one?), but too many warnings.
+
   Revision 1.169  2014/12/22 23:08:31  brouard
   Summary: 0.98p
 
 
 #include <limits.h>
 #include <sys/types.h>
-#include <sys/utsname.h>
+
+#if defined(__GNUC__)
+#include <sys/utsname.h> /* Doesn't work on Windows */
+#endif
+
 #include <sys/stat.h>
 #include <errno.h>
 /* extern int errno; */
@@ -5441,7 +5450,7 @@ void syscompilerinfo()
  {
    /* #include "syscompilerinfo.h"*/
    /* #include <gnu/libc-version.h> */ /* Only on gnu */
-
+#include <stdint.h>
    printf("Compiled with:");fprintf(ficlog,"Compiled with:");
 #if defined(__clang__)
    printf(" Clang/LLVM");fprintf(ficlog," Clang/LLVM");        /* Clang/LLVM. ---------------------------------------------- */
@@ -5489,16 +5498,16 @@ void syscompilerinfo()
 /* _WIN64  // Defined for applications for Win64. */
 /* _M_X64 // Defined for compilations that target x64 processors. */
 /* _DEBUG // Defined when you compile with /LDd, /MDd, and /MTd. */
-#include <stdint.h>
+
 #if UINTPTR_MAX == 0xffffffff
-   printf(" 32-bit."); /* 32-bit */
+   printf(" 32-bit.\n"); fprintf(ficlog," 32-bit.\n");/* 32-bit */
 #elif UINTPTR_MAX == 0xffffffffffffffff
-  printf(" 64-bit.");/* 64-bit */
+   printf(" 64-bit.\n"); fprintf(ficlog," 64-bit.\n");/* 64-bit */
 #else
printf(" wtf-bit."); /* wtf */
  printf(" wtf-bit.\n"); fprintf(ficlog," wtf-bit.\n");/* wtf */
 #endif
 
-struct utsname sysInfo;
+/* struct utsname sysInfo;
 
    if (uname(&sysInfo) != -1) {
      printf(" %s %s %s %s %s\n",sysInfo.sysname, sysInfo.nodename, sysInfo.release, sysInfo.version, sysInfo.machine);
@@ -5506,6 +5515,7 @@ struct utsname sysInfo;
    }
    else
       perror("uname() error");
+         */
 #if defined(__GNUC__)
 # if defined(__GNUC_PATCHLEVEL__)
 #  define __GNUC_VERSION__ (__GNUC__ * 10000 \
@@ -5519,8 +5529,8 @@ struct utsname sysInfo;
    fprintf(ficlog, "GNU C version %d.\n", __GNUC_VERSION__);
 #endif
 #if defined(_MSC_VER)
-   printf("Visual C++ compiler: %s \n;", _MSC_FULL_VER);
-   fprintf(ficlog, "Visual C++ compiler: %s \n;", _MSC_FULL_VER);
+   /*printf("Visual C++ compiler: %s \n;", _MSC_FULL_VER);*/
+   /*fprintf(ficlog, "Visual C++ compiler: %s \n;", _MSC_FULL_VER);*/
 #endif
    
   /* printf("GNU libc version: %s\n", gnu_get_libc_version()); */