Skip to content

Commit

Permalink
Miscellaneous changes for WinRT
Browse files Browse the repository at this point in the history
  • Loading branch information
john-blackburn committed Apr 1, 2015
1 parent 06e9882 commit e49148f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion libnetwork/libnetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Winsock behavior
*/


#ifdef WIN32
#if defined(WIN32) || defined(_WIN32)

typedef int socklen_t;

Expand Down
18 changes: 15 additions & 3 deletions libplatform/platformutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ off_t fileSize(const char* file)
return s.st_size;
}

#ifdef _WIN32
#if defined(WINSTORE)
void getDirectoryListing(const char* dir, std::vector<std::string>* files, std::vector<std::string>* directories)
{
}
#elif defined(_WIN32)
#include <Windows.h>
void getDirectoryListing(const char* dir, std::vector<std::string>* files, std::vector<std::string>* directories)
{
Expand Down Expand Up @@ -128,7 +132,15 @@ void getDirectoryListingR(const char* dir, std::vector<std::string>* filesout, s
}


#ifdef _WIN32
#if defined(WINSTORE)
std::vector<std::string> getLocalIPs()
{
std::vector<std::string> result;
result.clear();
result.push_back("WINSTORE placeholder getLocalIPs");
return result;
}
#elif defined(_WIN32)
#include <winsock2.h>
#include <iphlpapi.h>
#pragma comment(lib, "IPHLPAPI.lib")
Expand Down Expand Up @@ -382,7 +394,7 @@ std::vector<std::string> getLocalIPs()
#endif


#if defined(_WIN32)
#if defined(_WIN32) && !defined(WINSTORE)
double iclock()
{
static LARGE_INTEGER freq;
Expand Down
2 changes: 1 addition & 1 deletion libpvrt/PVRTGlobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <tchar.h>

#ifndef _ASSERT
#ifdef _DEBUG
#if defined(_DEBUG) && !defined(WINSTORE)
#define _ASSERT(X) { (X) ? 0 : DebugBreak(); }
#else
#define _ASSERT(X)
Expand Down

0 comments on commit e49148f

Please sign in to comment.