From 150a53eb17b18e0a20d85d56437a94aaf745ce2b Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 14 Aug 2013 11:19:21 -0400 Subject: Self test almost builds, now need skeleton EthernetTap implementation for Windows. --- node/Demarc.cpp | 4 ++-- node/Demarc.hpp | 4 ++-- node/Node.cpp | 2 +- node/Utils.cpp | 6 +++--- node/Utils.hpp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'node') diff --git a/node/Demarc.cpp b/node/Demarc.cpp index 9c78fb65..0bb1646d 100644 --- a/node/Demarc.cpp +++ b/node/Demarc.cpp @@ -44,8 +44,8 @@ namespace ZeroTier { -const Demarc::Port Demarc::ANY_PORT; -const Demarc::Port Demarc::NULL_PORT; +const Demarc::Port Demarc::ANY_PORT = (Port)0xffffffffffffffffULL; +const Demarc::Port Demarc::NULL_PORT = (Port)0; Demarc::Demarc(const RuntimeEnvironment *renv) : _r(renv) diff --git a/node/Demarc.hpp b/node/Demarc.hpp index 721dc0c8..670e5b0a 100644 --- a/node/Demarc.hpp +++ b/node/Demarc.hpp @@ -64,12 +64,12 @@ public: /** * Port identifier used to refer to any port */ - static const Port ANY_PORT = (Port)0xffffffffffffffffULL; + static const Port ANY_PORT; /** * Port identifier used to refer to null port / port not found */ - static const Port NULL_PORT = (Port)0; + static const Port NULL_PORT; Demarc(const RuntimeEnvironment *renv); ~Demarc(); diff --git a/node/Node.cpp b/node/Node.cpp index e6910a56..bb68cdaf 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -351,7 +351,7 @@ Node::ReasonForTermination Node::run() // Make sure networks.d exists #ifdef __WINDOWS__ - CreateDirectory((_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d").c_str(),NULL); + CreateDirectoryA((_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d").c_str(),NULL); #else mkdir((_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d").c_str(),0700); #endif diff --git a/node/Utils.cpp b/node/Utils.cpp index 4f04fb0c..32cfe2d1 100644 --- a/node/Utils.cpp +++ b/node/Utils.cpp @@ -220,11 +220,11 @@ std::map Utils::listDirectory(const char *path) #ifdef __WINDOWS__ HANDLE hFind; - WIN32_FIND_DATA ffd; - if ((hFind = FindFirstFile((std::string(path) + "\\*").c_str(),&ffd)) != INVALID_HANDLE_VALUE) { + WIN32_FIND_DATAA ffd; + if ((hFind = FindFirstFileA((std::string(path) + "\\*").c_str(),&ffd)) != INVALID_HANDLE_VALUE) { do { r[std::string(ffd.cFileName)] = ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0); - } while (FindNextFile(hFind,&ffd)); + } while (FindNextFileA(hFind,&ffd)); FindClose(hFind); } #else diff --git a/node/Utils.hpp b/node/Utils.hpp index 9d565636..76448294 100644 --- a/node/Utils.hpp +++ b/node/Utils.hpp @@ -75,7 +75,7 @@ public: throw() { #ifdef __WINDOWS__ - return (DeleteFile(path) != FALSE); + return (DeleteFileA(path) != FALSE); #else return (unlink(path) == 0); #endif -- cgit v1.2.3