mirror of https://github.com/KLayout/klayout.git
Some build fixes to enable basic compilation on CentOS6
This commit is contained in:
parent
ad904d3fa1
commit
245bf93429
|
|
@ -33,16 +33,16 @@ namespace db
|
||||||
{
|
{
|
||||||
|
|
||||||
static tl::Mutex s_map_mutex;
|
static tl::Mutex s_map_mutex;
|
||||||
static std::map<std::string, tl::weak_collection<ColdProxy> > s_proxies_per_library_name;
|
static std::map<std::string, tl::weak_collection<ColdProxy> *> s_proxies_per_library_name;
|
||||||
|
|
||||||
const tl::weak_collection<ColdProxy> &
|
const tl::weak_collection<ColdProxy> &
|
||||||
ColdProxy::cold_proxies_per_lib_name (const std::string &libname)
|
ColdProxy::cold_proxies_per_lib_name (const std::string &libname)
|
||||||
{
|
{
|
||||||
tl::MutexLocker locker (&s_map_mutex);
|
tl::MutexLocker locker (&s_map_mutex);
|
||||||
|
|
||||||
std::map<std::string, tl::weak_collection<ColdProxy> >::const_iterator i = s_proxies_per_library_name.find (libname);
|
std::map<std::string, tl::weak_collection<ColdProxy> *>::const_iterator i = s_proxies_per_library_name.find (libname);
|
||||||
if (i != s_proxies_per_library_name.end ()) {
|
if (i != s_proxies_per_library_name.end ()) {
|
||||||
return i->second;
|
return *i->second;
|
||||||
} else {
|
} else {
|
||||||
static tl::weak_collection<ColdProxy> s_empty;
|
static tl::weak_collection<ColdProxy> s_empty;
|
||||||
return s_empty;
|
return s_empty;
|
||||||
|
|
@ -54,7 +54,11 @@ ColdProxy::ColdProxy (db::cell_index_type ci, db::Layout &layout, const ProxyCon
|
||||||
{
|
{
|
||||||
if (! info.lib_name.empty ()) {
|
if (! info.lib_name.empty ()) {
|
||||||
tl::MutexLocker locker (&s_map_mutex);
|
tl::MutexLocker locker (&s_map_mutex);
|
||||||
s_proxies_per_library_name [info.lib_name].push_back (this);
|
std::map<std::string, tl::weak_collection<ColdProxy> *>::iterator i = s_proxies_per_library_name.find (info.lib_name);
|
||||||
|
if (i != s_proxies_per_library_name.end ()) {
|
||||||
|
i = s_proxies_per_library_name.insert (std::make_pair (info.lib_name, new tl::weak_collection<ColdProxy> ())).first;
|
||||||
|
}
|
||||||
|
i->second->push_back (this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@
|
||||||
#include "dbCell.h"
|
#include "dbCell.h"
|
||||||
|
|
||||||
#include "tlObject.h"
|
#include "tlObject.h"
|
||||||
|
#include "tlTypeTraits.h"
|
||||||
|
|
||||||
namespace db
|
namespace db
|
||||||
{
|
{
|
||||||
|
|
@ -102,10 +103,23 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ProxyContextInfo *mp_context_info;
|
ProxyContextInfo *mp_context_info;
|
||||||
|
|
||||||
|
ColdProxy (const ColdProxy &d);
|
||||||
|
ColdProxy &operator= (const ColdProxy &d);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace tl
|
||||||
|
{
|
||||||
|
template <>
|
||||||
|
struct type_traits<db::ColdProxy> : public type_traits<void>
|
||||||
|
{
|
||||||
|
typedef tl::false_tag has_default_constructor;
|
||||||
|
typedef tl::false_tag has_copy_constructor;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,6 @@
|
||||||
#include "pyaRefs.h"
|
#include "pyaRefs.h"
|
||||||
#include "dbPolygon.h"
|
#include "dbPolygon.h"
|
||||||
|
|
||||||
|
|
||||||
static PyObject *BridgeError;
|
static PyObject *BridgeError;
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
|
|
||||||
|
|
@ -88,10 +88,14 @@ LIBS += -L$$LIBDIR -lklayout_db
|
||||||
-Wno-deprecated-declarations \
|
-Wno-deprecated-declarations \
|
||||||
-Wno-reserved-user-defined-literal \
|
-Wno-reserved-user-defined-literal \
|
||||||
|
|
||||||
|
# because we use unordered_map/unordered_set:
|
||||||
|
QMAKE_CXXFLAGS += -std=c++0x
|
||||||
|
|
||||||
# Python is somewhat sloppy and relies on the compiler initializing fields
|
# Python is somewhat sloppy and relies on the compiler initializing fields
|
||||||
# of strucs to 0:
|
# of strucs to 0:
|
||||||
QMAKE_CXXFLAGS_WARN_ON += \
|
QMAKE_CXXFLAGS_WARN_ON += \
|
||||||
-Wno-missing-field-initializers
|
-Wno-missing-field-initializers
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
# disable some warnings
|
# disable some warnings
|
||||||
|
|
|
||||||
|
|
@ -342,10 +342,12 @@ InputHttpStreamPrivateData::finished (QNetworkReply *reply)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tl::verbosity() >= 40) {
|
if (tl::verbosity() >= 40) {
|
||||||
|
#if QT_VERSION >= 0x40800
|
||||||
const QList<QNetworkReply::RawHeaderPair> &raw_headers = reply->rawHeaderPairs ();
|
const QList<QNetworkReply::RawHeaderPair> &raw_headers = reply->rawHeaderPairs ();
|
||||||
for (QList<QNetworkReply::RawHeaderPair>::const_iterator h = raw_headers.begin (); h != raw_headers.end (); ++h) {
|
for (QList<QNetworkReply::RawHeaderPair>::const_iterator h = raw_headers.begin (); h != raw_headers.end (); ++h) {
|
||||||
tl::info << "HTTP response header: " << h->first.constData () << ": " << h->second.constData ();
|
tl::info << "HTTP response header: " << h->first.constData () << ": " << h->second.constData ();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant redirect_target = reply->attribute (QNetworkRequest::RedirectionTargetAttribute);
|
QVariant redirect_target = reply->attribute (QNetworkRequest::RedirectionTargetAttribute);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue