From 20a20c72d4931be357f5010f7fd7c282783c5544 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 24 Jan 2026 07:09:36 +0500 Subject: [PATCH] common: do not override neither _cdecl or _stdcall --- common/port.h | 5 ----- engine/server/sv_game.c | 6 +++++- engine/server/sv_save.c | 4 ++++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/common/port.h b/common/port.h index a0037a4c..f83e5e87 100644 --- a/common/port.h +++ b/common/port.h @@ -52,11 +52,6 @@ GNU General Public License for more details. #define OS_LIB_EXT "prx" #endif -#if !defined( _MSC_VER ) - #define __cdecl - #define __stdcall -#endif - #if !XASH_WIN32 typedef void *HINSTANCE; typedef struct tagPOINT { int x, y; } POINT; // one nasty function in cdll_int.h needs it diff --git a/engine/server/sv_game.c b/engine/server/sv_game.c index 00081364..ce26db5a 100644 --- a/engine/server/sv_game.c +++ b/engine/server/sv_game.c @@ -32,8 +32,12 @@ static byte fatphs[(MAX_MAP_LEAFS+7)/8]; static byte clientpvs[(MAX_MAP_LEAFS+7)/8]; // for find client in PVS // exports +#if XASH_WIN32 typedef void (__cdecl *LINK_ENTITY_FUNC)( entvars_t *pev ); -typedef void (__stdcall *GIVEFNPTRSTODLL)( enginefuncs_t* engfuncs, globalvars_t *pGlobals ); +#else +typedef void (*LINK_ENTITY_FUNC)( entvars_t *pev ); +#endif +typedef void (DLLEXPORT *GIVEFNPTRSTODLL)( enginefuncs_t* engfuncs, globalvars_t *pGlobals ); #ifndef NDEBUG qboolean SV_CheckEdict( const edict_t *e, const char *file, const int line ) diff --git a/engine/server/sv_save.c b/engine/server/sv_save.c index b8c7ac86..b051a184 100644 --- a/engine/server/sv_save.c +++ b/engine/server/sv_save.c @@ -82,7 +82,11 @@ typedef struct float time; } SAVE_LIGHTSTYLE; +#if XASH_WIN32 static void (__cdecl *pfnSaveGameComment)( char *buffer, int max_length ) = NULL; +#else // XASH_WIN32 +static void (*pfnSaveGameComment)( char *buffer, int max_length ) = NULL; +#endif // XASH_WIN32 static TYPEDESCRIPTION gGameHeader[] = {