diff --git a/code/arraylist.h b/code/arraylist.h index 5cf6ecfb8..057887723 100644 --- a/code/arraylist.h +++ b/code/arraylist.h @@ -20,7 +20,7 @@ #include #include #include -#include +#include template diff --git a/code/conquer.cpp b/code/conquer.cpp index 5772abb79..31d52bf7f 100644 --- a/code/conquer.cpp +++ b/code/conquer.cpp @@ -131,7 +131,9 @@ #include #include #include +#ifdef _WIN32 #include +#endif #include #include diff --git a/code/data.cpp b/code/data.cpp index 6184c35eb..b8a23a2db 100644 --- a/code/data.cpp +++ b/code/data.cpp @@ -39,7 +39,7 @@ #include "utf8.h" -#include +#include HINSTANCE LanguageResources; diff --git a/code/sha.cpp b/code/sha.cpp index df04f76e7..85bdbfc4a 100644 --- a/code/sha.cpp +++ b/code/sha.cpp @@ -78,7 +78,7 @@ void SHAEngine::Process_Partial(void const * & data, int & length) ** Attach as many bytes as possible from the source data into ** the staging buffer. */ - int add_count = std::min((int)length, SRC_BLOCK_SIZE - PartialCount); + int add_count = std::min((int)length, SRC_BLOCK_SIZE - PartialCount); memcpy(&Partial[PartialCount], data, add_count); data = ((char const *&)data) + add_count; PartialCount += add_count; diff --git a/code/sha.h b/code/sha.h index 2a2887cef..e74f2160d 100644 --- a/code/sha.h +++ b/code/sha.h @@ -35,7 +35,7 @@ #include #include #include -#include +#include /* diff --git a/code/startup.cpp b/code/startup.cpp index d028eaa66..d76d88fa2 100644 --- a/code/startup.cpp +++ b/code/startup.cpp @@ -161,7 +161,9 @@ #include #include +#ifdef _WIN32 #include +#endif #include #include #include diff --git a/code/techtype.cpp b/code/techtype.cpp index a273870cf..99314c9d6 100644 --- a/code/techtype.cpp +++ b/code/techtype.cpp @@ -44,7 +44,7 @@ #include "voc.hh" #include -#include +#include /*************************************************************************** diff --git a/code/visualc.h b/code/visualc.h index 9fa9a9126..ca9c57a9e 100644 --- a/code/visualc.h +++ b/code/visualc.h @@ -116,6 +116,9 @@ // Single precision pi, for the float paths that would otherwise round M_PI at every use. #define M_FPI 3.141592654f +#endif + + /* ** Macros to convert between degrees and radians */ @@ -134,6 +137,3 @@ #ifndef DEG_TO_RADF #define DEG_TO_RADF(x) (((float)x)*M_PI/180.0f) #endif - - -#endif diff --git a/code/vqalib/cmp.h b/code/vqalib/cmp.h index 954c57f79..7cdd27fd4 100644 --- a/code/vqalib/cmp.h +++ b/code/vqalib/cmp.h @@ -16,6 +16,7 @@ #pragma once +#include #include #if defined(__WATCOMC__) || defined(_MSC_VER) diff --git a/code/vqalib/dstream.cpp b/code/vqalib/dstream.cpp index ec4c3c034..7d6b6d0bb 100644 --- a/code/vqalib/dstream.cpp +++ b/code/vqalib/dstream.cpp @@ -45,9 +45,17 @@ #include "vqaplayp.h" #include #include +#ifdef _WIN32 #include +#else +#include +#endif #include +#ifndef O_BINARY +#define O_BINARY 0 +#endif + long __cdecl Disk_VQA_Stream_Handler(VQAHandle *vqa, long action, void *buffer, long nbytes) { diff --git a/code/wwfile.h b/code/wwfile.h index 9ac186f90..426e1a595 100644 --- a/code/wwfile.h +++ b/code/wwfile.h @@ -40,7 +40,9 @@ #include #include +#ifdef _WIN32 #include +#endif #ifndef SEEK_SET #define SEEK_SET 0 // Seek from start of file.