/* $Id$
$State$
$Log$
+ Revision 1.166 2014/12/22 11:40:47 brouard
+ *** empty log message ***
+
Revision 1.165 2014/12/16 11:20:36 brouard
Summary: After compiling on Visual C
#include <limits.h>
#include <sys/types.h>
+#include <sys/utsname.h>
#include <sys/stat.h>
#include <errno.h>
/* extern int errno; */
#include <gsl/gsl_multimin.h>
#endif
+
#ifdef NLOPT
#include <nlopt.h>
typedef struct {
return (1);
}
+syscompilerinfo()
+ {
+ /* #include "syscompilerinfo.h"*/
+#include <gnu/libc-version.h>
+#if defined(__GNUC__)
+# if defined(__GNUC_PATCHLEVEL__)
+# define __GNUC_VERSION__ (__GNUC__ * 10000 \
+ + __GNUC_MINOR__ * 100 \
+ + __GNUC_PATCHLEVEL__)
+# else
+# define __GNUC_VERSION__ (__GNUC__ * 10000 \
+ + __GNUC_MINOR__ * 100)
+# endif
+#endif
+
+// 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!
+ // Windows (x64 and x86)
+#elif __unix__ // all unices, not all compilers
+ // Unix
+#elif __linux__
+ // linux
+#elif __APPLE__
+ // Mac OS, not sure if this is covered by __posix__ and/or __unix__ though...
+#endif
+
+/* __MINGW32__ */
+/* __CYGWIN__ */
+/* __MINGW64__ */
+// http://msdn.microsoft.com/en-us/library/b0084kay.aspx
+/* _MSC_VER //the Visual C++ compiler is 17.00.51106.1, the _MSC_VER macro evaluates to 1700. Type cl /? */
+/* _MSC_FULL_VER //the Visual C++ compiler is 15.00.20706.01, the _MSC_FULL_VER macro evaluates to 150020706 */
+/* _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 \n"); /* 32-bit */
+#elif UINTPTR_MAX == 0xffffffffffffffff
+ printf("64-bit \n");/* 64-bit */
+#else
+ printf("wtf-bit \n"); /* wtf */
+#endif
+
+struct utsname sysInfo;
+
+ if (uname(&sysInfo) != -1) {
+ puts(sysInfo.sysname);
+ puts(sysInfo.nodename);
+ puts(sysInfo.release);
+ puts(sysInfo.version);
+ puts(sysInfo.machine);
+ }
+ else
+ perror("uname() error");
+ printf("GNU C version %d\n", __GNUC_VERSION__);
+ printf("GNU libc version: %s\n", gnu_get_libc_version());
+
+ }
/***********************************************/
/**************** Main Program *****************/
optionfilext=%s\n\
optionfilefiname='%s'\n",pathimach,pathtot,path,optionfile,optionfilext,optionfilefiname);
+ syscompilerinfo();
+
printf("Local time (at start):%s",strstart);
fprintf(ficlog,"Local time (at start): %s",strstart);
fflush(ficlog);