#include <limits.h>
#include <sys/types.h>
-#if defined(__GNUC__)
-#include <sys/utsname.h> /* Doesn't work on Windows */
-#endif
+/* #if defined(__GNUC__) */
+/* #include <sys/utsname.h> /\* Doesn't work on Windows *\/ */
+/* #endif */
#include <sys/stat.h>
#include <errno.h>
#if defined __INTEL_COMPILER
#if defined(__GNUC__)
- struct utsname sysInfo; /* For Intel on Linux and OS/X */
+ struct utsname sysInfo; /* For Intel on Linux and OS/X but not not on linux mingw-w64*/
#endif
#elif defined(__GNUC__)
#ifndef __APPLE__
-#include <gnu/libc-version.h> /* Only on gnu */
+#ifndef __MINGW32__
+#include <gnu/libc-version.h> /* Only on gnu */
+/* #include <features.h> */ /* Only on gnu */
+ #endif
#endif
+#ifndef __MINGW32__
struct utsname sysInfo;
int cross = CROSS;
if (cross){
if(logged) fprintf(ficlog, "Cross-");
}
#endif
+#endif
printf("Compiled with:");if(logged)fprintf(ficlog,"Compiled with:");
#if defined(__clang__)
#endif
#if defined(__GNUC__) || defined(__GNUG__)
printf(" GNU GCC/G++");if(logged)fprintf(ficlog," GNU GCC/G++");/* GNU GCC/G++. --------------------------------------------- */
+#if defined(__MINGW32__)
+ printf(" with MINGW");if(logged)fprintf(ficlog," with MINGW");/* With MINGW. --------------------------------------------- */
+#endif
#endif
#if defined(__HP_cc) || defined(__HP_aCC)
printf(" Hewlett-Packard C/aC++");if(logged)fprintf(fcilog," Hewlett-Packard C/aC++"); /* Hewlett-Packard C/aC++. ---------------------------------- */
printf(" using GNU C version %d.\n", __GNUC_VERSION__);
if(logged) fprintf(ficlog, " using GNU C version %d.\n", __GNUC_VERSION__);
+#ifndef __MINGW32__
if (uname(&sysInfo) != -1) {
printf("Running on: %s %s %s %s %s\n",sysInfo.sysname, sysInfo.nodename, sysInfo.release, sysInfo.version, sysInfo.machine);
if(logged) fprintf(ficlog,"Running on: %s %s %s %s %s\n ",sysInfo.sysname, sysInfo.nodename, sysInfo.release, sysInfo.version, sysInfo.machine);
}
else
perror("uname() error");
+#endif
//#ifndef __INTEL_COMPILER
-#if !defined (__INTEL_COMPILER) && !defined(__APPLE__)
+#if !defined (__INTEL_COMPILER) && !defined(__APPLE__)&& !defined(__MINGW32__) /* MING hasn't yet libc version */
printf("GNU libc version: %s\n", gnu_get_libc_version());
if(logged) fprintf(ficlog,"GNU libc version: %s\n", gnu_get_libc_version());
#endif
split(pathtot,path,optionfile,optionfilext,optionfilefiname);
printf("\npathtot=%s,\npath=%s,\noptionfile=%s \noptionfilext=%s \noptionfilefiname=%s\n",pathtot,path,optionfile,optionfilext,optionfilefiname);
#ifdef WIN32
- _chdir(path); /* Can be a relative path */
+ /*_chdir(path);*/ /* Can be a relative path */
+ chdir(path); /* Can be a relative path */
if(_getcwd(pathcd,MAXLINE) > 0) /* So pathcd is the full path */
#else
chdir(path); /* Can be a relative path */
strcpy(pathr,path);
strcat(pathr,optionfilefiname);
#ifdef WIN32
- _chdir(optionfilefiname); /* Move to directory named optionfile */
+ /*_chdir(optionfilefiname);*/ /* Move to directory named optionfile */
+ chdir(optionfilefiname); /* Move to directory named optionfile */
#else
chdir(optionfilefiname); /* Move to directory named optionfile */
#endif
printf("Before Current directory %s!\n",pathcd);
#ifdef WIN32
- if (_chdir(pathcd) != 0)
+ /* if (_chdir(pathcd) != 0) */
+ if (chdir(pathcd) != 0)
printf("Can't move to directory %s!\n",path);
if(_getcwd(pathcd,MAXLINE) > 0)
#else