Permalink
Browse files

now working linux

  • Loading branch information...
da2ce7 committed Feb 26, 2014
1 parent cccf743 commit dc25b296570887ed71d364db8c0277379090930a
@@ -131,6 +131,7 @@
#include <ExportWrapper.h>
#include <WinsockWrapper.h>
+#include <cstddef>
#include <exception>
#define OT_FAIL { OTAssert::Assert(__FILE__, __LINE__); std::terminate(); };
View
@@ -139,6 +139,7 @@
#include <OTSettings.hpp>
#include <OTPayload.hpp>
+#include <OTAssert.hpp>
#include <set>
@@ -226,14 +227,12 @@ class OTCryptoConfig
return true;
}
- static inline const int32_t & GetValue(const int32_t *& pValue)
- {
- if(NULL == pValue)
- if(!GetSetAll())
- assert(false);
- if(NULL == pValue) assert(false);
+ static inline const int32_t & GetValue(const int32_t *& pValue)
+ {
+ if (NULL == pValue) { if (!GetSetAll()) OT_FAIL; }
+ if (NULL == pValue) { OT_FAIL; }
return *pValue;
- }
+ }
static const int32_t * sp_nIterationCount;
static const int32_t * sp_nSymmetricSaltSize;
View
@@ -131,6 +131,7 @@
#include <ExportWrapper.h>
#include <WinsockWrapper.h>
+#include <cstddef>
#include <cinttypes>
@@ -143,6 +143,7 @@
#include <WinsockWrapper.h>
#include <OTSettings.hpp>
+#include <OTAssert.hpp>
// All directories have a trailing "/" while files do not. <== remember to enforce this!!!
@@ -283,7 +284,7 @@ class OTDataFolder
if (NULL != pDataFolder)
if (pDataFolder->m_bInitialized) return true;
- assert(false);
+ OT_FAIL;
return false;
}
@@ -337,9 +338,8 @@ class OTFolders
static inline const OTString & GetFolder(const OTString & strFolder)
{
- if(!strFolder.Exists())
- if(!GetSetAll())
- assert(false);
+ if (!strFolder.Exists()) {
+ if (!GetSetAll()) { OT_FAIL; } }
return strFolder;
}
@@ -140,9 +140,7 @@
#include <list>
#include <map>
#include <sstream>
-#include <stdexcept> // via: win32_utf8conv.hpp
-#include <string> // via: win32_utf8conv.hpp
-#include <string> // via: win32_utf8conv.hpp
+#include <string.h>
#ifdef _WIN32
#include "win32_utf8conv.hpp" // support for changig between std::string and std::wstring
@@ -138,6 +138,7 @@
#include <WinsockWrapper.h>
#include <OTPayload.hpp>
+#include <OTIdentifier.hpp>
class OTString;
@@ -137,9 +137,23 @@
#include <ExportWrapper.h>
#include <WinsockWrapper.h>
+#ifndef IMPORT
+#define IMPORT
+#ifndef IMPORT_SET
+#define IMPORT_SET
+#endif
+#endif
+
#include <OTData.hpp>
#include <OTMessageBuffer.hpp>
+#ifdef IMPORT_SET
+#undef IMPORT_SET
+#ifdef IMPORT
+#undef IMPORT
+#include <ExportWrapper.h>
+#endif
+#endif
#ifdef __cplusplus
View
@@ -137,12 +137,26 @@
#include <ExportWrapper.h>
#include <WinsockWrapper.h>
+#ifndef IMPORT
+#define IMPORT
+#ifndef IMPORT_SET
+#define IMPORT_SET
+#endif
+#endif
+
#include <OTAssetContract.hpp>
#include <OTPseudonym.hpp>
#include <OTAccount.hpp>
#include <OTCron.hpp>
#include <OTTransaction.hpp>
+#ifdef IMPORT_SET
+#undef IMPORT_SET
+#ifdef IMPORT
+#undef IMPORT
+#include <ExportWrapper.h>
+#endif
+#endif
class OTMessage;
class OTClientConnection;
@@ -225,7 +225,7 @@
#ifdef _DEBUG
# ifndef assert
-# include <cassert>
+# include <assert.h>
# endif
# define SI_ASSERT(x) assert(x)
#else
@@ -1763,7 +1763,7 @@ CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::LoadMultiLineText(
}
// end the line with a NULL
- assert(NULL != a_pData);
+ SI_ASSERT(NULL != a_pData);
cEndOfLineChar = *a_pData;
*a_pData = 0;
View
@@ -130,7 +130,7 @@
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>_UNICODE;UNICODE;IMPORT;OT_ZMQ_MODE;_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_UNICODE;UNICODE;OT_ZMQ_MODE;_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>/bigobj /Zm480 /wd4512 /wd4100 /wd4267 </AdditionalOptions>
<PrecompiledHeaderFile>stdafx.hpp</PrecompiledHeaderFile>
</ClCompile>
@@ -143,7 +143,7 @@
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>_UNICODE;UNICODE;IMPORT;OT_ZMQ_MODE;_DEBUG;DEBUG;_WIN64;_AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_UNICODE;UNICODE;OT_ZMQ_MODE;_DEBUG;DEBUG;_WIN64;_AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>/bigobj /Zm480 /wd4512 /wd4100 /wd4267 </AdditionalOptions>
<PrecompiledHeaderFile>stdafx.hpp</PrecompiledHeaderFile>
</ClCompile>
@@ -158,7 +158,7 @@
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>_UNICODE;UNICODE;IMPORT;OT_ZMQ_MODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_UNICODE;UNICODE;OT_ZMQ_MODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>/bigobj /Zm480 /wd4512 /wd4100 /wd4267 </AdditionalOptions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PrecompiledHeaderFile>stdafx.hpp</PrecompiledHeaderFile>
@@ -176,7 +176,7 @@
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>_UNICODE;UNICODE;IMPORT;OT_ZMQ_MODE;_WIN64;_AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_UNICODE;UNICODE;OT_ZMQ_MODE;_WIN64;_AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>/bigobj /Zm480 /wd4512 /wd4100 /wd4267 </AdditionalOptions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PrecompiledHeaderFile>stdafx.hpp</PrecompiledHeaderFile>
@@ -147,7 +147,7 @@
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>_UNICODE;UNICODE;IMPORT;_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_UNICODE;UNICODE;_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>/bigobj /Zm480 /wd4512 /wd4100 /wd4267 </AdditionalOptions>
<PrecompiledHeaderFile>stdafx.hpp</PrecompiledHeaderFile>
</ClCompile>
@@ -161,7 +161,7 @@
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>_UNICODE;UNICODE;IMPORT;_DEBUG;DEBUG;_WIN64;_AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_UNICODE;UNICODE;_DEBUG;DEBUG;_WIN64;_AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>/bigobj /Zm480 /wd4512 /wd4100 /wd4267 </AdditionalOptions>
<PrecompiledHeaderFile>stdafx.hpp</PrecompiledHeaderFile>
</ClCompile>
@@ -177,7 +177,7 @@
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>_UNICODE;UNICODE;IMPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>/bigobj /Zm480 /wd4512 /wd4100 /wd4267 </AdditionalOptions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PrecompiledHeaderFile>stdafx.hpp</PrecompiledHeaderFile>
@@ -196,7 +196,7 @@
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>_UNICODE;UNICODE;IMPORT;_WIN64;_AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_UNICODE;UNICODE;_WIN64;_AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>/bigobj /Zm480 /wd4512 /wd4100 /wd4267 </AdditionalOptions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PrecompiledHeaderFile>stdafx.hpp</PrecompiledHeaderFile>
@@ -153,7 +153,7 @@
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>_UNICODE;UNICODE;IMPORT;_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_UNICODE;UNICODE;_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>/bigobj /Zm480 /wd4512 /wd4100 /wd4267 </AdditionalOptions>
<PrecompiledHeaderFile>stdafx.hpp</PrecompiledHeaderFile>
</ClCompile>
@@ -167,7 +167,7 @@
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>_UNICODE;UNICODE;IMPORT;_DEBUG;DEBUG;_WIN64;_AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_UNICODE;UNICODE;_DEBUG;DEBUG;_WIN64;_AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>/bigobj /Zm480 /wd4512 /wd4100 /wd4267 </AdditionalOptions>
<PrecompiledHeaderFile>stdafx.hpp</PrecompiledHeaderFile>
</ClCompile>
@@ -183,7 +183,7 @@
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>_UNICODE;UNICODE;IMPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>/bigobj /Zm480 /wd4512 /wd4100 /wd4267 </AdditionalOptions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PrecompiledHeaderFile>stdafx.hpp</PrecompiledHeaderFile>
@@ -202,7 +202,7 @@
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>_UNICODE;UNICODE;IMPORT;_WIN64;_AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_UNICODE;UNICODE;_WIN64;_AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>/bigobj /Zm480 /wd4512 /wd4100 /wd4267 </AdditionalOptions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PrecompiledHeaderFile>stdafx.hpp</PrecompiledHeaderFile>
@@ -148,7 +148,12 @@
#include <OTPseudonym.hpp>
#include <OTWallet.hpp>
-
+extern "C"
+{
+#if defined (OPENTXS_HAVE_NETINET_IN_H)
+#include <netinet/in.h>
+#endif
+}
int allow_debug = 1;
@@ -171,14 +171,12 @@
#include "simpleini/SimpleIni.hpp"
#include "tinythread.hpp"
-extern "C"
+#if defined (OPENTXS_HAVE_NETINET_IN_H)
+extern "C"
{
-#ifdef _WIN32
-#else
#include <netinet/in.h>
-#endif
}
-
+#endif
#define CLIENT_CONFIG_KEY "client"
View
@@ -145,13 +145,17 @@ extern "C"
#ifdef _WIN32
//#include <WinSock.h>
#else
-#include <netinet/in.h>
#include <wordexp.h>
#endif
-#include "SSL-Example/SFSocket.h"
}
+extern "C"
+{
+#if defined (OPENTXS_HAVE_NETINET_IN_H)
+#include <netinet/in.h>
+#endif
+}
#ifdef _WIN32
void OT_Sleep(int nMS);
Oops, something went wrong.

0 comments on commit dc25b29

Please sign in to comment.