Fixes simulator HAL builds (#391)

This commit is contained in:
Thad House
2016-12-06 19:56:31 -08:00
committed by Peter Johnson
parent c30057e923
commit 77f664a6b1
4 changed files with 5 additions and 4 deletions

View File

@@ -10,7 +10,7 @@
// Allows usage with std::lock_guard without including <mutex> separately
#include <mutex>
#ifdef FRC_SIMULATOR
#if defined(FRC_SIMULATOR) || defined(_WIN32)
// We do not want to use pthreads if in the simulator; however, in the
// simulator, we do not care about priority inversion.
typedef std::mutex priority_mutex;

View File

@@ -15,7 +15,7 @@
#define __FRC_COMM_H__
#ifdef _WIN32
# include <windows.h>
#include <windows.h>
#ifdef USE_THRIFT
# define EXPORT_FUNC
# else

View File

@@ -3,7 +3,7 @@
#define __LoadOut_h__
#ifdef _WIN32
#include <vxWorks_compat.h>
#include <windows.h>
#define EXPORT_FUNC __declspec(dllexport) __cdecl
#elif defined (__vxworks)
#include <vxWorks.h>

View File

@@ -16,7 +16,8 @@ task patchNiLibraries() {
netTree.each {File file ->
String contents = file.getText('UTF-8')
contents = contents.replaceAll('#ifdef WIN32', '#ifdef _WIN32')
contents = contents.replaceAll('# include <vxWorks_compat.h>', '# include <windows.h>')
contents = contents.replaceAll('# include <vxWorks_compat.h>', '#include <windows.h>')
contents = contents.replaceAll('#include <vxWorks_compat.h>', '#include <windows.h>')
file.write(contents, 'UTF-8')
}