From 9a08968453412b7279498d813f7c0b94444e7fae Mon Sep 17 00:00:00 2001 From: mittorn Date: Wed, 12 Feb 2020 15:37:46 +0700 Subject: [PATCH] fix undefined symbols and conflicts on OpenWatcom --- cl_dll/hl/hl_baseentity.cpp | 1 + cl_dll/util.cpp | 4 ++-- dlls/nodes.cpp | 7 +++++-- dlls/util.cpp | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cl_dll/hl/hl_baseentity.cpp b/cl_dll/hl/hl_baseentity.cpp index 38978f6a..2e2ec2d6 100644 --- a/cl_dll/hl/hl_baseentity.cpp +++ b/cl_dll/hl/hl_baseentity.cpp @@ -347,3 +347,4 @@ int CBasePlayerWeapon::ExtractClipAmmo( CBasePlayerWeapon *pWeapon ) { return 0; void CBasePlayerWeapon::RetireWeapon( void ) { } void CSoundEnt::InsertSound( int iType, const Vector &vecOrigin, int iVolume, float flDuration ) {} void RadiusDamage( Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, float flRadius, int iClassIgnore, int bitsDamageType ){} +void CSprite::AnimateUntilDead( void ) {} diff --git a/cl_dll/util.cpp b/cl_dll/util.cpp index cda9fdf4..33e68070 100644 --- a/cl_dll/util.cpp +++ b/cl_dll/util.cpp @@ -33,10 +33,10 @@ #ifndef M_PI_F #define M_PI_F (float)M_PI #endif - extern vec3_t vec3_origin; -#ifdef _MSC_VER +// if C++ mangling differs from C symbol name +#if defined _MSC_VER || defined __WATCOMC__ vec3_t vec3_origin; #endif diff --git a/dlls/nodes.cpp b/dlls/nodes.cpp index c8e5649c..f5f399a0 100644 --- a/dlls/nodes.cpp +++ b/dlls/nodes.cpp @@ -42,10 +42,13 @@ CGraph WorldGraph; LINK_ENTITY_TO_CLASS( info_node, CNodeEnt ) LINK_ENTITY_TO_CLASS( info_node_air, CNodeEnt ) -#if !defined _WIN32 +#ifdef __DOS__ +#include +#define CreateDirectoryA(p, n) mkdir(p) +#elif !defined _WIN32 #include #include -#define CreateDirectoryA(p, n) mkdir(p, 0777) +#define CreateDirectoryA(p, n) mkdir(p,777) #endif //========================================================= diff --git a/dlls/util.cpp b/dlls/util.cpp index 018a2f8e..e2e4292d 100644 --- a/dlls/util.cpp +++ b/dlls/util.cpp @@ -1729,7 +1729,7 @@ void CSaveRestoreBuffer::BufferRewind( int size ) m_pdata->size -= size; } -#ifndef _WIN32 +#if !defined _WIN32 && !defined __WATCOMC__ extern "C" { unsigned _rotr( unsigned val, int shift ) {