Finalise MSVC port (#739)

* Fix for MIPS issue.

* Sparc support added.

* M68K support added.

* Arm support ported.

* Fix issue with VS2015 shlobj.h file

* Arm issue fix.

* Finalise MSVC port.
This commit is contained in:
xorstream
2017-01-25 01:09:33 +11:00
committed by Nguyen Anh Quynh
parent e08d1bf7c6
commit 2a941e3efb
32 changed files with 1368 additions and 369 deletions

View File

@ -168,8 +168,9 @@ static int gettimeofday(struct timeval* t, void* timezone)
// unistd.h compatibility
#if defined(_MSC_VER)
// TODO: add unistd stuff here ...
// horrible kludge requiring winsock to get microsecond sleep resolution.
// if this is removed then all winsock references can also be removed.
static int usleep(uint32_t t)
{
int ret, err_code;
@ -183,14 +184,6 @@ static int usleep(uint32_t t)
err_code = WSAGetLastError();
return ret==0 ? 0 : -1;
}
/*
#include <chrono>
#include <thread>
static void usleep(const int64_t &t)
{
std::this_thread::sleep_for(std::chrono::microseconds(t));
}
*/
#else
#include <unistd.h>