diff --git a/Common/ArmEmitter.cpp b/Common/ArmEmitter.cpp index 0928b3d8f8..17ef8e711f 100644 --- a/Common/ArmEmitter.cpp +++ b/Common/ArmEmitter.cpp @@ -61,7 +61,7 @@ const u8 *ARMXEmitter::AlignCodePage() void ARMXEmitter::Flush() { - __clear_cache (startcode, code); + __builtin___clear_cache (startcode, code); SLEEP(0); } void ARMXEmitter::SetCC(CCFlags cond) diff --git a/Common/CPUDetect.cpp b/Common/CPUDetect.cpp index 8222117669..ea04ca0704 100644 --- a/Common/CPUDetect.cpp +++ b/Common/CPUDetect.cpp @@ -93,6 +93,10 @@ CPUInfo::CPUInfo() { Detect(); } +#ifdef _WIN32 +#include +#endif + // Detects the various cpu features void CPUInfo::Detect() { diff --git a/Common/FileUtil.cpp b/Common/FileUtil.cpp index e2eb22a3ff..ebe0d12de1 100644 --- a/Common/FileUtil.cpp +++ b/Common/FileUtil.cpp @@ -48,7 +48,7 @@ #define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) #endif -#ifdef BSD4_4 +#if !defined(__linux__) && !defined(_WIN32) && !defined(__QNX__) #define stat64 stat #define fstat64 fstat #endif diff --git a/Common/IniFile.cpp b/Common/IniFile.cpp index e8408f0dac..ff867a01b2 100644 --- a/Common/IniFile.cpp +++ b/Common/IniFile.cpp @@ -19,6 +19,10 @@ #include #include +#ifndef _MSC_VER +#include +#endif + #include #include #include diff --git a/Common/MemoryUtil.cpp b/Common/MemoryUtil.cpp index 2a8008f226..a47a0bbb14 100644 --- a/Common/MemoryUtil.cpp +++ b/Common/MemoryUtil.cpp @@ -25,11 +25,8 @@ #else #include #include +#endif #include -#ifndef __APPLE__ -#include -#endif -#endif #if !defined(_WIN32) && defined(__x86_64__) && !defined(MAP_32BIT) diff --git a/Common/Misc.cpp b/Common/Misc.cpp index ea749d1a7b..53f37c2bf2 100644 --- a/Common/Misc.cpp +++ b/Common/Misc.cpp @@ -21,6 +21,10 @@ #define __thread #endif +#ifdef _WIN32 +#include +#endif + // Generic function to get last error message. // Call directly after the command or use the error num. // This function might change the error code. diff --git a/Common/MsgHandler.cpp b/Common/MsgHandler.cpp index fcc48e7c2d..5277064b06 100644 --- a/Common/MsgHandler.cpp +++ b/Common/MsgHandler.cpp @@ -98,6 +98,10 @@ bool MsgAlert(bool yes_no, int Style, const char* format, ...) return true; } +#ifdef _WIN32 +#include +#endif + // Default non library dependent panic alert bool DefaultMsgHandler(const char* caption, const char* text, bool yes_no, int Style) { diff --git a/Common/x64Emitter.h b/Common/x64Emitter.h index 9e9c39f110..816a82e90a 100644 --- a/Common/x64Emitter.h +++ b/Common/x64Emitter.h @@ -24,7 +24,7 @@ #include "MemoryUtil.h" #if !defined(_M_IX86) && !defined(_M_X64) -#error Don't build this on arm. +#error "Don't build this on arm." #endif namespace Gen diff --git a/Core/MIPS/MIPSIntVFPU.cpp b/Core/MIPS/MIPSIntVFPU.cpp index e170fd2166..51264ba65c 100644 --- a/Core/MIPS/MIPSIntVFPU.cpp +++ b/Core/MIPS/MIPSIntVFPU.cpp @@ -26,10 +26,6 @@ #include -#ifndef _MSC_VER -using std::isnan; -#endif - #define R(i) (currentMIPS->r[i]) #define RF(i) (*(float*)(&(currentMIPS->r[i]))) #define V(i) (currentMIPS->v[i]) diff --git a/Windows/DSoundStream.h b/Windows/DSoundStream.h index fce90f9956..0a52c28e0a 100644 --- a/Windows/DSoundStream.h +++ b/Windows/DSoundStream.h @@ -1,6 +1,8 @@ #ifndef __SOUNDSTREAM_H__ #define __SOUNDSTREAM_H__ +#include + namespace DSound { typedef int (*StreamCallback)(short *buffer, int numSamples, int bits, int rate, int channels); diff --git a/Windows/Debugger/CtrlDisAsmView.cpp b/Windows/Debugger/CtrlDisAsmView.cpp index 776ee08003..27ea27be2e 100644 --- a/Windows/Debugger/CtrlDisAsmView.cpp +++ b/Windows/Debugger/CtrlDisAsmView.cpp @@ -13,6 +13,9 @@ #include "../../globals.h" #include "../main.h" +#include +#include + TCHAR CtrlDisAsmView::szClassName[] = _T("CtrlDisAsmView"); extern HMENU g_hPopupMenus; diff --git a/Windows/Debugger/CtrlDisAsmView.h b/Windows/Debugger/CtrlDisAsmView.h index f72018e29b..34130c96aa 100644 --- a/Windows/Debugger/CtrlDisAsmView.h +++ b/Windows/Debugger/CtrlDisAsmView.h @@ -20,6 +20,7 @@ #include "../../Core/Debugger/DebugInterface.h" +#include class CtrlDisAsmView { diff --git a/Windows/Debugger/Debugger_Disasm.cpp b/Windows/Debugger/Debugger_Disasm.cpp index 9e67795487..b326bc75bc 100644 --- a/Windows/Debugger/Debugger_Disasm.cpp +++ b/Windows/Debugger/Debugger_Disasm.cpp @@ -21,6 +21,10 @@ #include "../XPTheme.h" #endif +#include +#include +#include + namespace MainWindow { void UpdateMenus(); diff --git a/Windows/Debugger/Debugger_Disasm.h b/Windows/Debugger/Debugger_Disasm.h index d9611308f9..6f0a398d72 100644 --- a/Windows/Debugger/Debugger_Disasm.h +++ b/Windows/Debugger/Debugger_Disasm.h @@ -10,6 +10,8 @@ #include "../../Globals.h" #include "../../Core/CPU.h" +#include + class CDisasm : public Dialog { private: diff --git a/Windows/Debugger/Debugger_MemoryDlg.h b/Windows/Debugger/Debugger_MemoryDlg.h index 92059dc078..764e8bbd3e 100644 --- a/Windows/Debugger/Debugger_MemoryDlg.h +++ b/Windows/Debugger/Debugger_MemoryDlg.h @@ -8,6 +8,8 @@ #include "../../Core/Debugger/DebugInterface.h" +#include + class CMemoryDlg : public Dialog { private: diff --git a/Windows/EmuThread.cpp b/Windows/EmuThread.cpp index da27fd6804..8b318a19cf 100644 --- a/Windows/EmuThread.cpp +++ b/Windows/EmuThread.cpp @@ -10,6 +10,9 @@ #include "../Core/System.h" #include "../Core/Config.h" +#include +#include + char fileToStart[MAX_PATH]; static HANDLE emuThread; diff --git a/Windows/InputBox.h b/Windows/InputBox.h index 5afb3f0256..e75a0c95c5 100644 --- a/Windows/InputBox.h +++ b/Windows/InputBox.h @@ -2,5 +2,7 @@ #include "../Globals.h" +#include + bool InputBox_GetString(HINSTANCE hInst, HWND hParent, TCHAR *title, TCHAR *defaultvalue, TCHAR *outvalue); bool InputBox_GetHex(HINSTANCE hInst, HWND hParent, TCHAR *title, u32 defaultvalue, u32 &outvalue); diff --git a/Windows/InputDevice.h b/Windows/InputDevice.h index 8c50214dfc..8d651152c6 100644 --- a/Windows/InputDevice.h +++ b/Windows/InputDevice.h @@ -8,6 +8,7 @@ public: virtual int UpdateState() = 0; }; +#include #include #include std::list> getInputDevices(); diff --git a/Windows/W32Util/DialogManager.h b/Windows/W32Util/DialogManager.h index 8dcf5955f9..7f698186bc 100644 --- a/Windows/W32Util/DialogManager.h +++ b/Windows/W32Util/DialogManager.h @@ -1,5 +1,6 @@ #pragma once +#include class Dialog { diff --git a/Windows/W32Util/Misc.h b/Windows/W32Util/Misc.h index 175d69ea75..a1d2a2d322 100644 --- a/Windows/W32Util/Misc.h +++ b/Windows/W32Util/Misc.h @@ -1,5 +1,7 @@ #pragma once +#include + namespace W32Util { void CenterWindow(HWND hwnd); diff --git a/Windows/W32Util/PropertySheet.cpp b/Windows/W32Util/PropertySheet.cpp index 002f8aa3ec..319521773c 100644 --- a/Windows/W32Util/PropertySheet.cpp +++ b/Windows/W32Util/PropertySheet.cpp @@ -2,6 +2,8 @@ #include "Misc.h" #include "PropertySheet.h" +#include + namespace W32Util { bool centered; diff --git a/Windows/W32Util/ShellUtil.cpp b/Windows/W32Util/ShellUtil.cpp index d378b7d605..a0cb33a2f4 100644 --- a/Windows/W32Util/ShellUtil.cpp +++ b/Windows/W32Util/ShellUtil.cpp @@ -5,6 +5,9 @@ #include "ShellUtil.h" +#include +#include + namespace W32Util { std::string BrowseForFolder(HWND parent, char *title) diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index 426384a002..22f9c48795 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -5,6 +5,7 @@ #include +#include #include "../globals.h" #include "shellapi.h" diff --git a/Windows/WndMainWindow.h b/Windows/WndMainWindow.h index 2db48c759a..bc20c80132 100644 --- a/Windows/WndMainWindow.h +++ b/Windows/WndMainWindow.h @@ -1,5 +1,6 @@ #pragma once +#include namespace MainWindow { diff --git a/Windows/main.h b/Windows/main.h index 07cae40cb6..c882f098ee 100644 --- a/Windows/main.h +++ b/Windows/main.h @@ -21,6 +21,8 @@ #include "Debugger/Debugger_Disasm.h" #include "Debugger/Debugger_MemoryDlg.h" +#include + #define MAX_CPUCOUNT 1 extern CDisasm *disasmWindow[MAX_CPUCOUNT];