Rename VERSION to YQ2VERSION to prevent collisions

Newer jpeg versions (I guess starting with 9) define an macro
"VERSION", colliding with ours. While wie could #undef it, take
the less hacky route and rename it.
This commit is contained in:
Yamagi Burmeister 2014-01-27 18:14:36 +01:00
parent 70d2aa21b7
commit eb879bb9b6
8 changed files with 9 additions and 9 deletions

View File

@ -630,7 +630,7 @@ GLimp_InitGraphics(qboolean fullscreen)
InitGamma();
/* Window title */
snprintf(title, sizeof(title), "Yamagi Quake II %s", VERSION);
snprintf(title, sizeof(title), "Yamagi Quake II %s", YQ2VERSION);
#if SDL_VERSION_ATLEAST(2, 0, 0)
SDL_SetWindowTitle(window, title);
#else

View File

@ -72,7 +72,7 @@ main(int argc, char **argv)
/* enforce C locale */
setenv("LC_ALL", "C", 1);
printf("\nYamagi Quake II v%s\n", VERSION);
printf("\nYamagi Quake II v%s\n", YQ2VERSION);
printf("=====================\n\n");
#ifndef DEDICATED_ONLY

View File

@ -48,7 +48,7 @@ printBacktrace(int sig)
strings = backtrace_symbols(array, size);
printf("Product: Yamagi Quake II\n");
printf("Version: %s\n", VERSION);
printf("Version: %s\n", YQ2VERSION);
printf("Plattform: %s\n", BUILDSTRING);
printf("Architecture: %s\n", CPUSTRING);
printf("Compiler: %s\n", __VERSION__);
@ -69,7 +69,7 @@ void
printBacktrace(int sig)
{
printf("Product: Yamagi Quake II\n");
printf("Version: %s\n", VERSION);
printf("Version: %s\n", YQ2VERSION);
printf("Plattform: %s\n", BUILDSTRING);
printf("Architecture: %s\n", CPUSTRING);
printf("Compiler: %s\n", __VERSION__);

View File

@ -707,7 +707,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
Sys_RedirectStdout();
#endif
printf("Yamagi Quake II v%s\n", VERSION);
printf("Yamagi Quake II v%s\n", YQ2VERSION);
printf("=====================\n\n");
#ifndef DEDICATED_ONLY

View File

@ -622,7 +622,7 @@ Con_DrawConsole(float frac)
SCR_AddDirtyPoint(0, 0);
SCR_AddDirtyPoint(viddef.width - 1, lines - 1);
Com_sprintf(version, sizeof(version), "Yamagi Quake II v%s", VERSION);
Com_sprintf(version, sizeof(version), "Yamagi Quake II v%s", YQ2VERSION);
for (x = 0; x < 21; x++)
{

View File

@ -33,7 +33,7 @@
#include "crc.h"
/* Should have 4 characters. */
#define VERSION "5.21"
#define YQ2VERSION "5.21"
#define BASEDIRNAME "baseq2"

View File

@ -241,7 +241,7 @@ Qcommon_Init(int argc, char **argv)
dedicated = Cvar_Get("dedicated", "0", CVAR_NOSET);
#endif
s = va("%s %s %s %s", VERSION, CPUSTRING, __DATE__, BUILDSTRING);
s = va("%s %s %s %s", YQ2VERSION, CPUSTRING, __DATE__, BUILDSTRING);
Cvar_Get("version", s, CVAR_SERVERINFO | CVAR_NOSET);
if (dedicated->value)

View File

@ -169,7 +169,7 @@ SVC_DirectConnect(void)
if (version != PROTOCOL_VERSION)
{
Netchan_OutOfBandPrint(NS_SERVER, adr,
"print\nServer is version %s.\n", VERSION);
"print\nServer is version %s.\n", YQ2VERSION);
Com_DPrintf(" rejected connect from version %i\n", version);
return;
}