mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
preproc: add a FreeBSD condition everytime there is Linux or MacOS
This commit is contained in:
parent
69972f9458
commit
a3773852a4
48 changed files with 97 additions and 97 deletions
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
#include "time.h"
|
#include "time.h"
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
|
|
||||||
// Necessary for proper boolean type declaration
|
// Necessary for proper boolean type declaration
|
||||||
#include "qertypes.h"
|
#include "qertypes.h"
|
||||||
|
@ -116,7 +116,7 @@ typedef struct tagRECT
|
||||||
|
|
||||||
typedef uint UINT;
|
typedef uint UINT;
|
||||||
|
|
||||||
#endif // __linux__
|
#endif // defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
|
|
||||||
#include "synapse.h"
|
#include "synapse.h"
|
||||||
#include "iplugin.h"
|
#include "iplugin.h"
|
||||||
|
|
|
@ -195,7 +195,7 @@ extern const char* PLUGIN_NAME;
|
||||||
return buffer;
|
return buffer;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
// the bCreateConsole parameter is ignored on linux ..
|
// the bCreateConsole parameter is ignored on linux ..
|
||||||
bool Q_Exec( const char *pCmd, bool bCreateConsole ){
|
bool Q_Exec( const char *pCmd, bool bCreateConsole ){
|
||||||
switch ( fork() )
|
switch ( fork() )
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
extern GtkWidget *g_pEditModeAddRadioButton;
|
extern GtkWidget *g_pEditModeAddRadioButton;
|
||||||
|
|
||||||
char* Q_realpath( const char *path, char *resolved_path, size_t size ){
|
char* Q_realpath( const char *path, char *resolved_path, size_t size ){
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
return realpath( path, resolved_path );
|
return realpath( path, resolved_path );
|
||||||
#else
|
#else
|
||||||
return _fullpath( resolved_path, path, size );
|
return _fullpath( resolved_path, path, size );
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#define PLUGIN
|
#define PLUGIN
|
||||||
#define Q3RADIANT
|
#define Q3RADIANT
|
||||||
|
|
||||||
#if defined( __linux__ ) || defined( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
template <class T>
|
template <class T>
|
||||||
inline T min( T x, T y ) { return ( x < y ) ? x : y; }
|
inline T min( T x, T y ) { return ( x < y ) ? x : y; }
|
||||||
template <class T>
|
template <class T>
|
||||||
|
|
|
@ -73,7 +73,7 @@ void InitInstance(){
|
||||||
strcat( INIfn, fn_dir );
|
strcat( INIfn, fn_dir );
|
||||||
strcat( INIfn, fn_name );
|
strcat( INIfn, fn_name );
|
||||||
strcat( INIfn, ".ini" );
|
strcat( INIfn, ".ini" );
|
||||||
#else // if def __linux__
|
#else // if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
strcpy( INIfn, g_get_home_dir() );
|
strcpy( INIfn, g_get_home_dir() );
|
||||||
strcat( INIfn, "/.radiant/" );
|
strcat( INIfn, "/.radiant/" );
|
||||||
strcat( INIfn, RADIANT_VERSION );
|
strcat( INIfn, RADIANT_VERSION );
|
||||||
|
@ -166,7 +166,7 @@ _QERQglTable g_QglTable;
|
||||||
|
|
||||||
#define CONFIG_SECTION "Configuration"
|
#define CONFIG_SECTION "Configuration"
|
||||||
|
|
||||||
#if defined( __linux__ ) || defined( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
|
|
||||||
static bool read_var( const char *filename, const char *section, const char *key, char *value ){
|
static bool read_var( const char *filename, const char *section, const char *key, char *value ){
|
||||||
char line[1024], *ptr;
|
char line[1024], *ptr;
|
||||||
|
@ -316,7 +316,7 @@ static bool save_var( const char *filename, const char *section, const char *key
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int INIGetInt( const char *key, int def ){
|
int INIGetInt( const char *key, int def ){
|
||||||
#if defined( __linux__ ) || defined( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
char value[1024];
|
char value[1024];
|
||||||
|
|
||||||
if ( read_var( INIfn, CONFIG_SECTION, key, value ) ) {
|
if ( read_var( INIfn, CONFIG_SECTION, key, value ) ) {
|
||||||
|
@ -339,7 +339,7 @@ void INISetInt( const char *key, int val, const char *comment /* = NULL */ ){
|
||||||
else{
|
else{
|
||||||
sprintf( s, "%d", val );
|
sprintf( s, "%d", val );
|
||||||
}
|
}
|
||||||
#if defined( __linux__ ) || defined( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
save_var( INIfn, CONFIG_SECTION, key, s );
|
save_var( INIfn, CONFIG_SECTION, key, s );
|
||||||
#else
|
#else
|
||||||
WritePrivateProfileString( CONFIG_SECTION, key, s, INIfn );
|
WritePrivateProfileString( CONFIG_SECTION, key, s, INIfn );
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#if defined( __linux__ ) || defined( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <GL/glx.h>
|
#include <GL/glx.h>
|
||||||
|
|
||||||
// Necessary for proper boolean type declaration
|
// Necessary for proper boolean type declaration
|
||||||
|
@ -46,7 +46,7 @@ typedef int BOOL;
|
||||||
#define IDOK 1
|
#define IDOK 1
|
||||||
#define IDCANCEL 2
|
#define IDCANCEL 2
|
||||||
|
|
||||||
#endif // __linux__
|
#endif // defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
|
|
||||||
#include "synapse.h"
|
#include "synapse.h"
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#ifndef __IGL_H__
|
#ifndef __IGL_H__
|
||||||
#define __IGL_H__
|
#define __IGL_H__
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <GL/glx.h>
|
#include <GL/glx.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
// NOTE: we don't use this crap .. with the total mess of mixing win32/unix paths we need to recognize both '/' and '\\'
|
// NOTE: we don't use this crap .. with the total mess of mixing win32/unix paths we need to recognize both '/' and '\\'
|
||||||
#define PATHSEPERATOR '/'
|
#define PATHSEPERATOR '/'
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
bool Q_Exec( const char *cmd, char *cmdline, const char *execdir, bool bCreateConsole ){
|
bool Q_Exec( const char *cmd, char *cmdline, const char *execdir, bool bCreateConsole ){
|
||||||
char fullcmd[2048];
|
char fullcmd[2048];
|
||||||
char *pCmd;
|
char *pCmd;
|
||||||
|
|
|
@ -81,7 +81,7 @@ int Net_AddressCompare( address_t *addr1, address_t *addr2 ){
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
return stricmp( addr1->ip, addr2->ip );
|
return stricmp( addr1->ip, addr2->ip );
|
||||||
#endif
|
#endif
|
||||||
#if __linux__ || __APPLE__
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
return strcasecmp( addr1->ip, addr2->ip );
|
return strcasecmp( addr1->ip, addr2->ip );
|
||||||
#endif
|
#endif
|
||||||
} //end of the function Net_AddressCompare
|
} //end of the function Net_AddressCompare
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -71,7 +71,7 @@ struct PK3FileInfo
|
||||||
|
|
||||||
#ifdef LOG_PAKFAIL
|
#ifdef LOG_PAKFAIL
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -82,7 +82,7 @@ class LogFile
|
||||||
public:
|
public:
|
||||||
FILE *m_pFile;
|
FILE *m_pFile;
|
||||||
LogFile( const char* pName ){
|
LogFile( const char* pName ){
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
// leo: use ~/.q3a/radiant/paklog instead of /tmp/paklog.txt
|
// leo: use ~/.q3a/radiant/paklog instead of /tmp/paklog.txt
|
||||||
char *home = NULL;
|
char *home = NULL;
|
||||||
|
|
||||||
|
@ -869,7 +869,7 @@ void WINAPI InitPakFile( const char * pBasePath, const char *pName ){
|
||||||
|
|
||||||
if ( pName == NULL ) {
|
if ( pName == NULL ) {
|
||||||
//++timo FIXME: use some kind of compatibility lib here!
|
//++timo FIXME: use some kind of compatibility lib here!
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
char cWork[WORK_LEN];
|
char cWork[WORK_LEN];
|
||||||
struct dirent *dirlist;
|
struct dirent *dirlist;
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
|
|
|
@ -75,7 +75,7 @@ inline char* Q_StrDup( const char* pStr ) {
|
||||||
return strcpy( new char[strlen( pStr ) + 1], pStr );
|
return strcpy( new char[strlen( pStr ) + 1], pStr );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#define strcmpi strcasecmp
|
#define strcmpi strcasecmp
|
||||||
#define stricmp strcasecmp
|
#define stricmp strcasecmp
|
||||||
#define strnicmp strncasecmp
|
#define strnicmp strncasecmp
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
|
|
||||||
#if defined( _WIN32 )
|
#if defined( _WIN32 )
|
||||||
#define SYNAPSE_DLL_EXPORT WINAPI
|
#define SYNAPSE_DLL_EXPORT WINAPI
|
||||||
#elif defined( __linux__ ) || defined( __APPLE__ ) /* ydnar */
|
#elif defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ ) /* ydnar */
|
||||||
#define SYNAPSE_DLL_EXPORT
|
#define SYNAPSE_DLL_EXPORT
|
||||||
#else
|
#else
|
||||||
#error unknown architecture
|
#error unknown architecture
|
||||||
|
@ -459,7 +459,7 @@ public:
|
||||||
/*!
|
/*!
|
||||||
\todo cleanup, make that private with accessors
|
\todo cleanup, make that private with accessors
|
||||||
*/
|
*/
|
||||||
#if defined( __linux__ ) || defined( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
void *mpDLL; ///< handle to the shared object (invalid if SYN_BUILTIN)
|
void *mpDLL; ///< handle to the shared object (invalid if SYN_BUILTIN)
|
||||||
#elif defined( _WIN32 )
|
#elif defined( _WIN32 )
|
||||||
HMODULE mpDLL; ///< handle to the shared object (invalid if SYN_BUILTIN)
|
HMODULE mpDLL; ///< handle to the shared object (invalid if SYN_BUILTIN)
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include <glib/gstdio.h>
|
#include <glib/gstdio.h>
|
||||||
|
|
||||||
#include "synapse.h"
|
#include "synapse.h"
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ bool CSynapseServer::Initialize( const char* conf_file, PFN_SYN_PRINTF_VA pf ){
|
||||||
// too small to be isolated in win32/ and linux/ directories..
|
// too small to be isolated in win32/ and linux/ directories..
|
||||||
#if defined( _WIN32 )
|
#if defined( _WIN32 )
|
||||||
const char* ext_so = ".dll";
|
const char* ext_so = ".dll";
|
||||||
#elif defined ( __linux__ ) || defined ( __APPLE__ )
|
#elif defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
const char* ext_so = ".so";
|
const char* ext_so = ".so";
|
||||||
#endif
|
#endif
|
||||||
const char* ext = strrchr( name, '.' );
|
const char* ext = strrchr( name, '.' );
|
||||||
|
@ -221,7 +221,7 @@ void CSynapseClientSlot::ReleaseSO(){
|
||||||
mpDLL = NULL;
|
mpDLL = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined( __linux__ ) || defined ( __APPLE__ )
|
#elif defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
void CSynapseServer::EnumerateInterfaces( Str &soname ){
|
void CSynapseServer::EnumerateInterfaces( Str &soname ){
|
||||||
CSynapseClientSlot slot;
|
CSynapseClientSlot slot;
|
||||||
slot.mpDLL = dlopen( soname.GetBuffer(), RTLD_NOW );
|
slot.mpDLL = dlopen( soname.GetBuffer(), RTLD_NOW );
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#if defined( __linux__ ) || defined( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
|
|
||||||
// Necessary for proper boolean type declaration
|
// Necessary for proper boolean type declaration
|
||||||
#include "qertypes.h"
|
#include "qertypes.h"
|
||||||
|
@ -79,7 +79,7 @@ typedef struct tagRECT
|
||||||
long bottom;
|
long bottom;
|
||||||
} RECT, *PRECT, *LPRECT;
|
} RECT, *PRECT, *LPRECT;
|
||||||
|
|
||||||
#endif // __linux__
|
#endif // defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
|
|
||||||
// plugin
|
// plugin
|
||||||
// FIXME TTimo: drop this
|
// FIXME TTimo: drop this
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#if defined __linux__ || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#define WINAPI
|
#define WINAPI
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#else
|
#else
|
||||||
|
@ -119,7 +119,7 @@ int vfsBuildShortPathName( const char* pPath, char* pBuffer, int nBufferLen ){
|
||||||
strcpy( pBuffer, pPath ); // Use long filename
|
strcpy( pBuffer, pPath ); // Use long filename
|
||||||
}
|
}
|
||||||
return nResult;
|
return nResult;
|
||||||
#elif defined ( __linux__ ) || defined ( __APPLE__ )
|
#elif defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
|
|
||||||
// remove /../ from directories
|
// remove /../ from directories
|
||||||
const char *scr = pPath; char *dst = pBuffer;
|
const char *scr = pPath; char *dst = pBuffer;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#endif
|
#endif
|
||||||
#include "assert.h"
|
#include "assert.h"
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#define UNICODE
|
#define UNICODE
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ void Error( const char *error, ... ){
|
||||||
|
|
||||||
strcat( text, "\n" );
|
strcat( text, "\n" );
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
if ( errno != 0 ) {
|
if ( errno != 0 ) {
|
||||||
strcat( text, "errno: " );
|
strcat( text, "errno: " );
|
||||||
strcat( text, strerror( errno ) );
|
strcat( text, strerror( errno ) );
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#include <gdk/gdkkeysyms.h>
|
#include <gdk/gdkkeysyms.h>
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -118,7 +118,7 @@ static void create_splash() {
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
// Loki stuff
|
// Loki stuff
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
|
|
||||||
/* A short game name, could be used as argv[0] */
|
/* A short game name, could be used as argv[0] */
|
||||||
static char game_name[100] = "";
|
static char game_name[100] = "";
|
||||||
|
@ -480,7 +480,7 @@ int mainRadiant( int argc, char* argv[] ) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
// Give away unnecessary root privileges.
|
// Give away unnecessary root privileges.
|
||||||
// Important: must be done before calling gtk_init().
|
// Important: must be done before calling gtk_init().
|
||||||
char *loginname;
|
char *loginname;
|
||||||
|
@ -578,7 +578,7 @@ int mainRadiant( int argc, char* argv[] ) {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
Str home;
|
Str home;
|
||||||
home = g_get_home_dir();
|
home = g_get_home_dir();
|
||||||
AddSlash( home );
|
AddSlash( home );
|
||||||
|
@ -860,7 +860,7 @@ int mainRadiant( int argc, char* argv[] ) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
if ( ( qglXQueryExtension == NULL ) || ( qglXQueryExtension( gdk_x11_get_default_xdisplay(), NULL, NULL ) != True ) ) {
|
if ( ( qglXQueryExtension == NULL ) || ( qglXQueryExtension( gdk_x11_get_default_xdisplay(), NULL, NULL ) != True ) ) {
|
||||||
Sys_FPrintf( SYS_ERR, "glXQueryExtension failed\n" );
|
Sys_FPrintf( SYS_ERR, "glXQueryExtension failed\n" );
|
||||||
_exit( 1 );
|
_exit( 1 );
|
||||||
|
@ -1128,7 +1128,7 @@ void SaveWithRegion( char *name ){
|
||||||
Map_SaveFile( name, region_active );
|
Map_SaveFile( name, region_active );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
typedef struct {
|
typedef struct {
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
int status;
|
int status;
|
||||||
|
@ -1240,7 +1240,7 @@ void RunBsp( char *command ){
|
||||||
strSys += "\n";
|
strSys += "\n";
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
|
|
||||||
// write qe3bsp.sh
|
// write qe3bsp.sh
|
||||||
sprintf( batpath, "%sqe3bsp.sh", temppath );
|
sprintf( batpath, "%sqe3bsp.sh", temppath );
|
||||||
|
@ -1269,7 +1269,7 @@ void RunBsp( char *command ){
|
||||||
|
|
||||||
Pointfile_Delete();
|
Pointfile_Delete();
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
bsp_child_process_t *process = ( bsp_child_process_t *) malloc( sizeof( bsp_child_process_t ) );
|
bsp_child_process_t *process = ( bsp_child_process_t *) malloc( sizeof( bsp_child_process_t ) );
|
||||||
memset( process, 0, sizeof( *process ) );
|
memset( process, 0, sizeof( *process ) );
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include <gdk/gdkkeysyms.h>
|
#include <gdk/gdkkeysyms.h>
|
||||||
#include <gdk/gdkprivate.h>
|
#include <gdk/gdkprivate.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
#include "gtkmisc.h"
|
#include "gtkmisc.h"
|
||||||
|
@ -2161,7 +2161,7 @@ void Clipboard_PasteMap(){
|
||||||
Platform-independent GTK clipboard support.
|
Platform-independent GTK clipboard support.
|
||||||
\todo Using GDK_SELECTION_CLIPBOARD fails on win32, so we use the win32 API directly for now.
|
\todo Using GDK_SELECTION_CLIPBOARD fails on win32, so we use the win32 API directly for now.
|
||||||
*/
|
*/
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -3586,7 +3586,7 @@ void MainFrame::LoadCommandMap(){
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
strINI = g_PrefsDlg.m_rc_path->str;
|
strINI = g_PrefsDlg.m_rc_path->str;
|
||||||
#elif defined( WIN32 )
|
#elif defined( WIN32 )
|
||||||
strINI = g_strGameToolsPath;
|
strINI = g_strGameToolsPath;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
#include "preferences.h"
|
#include "preferences.h"
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#include "qsysprintf.h"
|
#include "qsysprintf.h"
|
||||||
#include "qe3.h"
|
#include "qe3.h"
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#ifdef USEPLUGINENTITIES
|
#ifdef USEPLUGINENTITIES
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#endif
|
#endif
|
||||||
//#include "qe3.h"
|
//#include "qe3.h"
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -1898,7 +1898,7 @@ void CPlugInManager::CommitPatchHandleToEntity( int index, patchMesh_t *pMesh, c
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
|
|
||||||
XVisualInfo* QEX_ChooseVisual( bool zbuffer ){
|
XVisualInfo* QEX_ChooseVisual( bool zbuffer ){
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
@ -1321,7 +1321,7 @@ void CGameDialog::Init(){
|
||||||
|
|
||||||
// Add the per-user game path on all platforms
|
// Add the per-user game path on all platforms
|
||||||
if ( m_pCurrentGameDescription->mUserPathPrefix.GetLength() ) {
|
if ( m_pCurrentGameDescription->mUserPathPrefix.GetLength() ) {
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
g_qeglobals.m_strHomeGame = g_get_home_dir();
|
g_qeglobals.m_strHomeGame = g_get_home_dir();
|
||||||
g_qeglobals.m_strHomeGame += "/";
|
g_qeglobals.m_strHomeGame += "/";
|
||||||
g_qeglobals.m_strHomeGame += m_pCurrentGameDescription->mUserPathPrefix.GetBuffer();
|
g_qeglobals.m_strHomeGame += m_pCurrentGameDescription->mUserPathPrefix.GetBuffer();
|
||||||
|
@ -3722,7 +3722,7 @@ void CGameInstall::Run() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GAME_QUETOO: {
|
case GAME_QUETOO: {
|
||||||
#if defined( __APPLE__ ) || defined( __linux__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
fprintf( fg, " " ENGINE_ATTRIBUTE "=\"quetoo\"\n" );
|
fprintf( fg, " " ENGINE_ATTRIBUTE "=\"quetoo\"\n" );
|
||||||
fprintf( fg, " " PREFIX_ATTRIBUTE "=\".quetoo\"\n" );
|
fprintf( fg, " " PREFIX_ATTRIBUTE "=\".quetoo\"\n" );
|
||||||
#elif _WIN32
|
#elif _WIN32
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include "gtkmisc.h"
|
#include "gtkmisc.h"
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
|
@ -171,7 +171,7 @@ void Map_Snapshot(){
|
||||||
bGo = ( _mkdir( strOrgPath ) != -1 );
|
bGo = ( _mkdir( strOrgPath ) != -1 );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
bGo = ( mkdir( strOrgPath,0755 ) != -1 );
|
bGo = ( mkdir( strOrgPath,0755 ) != -1 );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -288,7 +288,7 @@ int BuildShortPathName( const char* pPath, char* pBuffer, int nBufferLen ){
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
int BuildShortPathName( const char* pPath, char* pBuffer, int nBufferLen ){
|
int BuildShortPathName( const char* pPath, char* pBuffer, int nBufferLen ){
|
||||||
// remove /../ from directories
|
// remove /../ from directories
|
||||||
const char *scr = pPath; char *dst = pBuffer;
|
const char *scr = pPath; char *dst = pBuffer;
|
||||||
|
@ -1208,7 +1208,7 @@ bool Sys_AltDown(){
|
||||||
return ( GetKeyState( VK_MENU ) & 0x8000 ) != 0;
|
return ( GetKeyState( VK_MENU ) & 0x8000 ) != 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
char keys[32];
|
char keys[32];
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
|
@ -1244,7 +1244,7 @@ bool Sys_ShiftDown(){
|
||||||
return ( GetKeyState( VK_SHIFT ) & 0x8000 ) != 0;
|
return ( GetKeyState( VK_SHIFT ) & 0x8000 ) != 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
char keys[32];
|
char keys[32];
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
|
@ -1329,7 +1329,7 @@ void Sys_SetCursorPos( int x, int y ){
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sys_Beep( void ){
|
void Sys_Beep( void ){
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
gdk_beep();
|
gdk_beep();
|
||||||
#else
|
#else
|
||||||
MessageBeep( MB_ICONASTERISK );
|
MessageBeep( MB_ICONASTERISK );
|
||||||
|
@ -1702,7 +1702,7 @@ void Sys_LogFile( void ){
|
||||||
Str name;
|
Str name;
|
||||||
name = g_strTempPath;
|
name = g_strTempPath;
|
||||||
name += "radiant.log";
|
name += "radiant.log";
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
g_qeglobals.hLogFile = open( name.GetBuffer(), O_TRUNC | O_CREAT | O_WRONLY, S_IREAD | S_IWRITE );
|
g_qeglobals.hLogFile = open( name.GetBuffer(), O_TRUNC | O_CREAT | O_WRONLY, S_IREAD | S_IWRITE );
|
||||||
#endif
|
#endif
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -1729,7 +1729,7 @@ void Sys_LogFile( void ){
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
_close( g_qeglobals.hLogFile );
|
_close( g_qeglobals.hLogFile );
|
||||||
#endif
|
#endif
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
close( g_qeglobals.hLogFile );
|
close( g_qeglobals.hLogFile );
|
||||||
#endif
|
#endif
|
||||||
g_qeglobals.hLogFile = 0;
|
g_qeglobals.hLogFile = 0;
|
||||||
|
@ -1757,7 +1757,7 @@ extern "C" void Sys_FPrintf_VA( int level, const char *text, va_list args ) {
|
||||||
_write( g_qeglobals.hLogFile, buf, length );
|
_write( g_qeglobals.hLogFile, buf, length );
|
||||||
_commit( g_qeglobals.hLogFile );
|
_commit( g_qeglobals.hLogFile );
|
||||||
#endif
|
#endif
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
write( g_qeglobals.hLogFile, buf, length );
|
write( g_qeglobals.hLogFile, buf, length );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ BOOL ( WINAPI * qwglSwapIntervalEXT )( int interval );
|
||||||
#define WINAPI
|
#define WINAPI
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
void* g_hGLDLL;
|
void* g_hGLDLL;
|
||||||
|
|
||||||
XVisualInfo* ( *qglXChooseVisual )( Display * dpy, int screen, int *attribList );
|
XVisualInfo* ( *qglXChooseVisual )( Display * dpy, int screen, int *attribList );
|
||||||
|
@ -525,7 +525,7 @@ void QGL_Shutdown(){
|
||||||
FreeLibrary( g_hGLDLL );
|
FreeLibrary( g_hGLDLL );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
dlclose( g_hGLDLL );
|
dlclose( g_hGLDLL );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -936,7 +936,7 @@ void QGL_Shutdown(){
|
||||||
qwglSetDeviceGammaRampEXT = NULL;
|
qwglSetDeviceGammaRampEXT = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
qglXChooseVisual = NULL;
|
qglXChooseVisual = NULL;
|
||||||
qglXCreateContext = NULL;
|
qglXCreateContext = NULL;
|
||||||
qglXDestroyContext = NULL;
|
qglXDestroyContext = NULL;
|
||||||
|
@ -986,7 +986,7 @@ static void* safe_dlsym( void *handle, char *symbol ){
|
||||||
return GetProcAddress( handle, symbol );
|
return GetProcAddress( handle, symbol );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
void* ret = dlsym( handle, symbol );
|
void* ret = dlsym( handle, symbol );
|
||||||
const char *err = dlerror();
|
const char *err = dlerror();
|
||||||
if ( err ) {
|
if ( err ) {
|
||||||
|
@ -1174,7 +1174,7 @@ int QGL_Init( const char *dllname, const char* gluname ){
|
||||||
g_hGLDLL = LoadLibrary( dllname );
|
g_hGLDLL = LoadLibrary( dllname );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined ( __linux__ ) || ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
const char *err;
|
const char *err;
|
||||||
|
|
||||||
// NOTE TTimo
|
// NOTE TTimo
|
||||||
|
@ -1623,7 +1623,7 @@ int QGL_Init( const char *dllname, const char* gluname ){
|
||||||
qglMTexCoord2fSGIS = 0;
|
qglMTexCoord2fSGIS = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
qglXChooseVisual = safe_dlsym( g_hGLDLL, "glXChooseVisual" );
|
qglXChooseVisual = safe_dlsym( g_hGLDLL, "glXChooseVisual" );
|
||||||
qglXCreateContext = safe_dlsym( g_hGLDLL, "glXCreateContext" );
|
qglXCreateContext = safe_dlsym( g_hGLDLL, "glXCreateContext" );
|
||||||
qglXDestroyContext = safe_dlsym( g_hGLDLL, "glXDestroyContext" );
|
qglXDestroyContext = safe_dlsym( g_hGLDLL, "glXDestroyContext" );
|
||||||
|
@ -1704,7 +1704,7 @@ int GL_ExtensionSupported( const char *extension ){
|
||||||
}
|
}
|
||||||
|
|
||||||
void* Sys_GLGetExtension( const char *symbol ){
|
void* Sys_GLGetExtension( const char *symbol ){
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
if ( qglXGetProcAddressARB == NULL ) {
|
if ( qglXGetProcAddressARB == NULL ) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <GL/glx.h>
|
#include <GL/glx.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -521,7 +521,7 @@ extern BOOL ( WINAPI * qwglSetDeviceGammaRampEXT )( const unsigned char *pRed, c
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
extern XVisualInfo* ( *qglXChooseVisual )( Display * dpy, int screen, int *attribList );
|
extern XVisualInfo* ( *qglXChooseVisual )( Display * dpy, int screen, int *attribList );
|
||||||
extern GLXContext ( *qglXCreateContext )( Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct );
|
extern GLXContext ( *qglXCreateContext )( Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct );
|
||||||
extern void ( *qglXDestroyContext )( Display *dpy, GLXContext ctx );
|
extern void ( *qglXDestroyContext )( Display *dpy, GLXContext ctx );
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
- Make sure the interface is not dependent on gtk.
|
- Make sure the interface is not dependent on gtk.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#endif
|
#endif
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#define SOCKET_ERROR -1
|
#define SOCKET_ERROR -1
|
||||||
#endif
|
#endif
|
||||||
|
@ -421,7 +421,7 @@ void CWatchBSP::RoutineProcessing(){
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
TIMEVAL tout = { 0, 0 };
|
TIMEVAL tout = { 0, 0 };
|
||||||
#endif
|
#endif
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
timeval tout;
|
timeval tout;
|
||||||
tout.tv_sec = 0;
|
tout.tv_sec = 0;
|
||||||
tout.tv_usec = 0;
|
tout.tv_usec = 0;
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1180,7 +1180,7 @@ void Sys_Sleep( int n ){
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
Sleep( n );
|
Sleep( n );
|
||||||
#endif
|
#endif
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
usleep( n * 1000 );
|
usleep( n * 1000 );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
/* marker */
|
/* marker */
|
||||||
#define PATH_INIT_C
|
#define PATH_INIT_C
|
||||||
|
|
||||||
#if defined( __linux__ ) || defined( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#define Q_UNIX
|
#define Q_UNIX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -415,7 +415,7 @@ void RunThreadsOn( int workcnt, qboolean showpacifier, void ( *func )( int ) ){
|
||||||
=======================================================================
|
=======================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined( __linux__ ) || defined( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#define USED
|
#define USED
|
||||||
|
|
||||||
// Setting default Threads to 1
|
// Setting default Threads to 1
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
// q2map.h
|
// q2map.h
|
||||||
|
|
||||||
/* platform-specific */
|
/* platform-specific */
|
||||||
#if defined( __linux__ ) || defined( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#define Q_UNIX
|
#define Q_UNIX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ void *SafeMalloc( size_t n, char *desc ){
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
void strlwr( char *conv_str ){
|
void strlwr( char *conv_str ){
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -1192,7 +1192,7 @@ void Sys_Sleep( int n ){
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
Sleep( n );
|
Sleep( n );
|
||||||
#endif
|
#endif
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
usleep( n * 1000 );
|
usleep( n * 1000 );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
/* marker */
|
/* marker */
|
||||||
#define PATH_INIT_C
|
#define PATH_INIT_C
|
||||||
|
|
||||||
#if defined( __linux__ ) || defined( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#define Q_UNIX
|
#define Q_UNIX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ static char gl_filename[1024];
|
||||||
static void ASE_Process( void );
|
static void ASE_Process( void );
|
||||||
static void ASE_FreeGeomObject( int ndx );
|
static void ASE_FreeGeomObject( int ndx );
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
|
|
||||||
static char* strlwr( char* string ){
|
static char* strlwr( char* string ){
|
||||||
char *cp;
|
char *cp;
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1081,7 +1081,7 @@ void Sys_Sleep( int n ){
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
Sleep( n );
|
Sleep( n );
|
||||||
#endif
|
#endif
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
usleep( n * 1000 );
|
usleep( n * 1000 );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
//#define NOISY 1
|
//#define NOISY 1
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#define strlwr strlower
|
#define strlwr strlower
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include "md3lib.h"
|
#include "md3lib.h"
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#define filelength Q_filelength
|
#define filelength Q_filelength
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
#define MAX_POLYSETS 64
|
#define MAX_POLYSETS 64
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#define _strcmpi Q_stricmp
|
#define _strcmpi Q_stricmp
|
||||||
#define filelength Q_filelength
|
#define filelength Q_filelength
|
||||||
#define strlwr strlower
|
#define strlwr strlower
|
||||||
|
|
|
@ -40,7 +40,7 @@ char *moddir = NULL;
|
||||||
// some old defined that was in cmdlib lost during merge
|
// some old defined that was in cmdlib lost during merge
|
||||||
char writedir[1024];
|
char writedir[1024];
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#define strlwr strlower
|
#define strlwr strlower
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ extern int unz_GAME_QL;
|
||||||
------------------------------------------------------------------------------- */
|
------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/* platform-specific */
|
/* platform-specific */
|
||||||
#if defined( __linux__ ) || defined( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#define Q_UNIX
|
#define Q_UNIX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
------------------------------------------------------------------------------- */
|
------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/* platform-specific */
|
/* platform-specific */
|
||||||
#if defined( __linux__ ) || defined( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
#define Q_UNIX
|
#define Q_UNIX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue