WSL/SLF GitLab Repository

Commit c0ff5b87 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Moved <unistd.h> within an ifdef, removed flto for gcc on Windows (since this...

Moved <unistd.h> within an ifdef, removed flto for gcc on Windows (since this is currently very, very buggy on Windows).
parent f728a525
......@@ -66,7 +66,9 @@ ELSE()
SET(ARCH_OPTIM "-march=native -mtune=native")
ENDIF()
IF(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
SET(OPTIM "${OPTIM} -flto") #for gcc>4.5, but first implementations were slow, so it is safe to enforce 4.8
IF(NOT WIN32)
SET(OPTIM "${OPTIM} -flto") #for gcc>4.5, but first implementations were slow, so it is safe to enforce 4.8
ENDIF(NOT WIN32)
# if set to ON, all binaries depending on the library have to be compiled the same way.
#Then, do an "export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.4" and run with "ASAN_OPTIONS=symbolize=1"
SET(LEAKS_CHECK OFF CACHE BOOL "Set to ON to dynamically check for memory corruption (and do the same for applications linked with MeteoIO)")
......
......@@ -19,9 +19,10 @@
#include <cstring>
#include <ctype.h>
#include <algorithm>
#include <unistd.h>
#if (defined _WIN32 || defined __MINGW32__) && ! defined __CYGWIN__
#include <winsock.h>
#include <winsock.h>
#else
#include <unistd.h>
#endif
#include <meteoio/IOUtils.h>
......@@ -222,7 +223,7 @@ std::string getLogName() {
std::string getHostName() {
const size_t len = 4096;
#if (defined _WIN32 || defined __MINGW32__) && ! defined __CYGWIN__
TCHAR infoBuf[len];
DWORD bufCharCount = len;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment