mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-30 08:01:02 +00:00
Fix compilation for *BSD
Change most __linux__ defines to __unix__ for all UNIX like systems.
This commit is contained in:
parent
56bd47ac43
commit
9678020677
10 changed files with 11 additions and 11 deletions
|
@ -2003,7 +2003,7 @@ void idMultiplayerGame::UpdateMainGui( void ) {
|
||||||
mainGui->SetStateString( keyval->GetKey(), keyval->GetValue() );
|
mainGui->SetStateString( keyval->GetKey(), keyval->GetValue() );
|
||||||
}
|
}
|
||||||
mainGui->StateChanged( gameLocal.time );
|
mainGui->StateChanged( gameLocal.time );
|
||||||
#if defined( __linux__ )
|
#if defined( __unix__ )
|
||||||
// replacing the oh-so-useful s_reverse with sound backend prompt
|
// replacing the oh-so-useful s_reverse with sound backend prompt
|
||||||
mainGui->SetStateString( "driver_prompt", "1" );
|
mainGui->SetStateString( "driver_prompt", "1" );
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -100,7 +100,7 @@ If you have questions concerning this license or the applicable additional terms
|
||||||
// atm, we have no useful way to reconstruct the trace, so let's leave it off
|
// atm, we have no useful way to reconstruct the trace, so let's leave it off
|
||||||
#define ID_BT_STUB
|
#define ID_BT_STUB
|
||||||
#ifndef ID_BT_STUB
|
#ifndef ID_BT_STUB
|
||||||
#if defined( __linux__ )
|
#if defined( __unix__ )
|
||||||
#if defined( _DEBUG )
|
#if defined( _DEBUG )
|
||||||
#define ID_BT_STUB
|
#define ID_BT_STUB
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -62,7 +62,7 @@ idCVar com_asyncInput( "com_asyncInput", "0", CVAR_BOOL|CVAR_SYSTEM, "sample inp
|
||||||
#define ASYNCSOUND_INFO "0: mix sound inline, 1: memory mapped async mix, 2: callback mixing, 3: write async mix"
|
#define ASYNCSOUND_INFO "0: mix sound inline, 1: memory mapped async mix, 2: callback mixing, 3: write async mix"
|
||||||
#if defined( MACOS_X )
|
#if defined( MACOS_X )
|
||||||
idCVar com_asyncSound( "com_asyncSound", "2", CVAR_INTEGER|CVAR_SYSTEM|CVAR_ROM, ASYNCSOUND_INFO );
|
idCVar com_asyncSound( "com_asyncSound", "2", CVAR_INTEGER|CVAR_SYSTEM|CVAR_ROM, ASYNCSOUND_INFO );
|
||||||
#elif defined( __linux__ )
|
#elif defined( __unix__ )
|
||||||
idCVar com_asyncSound( "com_asyncSound", "3", CVAR_INTEGER|CVAR_SYSTEM|CVAR_ROM, ASYNCSOUND_INFO );
|
idCVar com_asyncSound( "com_asyncSound", "3", CVAR_INTEGER|CVAR_SYSTEM|CVAR_ROM, ASYNCSOUND_INFO );
|
||||||
#else
|
#else
|
||||||
idCVar com_asyncSound( "com_asyncSound", "1", CVAR_INTEGER|CVAR_SYSTEM, ASYNCSOUND_INFO, 0, 1 );
|
idCVar com_asyncSound( "com_asyncSound", "1", CVAR_INTEGER|CVAR_SYSTEM, ASYNCSOUND_INFO, 0, 1 );
|
||||||
|
|
|
@ -321,7 +321,7 @@ void idSessionLocal::SetMainMenuGuiVars( void ) {
|
||||||
|
|
||||||
guiMsg->SetStateString( "visible_hasxp", fileSystem->HasD3XP() ? "1" : "0" );
|
guiMsg->SetStateString( "visible_hasxp", fileSystem->HasD3XP() ? "1" : "0" );
|
||||||
|
|
||||||
#if defined( __linux__ )
|
#if defined( __unix__ )
|
||||||
guiMainMenu->SetStateString( "driver_prompt", "1" );
|
guiMainMenu->SetStateString( "driver_prompt", "1" );
|
||||||
#else
|
#else
|
||||||
guiMainMenu->SetStateString( "driver_prompt", "0" );
|
guiMainMenu->SetStateString( "driver_prompt", "0" );
|
||||||
|
|
|
@ -1485,7 +1485,7 @@ void idMultiplayerGame::UpdateMainGui( void ) {
|
||||||
mainGui->SetStateString( keyval->GetKey(), keyval->GetValue() );
|
mainGui->SetStateString( keyval->GetKey(), keyval->GetValue() );
|
||||||
}
|
}
|
||||||
mainGui->StateChanged( gameLocal.time );
|
mainGui->StateChanged( gameLocal.time );
|
||||||
#if defined( __linux__ )
|
#if defined( __unix__ )
|
||||||
// replacing the oh-so-useful s_reverse with sound backend prompt
|
// replacing the oh-so-useful s_reverse with sound backend prompt
|
||||||
mainGui->SetStateString( "driver_prompt", "1" );
|
mainGui->SetStateString( "driver_prompt", "1" );
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -2044,7 +2044,7 @@ bool idFrustum::ProjectionBounds( const idBounds &bounds, idBounds &projectionBo
|
||||||
return ProjectionBounds( idBox( bounds, vec3_origin, mat3_identity ), projectionBounds );
|
return ProjectionBounds( idBox( bounds, vec3_origin, mat3_identity ), projectionBounds );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __linux__
|
#ifndef __GNUC__
|
||||||
|
|
||||||
/*
|
/*
|
||||||
============
|
============
|
||||||
|
|
|
@ -42,7 +42,7 @@ If you have questions concerning this license or the applicable additional terms
|
||||||
#define GL_GLEXT_LEGACY
|
#define GL_GLEXT_LEGACY
|
||||||
#include <OpenGL/gl.h>
|
#include <OpenGL/gl.h>
|
||||||
|
|
||||||
#elif defined( __linux__ )
|
#elif defined( __unix__ )
|
||||||
|
|
||||||
// using our local glext.h
|
// using our local glext.h
|
||||||
// http://oss.sgi.com/projects/ogl-sample/ABI/
|
// http://oss.sgi.com/projects/ogl-sample/ABI/
|
||||||
|
@ -544,7 +544,7 @@ extern BOOL ( WINAPI * qwglSwapLayerBuffers)(HDC, UINT);
|
||||||
|
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
#if defined( __linux__ )
|
#if defined( __unix__ )
|
||||||
|
|
||||||
//GLX Functions
|
//GLX Functions
|
||||||
extern XVisualInfo * (*qglXChooseVisual)( Display *dpy, int screen, int *attribList );
|
extern XVisualInfo * (*qglXChooseVisual)( Display *dpy, int screen, int *attribList );
|
||||||
|
|
|
@ -26,10 +26,10 @@ If you have questions concerning this license or the applicable additional terms
|
||||||
===========================================================================
|
===========================================================================
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <malloc.h>
|
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
// OSS sound interface
|
// OSS sound interface
|
||||||
|
|
|
@ -123,7 +123,7 @@ void idSysLocal::DLL_Unload( uintptr_t dllHandle ) {
|
||||||
void idSysLocal::DLL_GetFileName( const char *baseName, char *dllName, int maxLength ) {
|
void idSysLocal::DLL_GetFileName( const char *baseName, char *dllName, int maxLength ) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
idStr::snPrintf( dllName, maxLength, "%s" CPUSTRING ".dll", baseName );
|
idStr::snPrintf( dllName, maxLength, "%s" CPUSTRING ".dll", baseName );
|
||||||
#elif defined( __linux__ )
|
#elif defined( __unix__ )
|
||||||
idStr::snPrintf( dllName, maxLength, "%s" CPUSTRING ".so", baseName );
|
idStr::snPrintf( dllName, maxLength, "%s" CPUSTRING ".so", baseName );
|
||||||
#elif defined( MACOS_X )
|
#elif defined( MACOS_X )
|
||||||
idStr::snPrintf( dllName, maxLength, "%s" ".dylib", baseName );
|
idStr::snPrintf( dllName, maxLength, "%s" ".dylib", baseName );
|
||||||
|
|
|
@ -181,7 +181,7 @@ static void LinkEdge( optEdge_t *e ) {
|
||||||
e->v2->edges = e;
|
e->v2->edges = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __unix__
|
||||||
|
|
||||||
optVertex_t *FindOptVertex( idDrawVert *v, optimizeGroup_t *opt );
|
optVertex_t *FindOptVertex( idDrawVert *v, optimizeGroup_t *opt );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue