diff --git a/code/arraylist.h b/code/arraylist.h index 5cf6ecfb..05788772 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 fbfc034c..5a0677e5 100644 --- a/code/conquer.cpp +++ b/code/conquer.cpp @@ -124,7 +124,9 @@ #include #include #include +#ifdef _WIN32 #include +#endif #include #include diff --git a/code/data.cpp b/code/data.cpp index 2c510a0d..7c9a1107 100644 --- a/code/data.cpp +++ b/code/data.cpp @@ -37,7 +37,7 @@ #include "data.h" -#include +#include HINSTANCE LanguageResources; diff --git a/code/dbgprint.h b/code/dbgprint.h index 49f70fed..176743d5 100644 --- a/code/dbgprint.h +++ b/code/dbgprint.h @@ -15,7 +15,11 @@ #include "sun.h" +#ifdef _WIN32 #include +#else +#define _Printf_format_string_ +#endif void Debug_Init(void); void Debug_Init_Console(void); diff --git a/code/except.h b/code/except.h index 401a1142..abfde6d6 100644 --- a/code/except.h +++ b/code/except.h @@ -33,7 +33,11 @@ #include "win.h" +#ifdef _WIN32 #include +#else +#define _Printf_format_string_ +#endif // Posted to the main window so that a requested test fault happens inside window procedure // dispatch, which the operating system unwinds differently from an ordinary call. diff --git a/code/lcw.cpp b/code/lcw.cpp index 82f5b5c5..7a1a4d92 100644 --- a/code/lcw.cpp +++ b/code/lcw.cpp @@ -34,6 +34,8 @@ #include "always.h" #include "lcw.h" +#include + /// /// Decompresses an LCW encoded data block. diff --git a/code/newdel.cpp b/code/newdel.cpp index 6f49bd1f..7f129e8e 100644 --- a/code/newdel.cpp +++ b/code/newdel.cpp @@ -17,7 +17,7 @@ #ifdef STEVES_NEW_CATCHER #include -#include +#include /// diff --git a/code/sha.cpp b/code/sha.cpp index df04f76e..85bdbfc4 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 2a2887ce..e74f2160 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 22199f90..279acc90 100644 --- a/code/startup.cpp +++ b/code/startup.cpp @@ -160,7 +160,9 @@ #include #include +#ifdef _WIN32 #include +#endif #include #include #include diff --git a/code/techtype.cpp b/code/techtype.cpp index 5ea075a1..80cbf741 100644 --- a/code/techtype.cpp +++ b/code/techtype.cpp @@ -43,7 +43,7 @@ #include "voc.hh" #include -#include +#include /*************************************************************************** diff --git a/code/visualc.h b/code/visualc.h index 9fa9a912..ca9c57a9 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 e00d166d..740fcbda 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 ec4c3c03..f2b60fed 100644 --- a/code/vqalib/dstream.cpp +++ b/code/vqalib/dstream.cpp @@ -45,7 +45,15 @@ #include "vqaplayp.h" #include #include +#ifdef _WIN32 #include +#else +#include +#endif + +#ifndef O_BINARY +#define O_BINARY 0 +#endif #include diff --git a/code/wwfile.h b/code/wwfile.h index 9ac186f9..426e1a59 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.