From 882a2cb25abac311b3a8f9c6af702125fead8843 Mon Sep 17 00:00:00 2001 From: Marcel Bierling Date: Wed, 2 Sep 2026 17:37:54 +0200 Subject: [PATCH 1/7] Include where size_t is used --- code/vqalib/cmp.h | 1 + 1 file changed, 1 insertion(+) 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) From 6a953266d369f78f345795f2d6ca0638eeb13f3f Mon Sep 17 00:00:00 2001 From: Marcel Bierling Date: Wed, 2 Sep 2026 17:39:43 +0200 Subject: [PATCH 2/7] Define the angle macros outside the MSVC block --- code/visualc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 From b6f271476d789de5320d5b3f1a9fae2df403a18a Mon Sep 17 00:00:00 2001 From: Marcel Bierling Date: Wed, 2 Sep 2026 17:39:43 +0200 Subject: [PATCH 3/7] Guard MSVC's low-level I/O header --- code/conquer.cpp | 2 ++ code/startup.cpp | 2 ++ code/vqalib/dstream.cpp | 2 ++ code/wwfile.h | 2 ++ 4 files changed, 8 insertions(+) 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/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/vqalib/dstream.cpp b/code/vqalib/dstream.cpp index ec4c3c034..ae76ce1bd 100644 --- a/code/vqalib/dstream.cpp +++ b/code/vqalib/dstream.cpp @@ -45,7 +45,9 @@ #include "vqaplayp.h" #include #include +#ifdef _WIN32 #include +#endif #include 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. From c85c8e7d8660c5d60b3a2b745a41c8c56f3416cd Mon Sep 17 00:00:00 2001 From: Marcel Bierling Date: Wed, 2 Sep 2026 17:39:43 +0200 Subject: [PATCH 4/7] Include rather than MSVC's --- code/arraylist.h | 2 +- code/data.cpp | 2 +- code/sha.h | 2 +- code/techtype.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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/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.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/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 /*************************************************************************** From c128d0acc074589daff9175fbbe0f2238eaedcf6 Mon Sep 17 00:00:00 2001 From: Marcel Bierling Date: Wed, 2 Sep 2026 18:08:35 +0200 Subject: [PATCH 5/7] Define O_BINARY where the platform has no text mode --- code/vqalib/dstream.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/vqalib/dstream.cpp b/code/vqalib/dstream.cpp index ae76ce1bd..7ccd13d66 100644 --- a/code/vqalib/dstream.cpp +++ b/code/vqalib/dstream.cpp @@ -50,6 +50,10 @@ #endif #include +#ifndef O_BINARY +#define O_BINARY 0 +#endif + long __cdecl Disk_VQA_Stream_Handler(VQAHandle *vqa, long action, void *buffer, long nbytes) { From fd84c00fe0676aa5e86052e0b4a689fdfefdaba7 Mon Sep 17 00:00:00 2001 From: Marcel Bierling Date: Wed, 2 Sep 2026 18:08:35 +0200 Subject: [PATCH 6/7] Name the comparison type where the enum is not an int --- code/sha.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; From af3f237d793925c117bb7ac5716fd9d57ad097f0 Mon Sep 17 00:00:00 2001 From: Marcel Bierling Date: Wed, 2 Sep 2026 18:10:16 +0200 Subject: [PATCH 7/7] Include for the descriptor calls off Windows --- code/vqalib/dstream.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/vqalib/dstream.cpp b/code/vqalib/dstream.cpp index 7ccd13d66..7d6b6d0bb 100644 --- a/code/vqalib/dstream.cpp +++ b/code/vqalib/dstream.cpp @@ -47,6 +47,8 @@ #include #ifdef _WIN32 #include +#else +#include #endif #include