From 84072aa23e98d35f5e4e08a68dcc1f7826bda8b2 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 9 Sep 2018 22:43:22 +0200 Subject: [PATCH] Fixed a few things that got damaged in Linux build while doing MSVC compatibility. --- src/klayout.pri | 1 + src/plugins/tools/net_tracer/lay_plugin/layNetTracerDialog.cc | 2 +- src/tl/tl/tlStream.cc | 4 ++-- src/tl/tl/tlTimer.cc | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/klayout.pri b/src/klayout.pri index 092bb5c3a..a34f144b9 100644 --- a/src/klayout.pri +++ b/src/klayout.pri @@ -121,6 +121,7 @@ msvc { -Wno-strict-aliasing \ -Wno-deprecated-declarations \ -Wno-reserved-user-defined-literal \ + -std=c++11 \ win32 { QMAKE_LFLAGS += -Wl,--exclude-all-symbols diff --git a/src/plugins/tools/net_tracer/lay_plugin/layNetTracerDialog.cc b/src/plugins/tools/net_tracer/lay_plugin/layNetTracerDialog.cc index bcdd8038e..8b6858afa 100644 --- a/src/plugins/tools/net_tracer/lay_plugin/layNetTracerDialog.cc +++ b/src/plugins/tools/net_tracer/lay_plugin/layNetTracerDialog.cc @@ -49,7 +49,7 @@ namespace db { - DB_PLUGIN_PUBLIC std::string net_tracer_component_name; + extern std::string net_tracer_component_name; } namespace lay diff --git a/src/tl/tl/tlStream.cc b/src/tl/tl/tlStream.cc index 157a6dc6f..fcc6dc2b1 100644 --- a/src/tl/tl/tlStream.cc +++ b/src/tl/tl/tlStream.cc @@ -552,7 +552,7 @@ InputZLibFile::InputZLibFile (const std::string &path) } mp_d->zs = gzdopen (fd, "rb"); #else - m_zs = gzopen (tl::string_to_system (path).c_str (), "rb"); + mp_d->zs = gzopen (tl::string_to_system (path).c_str (), "rb"); #endif if (mp_d->zs == NULL) { throw FileOpenErrorException (m_source, errno); @@ -826,7 +826,7 @@ OutputZLibFile::OutputZLibFile (const std::string &path) } mp_d->zs = gzdopen (_fileno (file), "wb"); #else - m_zs = gzopen (tl::string_to_system (path).c_str (), "wb"); + mp_d->zs = gzopen (tl::string_to_system (path).c_str (), "wb"); #endif if (mp_d->zs == NULL) { throw FileOpenErrorException (m_source, errno); diff --git a/src/tl/tl/tlTimer.cc b/src/tl/tl/tlTimer.cc index f117d06e9..1be9d0b81 100644 --- a/src/tl/tl/tlTimer.cc +++ b/src/tl/tl/tlTimer.cc @@ -114,7 +114,7 @@ static int64_t ms_time () #else timespec ts; - clock_gettime(CLOCK_REALTIME, ts); + clock_gettime (CLOCK_REALTIME, &ts); return int64_t (ts.tv_sec) * 1000 + int64_t (0.5 + ts.tv_nsec / 1.0e6); #endif