From f7d267d3f761477904935647ce34fa54339286e0 Mon Sep 17 00:00:00 2001 From: ana Date: Wed, 17 Jun 2015 20:05:12 +0300 Subject: [PATCH] Windows compatibility --- src/evalyfx/YACSEvalPort.cxx | 2 +- src/evalyfx/YACSEvalResource.hxx | 22 +++++++++++++--------- src/evalyfx/YACSEvalSession.hxx | 4 ++-- src/evalyfx/YACSEvalYFXExport.hxx | 2 +- src/evalyfx/YACSEvalYFXPattern.hxx | 4 ++++ 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/evalyfx/YACSEvalPort.cxx b/src/evalyfx/YACSEvalPort.cxx index f8a99e0d1..86cd5dfc1 100644 --- a/src/evalyfx/YACSEvalPort.cxx +++ b/src/evalyfx/YACSEvalPort.cxx @@ -222,7 +222,7 @@ void YACSEvalInputPort::setDefaultValue(const YACSEvalAny *parameter) if(par0) v<<=par0->toDouble(); else if(par1) - v<<=par1->toInt(); + v<<=(CORBA::Short)par1->toInt(); else throw YACS::Exception("YACSEvalInputPort::setDefaultValueDefined : unmanaged types different from int and double for corbaport !"); i2->put(&v); diff --git a/src/evalyfx/YACSEvalResource.hxx b/src/evalyfx/YACSEvalResource.hxx index 344d76488..4eee308fc 100644 --- a/src/evalyfx/YACSEvalResource.hxx +++ b/src/evalyfx/YACSEvalResource.hxx @@ -27,6 +27,10 @@ #include #include +#ifdef WIN32 +#define NOMINMAX +#endif + namespace YACS { namespace ENGINE @@ -78,15 +82,15 @@ private: unsigned int getValueOfKeyUInt(const char *key) const; std::map listOfPropertiesInYACSContainer() const; public: - YACSEVALYFX_EXPORT static const char CONTAINER_NAME_KEY[]; - YACSEVALYFX_EXPORT static const char CPU_CLOCK_KEY[]; - YACSEVALYFX_EXPORT static const char HOSTNAME_KEY[]; - YACSEVALYFX_EXPORT static const char MEM_KEY[]; - YACSEVALYFX_EXPORT static const char NB_NODE_KEY[]; - YACSEVALYFX_EXPORT static const char NB_PROC_PER_NODE_KEY[]; - YACSEVALYFX_EXPORT static const char NB_RESOURCE_PROCS_KEY[]; - YACSEVALYFX_EXPORT static const char POLICY_KEY[]; - YACSEVALYFX_EXPORT static const char OS_KEY[]; + static const char CONTAINER_NAME_KEY[]; + static const char CPU_CLOCK_KEY[]; + static const char HOSTNAME_KEY[]; + static const char MEM_KEY[]; + static const char NB_NODE_KEY[]; + static const char NB_PROC_PER_NODE_KEY[]; + static const char NB_RESOURCE_PROCS_KEY[]; + static const char POLICY_KEY[]; + static const char OS_KEY[]; private: std::string _chosenHost; //! list of properties that overloads. diff --git a/src/evalyfx/YACSEvalSession.hxx b/src/evalyfx/YACSEvalSession.hxx index ba62b76c7..9d0d2c3a6 100644 --- a/src/evalyfx/YACSEvalSession.hxx +++ b/src/evalyfx/YACSEvalSession.hxx @@ -41,8 +41,8 @@ public: private: static std::string GetPathToAdd(); public: - YACSEVALYFX_EXPORT static const char KERNEL_ROOT_DIR[]; - YACSEVALYFX_EXPORT static const char CORBA_CONFIG_ENV_VAR_NAME[]; + static const char KERNEL_ROOT_DIR[]; + static const char CORBA_CONFIG_ENV_VAR_NAME[]; private: bool _isLaunched; int _port; diff --git a/src/evalyfx/YACSEvalYFXExport.hxx b/src/evalyfx/YACSEvalYFXExport.hxx index 3ef78fd70..cf7f127a9 100644 --- a/src/evalyfx/YACSEvalYFXExport.hxx +++ b/src/evalyfx/YACSEvalYFXExport.hxx @@ -22,7 +22,7 @@ #define __YACSEVALYFXEXPORT_HXX__ #ifdef WIN32 -# if defined YACSEVALYFX_EXPORTS +# if defined YACSevalYFX_EXPORTS # define YACSEVALYFX_EXPORT __declspec( dllexport ) # else # define YACSEVALYFX_EXPORT __declspec( dllimport ) diff --git a/src/evalyfx/YACSEvalYFXPattern.hxx b/src/evalyfx/YACSEvalYFXPattern.hxx index 2e2a9ca75..110f22b90 100644 --- a/src/evalyfx/YACSEvalYFXPattern.hxx +++ b/src/evalyfx/YACSEvalYFXPattern.hxx @@ -25,6 +25,10 @@ #include +#ifdef WIN32 +#define NOMINMAX +#endif + namespace YACS { namespace ENGINE -- 2.30.2