From b00170a0a26f86f8ac8e46cb0d8ebb8f2d26a2a1 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 26 Oct 2019 15:48:49 +0300 Subject: [PATCH] Support compiling with GCC 3.4.3 --- common/com_model.h | 4 ++-- common/mathlib.h | 4 +--- dlls/extdll.h | 7 +++++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/common/com_model.h b/common/com_model.h index abc8e8e6..631373fc 100644 --- a/common/com_model.h +++ b/common/com_model.h @@ -173,7 +173,7 @@ typedef struct mleaf_s } mleaf_t; -typedef struct msurface_s +struct msurface_s { int visframe; // should be drawn when node is crossed @@ -205,7 +205,7 @@ typedef struct msurface_s color24 *samples; // note: this is the actual lightmap data for this surface decal_t *pdecals; -} msurface_t; +}; typedef struct msurfmesh_s { diff --git a/common/mathlib.h b/common/mathlib.h index 6bcf76eb..5a1cd0b0 100644 --- a/common/mathlib.h +++ b/common/mathlib.h @@ -19,14 +19,12 @@ #include typedef float vec_t; -typedef vec_t vec2_t[2]; -#ifndef DID_VEC3_T_DEFINE +#if !defined DID_VEC3_T_DEFINE #define DID_VEC3_T_DEFINE typedef vec_t vec3_t[3]; #endif -typedef vec_t vec4_t[4]; // x,y,z,w #ifndef M_PI #define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h diff --git a/dlls/extdll.h b/dlls/extdll.h index 4610db5e..cded1754 100644 --- a/dlls/extdll.h +++ b/dlls/extdll.h @@ -51,12 +51,15 @@ #ifndef TRUE #define TRUE (!FALSE) #endif +#include +#include typedef unsigned int ULONG; typedef unsigned char BYTE; typedef int BOOL; #define MAX_PATH PATH_MAX -#include -#include +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif #endif //_WIN32 // Misc C-runtime library headers