From 318eb70605627162c9aefbaf240697e800e08bd6 Mon Sep 17 00:00:00 2001 From: TimePath Date: Fri, 22 Jan 2016 22:23:05 +1100 Subject: [PATCH] Partial OSX support --- CMakeLists.txt | 2 ++ cmake/FindGtkGLExt.cmake | 2 ++ contrib/bobtoolz/DPatch.h | 2 +- contrib/bobtoolz/DShape.h | 2 +- contrib/bobtoolz/DTreePlanter.h | 1 + contrib/bobtoolz/dialogs/dialogs-gtk.cpp | 1 + contrib/bobtoolz/shapes.cpp | 10 ++++++---- contrib/bobtoolz/visfind.cpp | 3 ++- contrib/gtkgensurf/bitmap.cpp | 2 +- contrib/gtkgensurf/dec.cpp | 2 +- contrib/gtkgensurf/face.cpp | 2 +- contrib/gtkgensurf/font.cpp | 2 +- contrib/gtkgensurf/gendlgs.cpp | 2 +- contrib/gtkgensurf/genmap.cpp | 2 +- contrib/gtkgensurf/gensurf.cpp | 2 +- contrib/gtkgensurf/heretic.cpp | 2 +- contrib/gtkgensurf/view.cpp | 2 +- contrib/hydratoolz/plugin.h | 2 +- contrib/prtview/portals.cpp | 2 +- contrib/prtview/prtview.cpp | 2 +- contrib/sunplug/sunplug.cpp | 1 + contrib/ufoaiplug/ufoai_level.cpp | 1 + libs/cmdlib/cmdlib.cpp | 1 + libs/eclasslib.h | 2 +- libs/gtkutil/entry.h | 2 +- libs/imagelib.h | 2 +- libs/l_net/l_net_wins.c | 2 +- libs/profile/file.cpp | 2 +- libs/profile/profile.cpp | 2 +- libs/selectionlib.h | 2 +- libs/splines/math_angles.h | 2 +- libs/splines/math_vector.cpp | 2 +- libs/splines/q_shared.h | 7 +------ libs/splines/util_list.h | 2 +- libs/splines/util_str.cpp | 2 +- libs/stringio.h | 2 +- libs/uniquenames.h | 1 + plugins/entity/light.cpp | 2 +- plugins/image/dds.cpp | 2 +- plugins/image/jpeg.cpp | 2 +- plugins/image/pcx.cpp | 2 +- plugins/image/tga.cpp | 2 +- plugins/imagehl/hlw.cpp | 2 +- plugins/imagehl/mip.cpp | 2 +- plugins/imagehl/sprite.cpp | 2 +- plugins/imagepng/plugin.cpp | 2 +- plugins/md3model/mdlimage.cpp | 2 +- plugins/model/plugin.cpp | 2 +- plugins/shaders/shaders.cpp | 2 +- plugins/textool/StdAfx.h | 2 +- plugins/vfspk3/archive.cpp | 2 +- plugins/vfspk3/vfs.cpp | 2 +- radiant/CMakeLists.txt | 3 +++ radiant/dialog.cpp | 2 +- radiant/eclass_def.cpp | 2 +- radiant/environment.cpp | 2 +- radiant/qgl.cpp | 5 ++--- radiant/server.cpp | 10 +++++++--- radiant/texmanip.cpp | 2 +- radiant/url.cpp | 4 ++-- tools/quake2/common/cmdlib.h | 2 +- tools/quake2/extra/common/cmdlib.h | 2 +- tools/quake2/extra/qdata/qdata.h | 2 +- tools/quake2/extra/qe4/cmdlib.h | 2 +- tools/quake2/extra/qe4/qe3.h | 2 +- tools/quake2/q2map/q2map.h | 2 +- tools/quake2/qdata/qdata.h | 2 +- tools/quake2/qdata_heretic2/animcomp.c | 2 +- tools/quake2/qdata_heretic2/common/cmdlib.h | 2 +- tools/quake2/qdata_heretic2/qcommon/resourcemanager.h | 2 +- tools/quake2/qdata_heretic2/qcommon/skeletons.h | 2 +- tools/quake2/qdata_heretic2/qdata.h | 2 +- tools/quake2/qdata_heretic2/svdcmp.c | 2 +- 73 files changed, 91 insertions(+), 77 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aa31feb8..a39ab7ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,6 +68,8 @@ if(NOT WIN32) -DPOSIX=1 -DXWINDOWS=1 ) + find_package(X11 REQUIRED) + include_directories(${X11_INCLUDE_DIR}) else() add_definitions( -D_WIN32 diff --git a/cmake/FindGtkGLExt.cmake b/cmake/FindGtkGLExt.cmake index 59da179c..efbdb56a 100644 --- a/cmake/FindGtkGLExt.cmake +++ b/cmake/FindGtkGLExt.cmake @@ -4,6 +4,8 @@ if(PKG_CONFIG_FOUND) pkg_check_modules(GTK gtk+-2.0) if(WIN32) pkg_check_modules(GTKGL gtkglext-win32-1.0) + elseif(APPLE) + pkg_check_modules(GTKGL gtkglext-quartz-1.0) else() pkg_check_modules(GTKGL gtkglext-x11-1.0) endif() diff --git a/contrib/bobtoolz/DPatch.h b/contrib/bobtoolz/DPatch.h index 8808daeb..dea1b576 100644 --- a/contrib/bobtoolz/DPatch.h +++ b/contrib/bobtoolz/DPatch.h @@ -25,7 +25,7 @@ #define AFX_DPATCH_H__26C6B083_CE5B_420B_836B_1DDA733C04CE__INCLUDED_ #include -#include +#include typedef struct { diff --git a/contrib/bobtoolz/DShape.h b/contrib/bobtoolz/DShape.h index 1f6c91fc..16f6ba68 100644 --- a/contrib/bobtoolz/DShape.h +++ b/contrib/bobtoolz/DShape.h @@ -28,7 +28,7 @@ #pragma once #endif // _MSC_VER > 1000 -#include +#include #include "mathlib.h" #include "DMap.h" class DBrush; diff --git a/contrib/bobtoolz/DTreePlanter.h b/contrib/bobtoolz/DTreePlanter.h index 1d198ae6..9f8cbdd9 100644 --- a/contrib/bobtoolz/DTreePlanter.h +++ b/contrib/bobtoolz/DTreePlanter.h @@ -20,6 +20,7 @@ #ifndef __DTREE_H__ #define __DTREE_H__ +#include #include "qerplugin.h" #include "signal/isignal.h" #include "string/string.h" diff --git a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp index 4f84838d..c1169a9d 100644 --- a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp +++ b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp @@ -20,6 +20,7 @@ #include "dialogs-gtk.h" #include "../funchandlers.h" +#include #include "str.h" #include #include diff --git a/contrib/bobtoolz/shapes.cpp b/contrib/bobtoolz/shapes.cpp index f466c515..4ebe8c8a 100644 --- a/contrib/bobtoolz/shapes.cpp +++ b/contrib/bobtoolz/shapes.cpp @@ -45,6 +45,8 @@ #include "scenelib.h" #include "texturelib.h" +#include + //#include "dialogs-gtk.h" /************************ @@ -58,10 +60,10 @@ / | / | / | / | 4 ----- 6 | - | 2|_|___|8 - | / | / - | / | / ----> WEST, definitely - ||/ | / + | 2|_|___|8 + | / | / + | / | / ----> WEST, definitely + |/ | / 1|_____|/3 */ diff --git a/contrib/bobtoolz/visfind.cpp b/contrib/bobtoolz/visfind.cpp index 629c1633..56c3ea52 100644 --- a/contrib/bobtoolz/visfind.cpp +++ b/contrib/bobtoolz/visfind.cpp @@ -8,6 +8,7 @@ #include "bsploader.h" #include +#include typedef struct { int portalclusters; @@ -209,7 +210,7 @@ std::list *CreateTrace( dleaf_t *leaf, int c, vis_header *header, byt } } - delete repeatlist; + delete[] repeatlist; return pointlist; } diff --git a/contrib/gtkgensurf/bitmap.cpp b/contrib/gtkgensurf/bitmap.cpp index 2ca7e6b4..4647ec31 100644 --- a/contrib/gtkgensurf/bitmap.cpp +++ b/contrib/gtkgensurf/bitmap.cpp @@ -18,7 +18,7 @@ */ #include -#include +#include #include #include "gensurf.h" diff --git a/contrib/gtkgensurf/dec.cpp b/contrib/gtkgensurf/dec.cpp index 158a4302..ca671165 100644 --- a/contrib/gtkgensurf/dec.cpp +++ b/contrib/gtkgensurf/dec.cpp @@ -24,7 +24,7 @@ #define REAL double #endif /* not SINGLE */ -#include +#include #include #include #include "gensurf.h" diff --git a/contrib/gtkgensurf/face.cpp b/contrib/gtkgensurf/face.cpp index 77ce7dec..496afaf9 100644 --- a/contrib/gtkgensurf/face.cpp +++ b/contrib/gtkgensurf/face.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include #include #include "gensurf.h" diff --git a/contrib/gtkgensurf/font.cpp b/contrib/gtkgensurf/font.cpp index 35004bfd..17aebc80 100644 --- a/contrib/gtkgensurf/font.cpp +++ b/contrib/gtkgensurf/font.cpp @@ -26,7 +26,7 @@ // Leonardo Zide (leo@lokigames.com) // -#include +#include #include "gensurf.h" static const unsigned char data[2048] = { diff --git a/contrib/gtkgensurf/gendlgs.cpp b/contrib/gtkgensurf/gendlgs.cpp index bfaf9849..c5f4aebb 100644 --- a/contrib/gtkgensurf/gendlgs.cpp +++ b/contrib/gtkgensurf/gendlgs.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include "gensurf.h" diff --git a/contrib/gtkgensurf/genmap.cpp b/contrib/gtkgensurf/genmap.cpp index a31bfbcb..8339bc79 100644 --- a/contrib/gtkgensurf/genmap.cpp +++ b/contrib/gtkgensurf/genmap.cpp @@ -18,7 +18,7 @@ */ #include -#include +#include #include #include "gensurf.h" diff --git a/contrib/gtkgensurf/gensurf.cpp b/contrib/gtkgensurf/gensurf.cpp index b28416e2..4f05ec4a 100644 --- a/contrib/gtkgensurf/gensurf.cpp +++ b/contrib/gtkgensurf/gensurf.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include /* #include #include diff --git a/contrib/gtkgensurf/heretic.cpp b/contrib/gtkgensurf/heretic.cpp index e07a378b..469d8a72 100644 --- a/contrib/gtkgensurf/heretic.cpp +++ b/contrib/gtkgensurf/heretic.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include #include #include #include "gensurf.h" diff --git a/contrib/gtkgensurf/view.cpp b/contrib/gtkgensurf/view.cpp index ba0c43d5..cb6859e7 100644 --- a/contrib/gtkgensurf/view.cpp +++ b/contrib/gtkgensurf/view.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include "gensurf.h" #undef ISOMETRIC diff --git a/contrib/hydratoolz/plugin.h b/contrib/hydratoolz/plugin.h index 7e9e9771..7ea69b9c 100644 --- a/contrib/hydratoolz/plugin.h +++ b/contrib/hydratoolz/plugin.h @@ -37,7 +37,7 @@ #include #include -#include +#include #include "iplugin.h" diff --git a/contrib/prtview/portals.cpp b/contrib/prtview/portals.cpp index b85945bc..f23e8677 100644 --- a/contrib/prtview/portals.cpp +++ b/contrib/prtview/portals.cpp @@ -19,7 +19,7 @@ #include "portals.h" #include -#include +#include #ifndef __APPLE__ #include #endif diff --git a/contrib/prtview/prtview.cpp b/contrib/prtview/prtview.cpp index 24070336..fe9abdc1 100644 --- a/contrib/prtview/prtview.cpp +++ b/contrib/prtview/prtview.cpp @@ -20,7 +20,7 @@ #include "prtview.h" #include -#include +#include #include "profile/profile.h" diff --git a/contrib/sunplug/sunplug.cpp b/contrib/sunplug/sunplug.cpp index 50fb2cd8..482a2227 100644 --- a/contrib/sunplug/sunplug.cpp +++ b/contrib/sunplug/sunplug.cpp @@ -19,6 +19,7 @@ */ #include "sunplug.h" +#include #include "debugging/debugging.h" diff --git a/contrib/ufoaiplug/ufoai_level.cpp b/contrib/ufoaiplug/ufoai_level.cpp index c7554e4d..ebf21e04 100644 --- a/contrib/ufoaiplug/ufoai_level.cpp +++ b/contrib/ufoaiplug/ufoai_level.cpp @@ -25,6 +25,7 @@ #include "string/string.h" #include +#include class Level; diff --git a/libs/cmdlib/cmdlib.cpp b/libs/cmdlib/cmdlib.cpp index 2a9ab55a..6a40ed9d 100644 --- a/libs/cmdlib/cmdlib.cpp +++ b/libs/cmdlib/cmdlib.cpp @@ -35,6 +35,7 @@ #if defined ( POSIX ) +#include #include #include #include diff --git a/libs/eclasslib.h b/libs/eclasslib.h index ac0718b3..b4ef6cb7 100644 --- a/libs/eclasslib.h +++ b/libs/eclasslib.h @@ -23,7 +23,7 @@ #define INCLUDED_ECLASSLIB_H #include -#include +#include #include #include #include diff --git a/libs/gtkutil/entry.h b/libs/gtkutil/entry.h index 814be152..972514d0 100644 --- a/libs/gtkutil/entry.h +++ b/libs/gtkutil/entry.h @@ -23,7 +23,7 @@ #define INCLUDED_GTKUTIL_ENTRY_H #include -#include +#include #include inline void entry_set_string( GtkEntry* entry, const char* string ){ diff --git a/libs/imagelib.h b/libs/imagelib.h index c3e9c1c9..05fe835c 100644 --- a/libs/imagelib.h +++ b/libs/imagelib.h @@ -25,7 +25,7 @@ #include "iimage.h" #include "iarchive.h" #include "idatastream.h" -#include +#include struct RGBAPixel { diff --git a/libs/l_net/l_net_wins.c b/libs/l_net/l_net_wins.c index 30ef9ac0..c47ff265 100644 --- a/libs/l_net/l_net_wins.c +++ b/libs/l_net/l_net_wins.c @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include "l_net.h" #include "l_net_wins.h" diff --git a/libs/profile/file.cpp b/libs/profile/file.cpp index 4ad46ea2..efc62f92 100644 --- a/libs/profile/file.cpp +++ b/libs/profile/file.cpp @@ -38,7 +38,7 @@ #include "file.h" #include -#include +#include #include #include diff --git a/libs/profile/profile.cpp b/libs/profile/profile.cpp index c1505e07..60132a06 100644 --- a/libs/profile/profile.cpp +++ b/libs/profile/profile.cpp @@ -42,7 +42,7 @@ #include "file.h" -#include +#include #include "str.h" diff --git a/libs/selectionlib.h b/libs/selectionlib.h index cb0e43e5..b4d3a7e1 100644 --- a/libs/selectionlib.h +++ b/libs/selectionlib.h @@ -25,7 +25,7 @@ #include "iselection.h" #include "generic/callback.h" #include "scenelib.h" -#include +#include class SelectableBool : public Selectable { diff --git a/libs/splines/math_angles.h b/libs/splines/math_angles.h index f356b569..675b117b 100644 --- a/libs/splines/math_angles.h +++ b/libs/splines/math_angles.h @@ -22,7 +22,7 @@ #ifndef __MATH_ANGLES_H__ #define __MATH_ANGLES_H__ -#include +#include #include #include "math_vector.h" diff --git a/libs/splines/math_vector.cpp b/libs/splines/math_vector.cpp index 572f903e..673ada07 100644 --- a/libs/splines/math_vector.cpp +++ b/libs/splines/math_vector.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include diff --git a/libs/splines/q_shared.h b/libs/splines/q_shared.h index 6cad80bc..80e11b22 100644 --- a/libs/splines/q_shared.h +++ b/libs/splines/q_shared.h @@ -62,7 +62,7 @@ #include #include #include -#include +#include #include #include #ifdef WIN32 // mac doesn't have malloc.h @@ -228,11 +228,6 @@ typedef enum { #define MAX_QINT 0x7fffffff #define MIN_QINT ( -MAX_QINT - 1 ) -#ifndef max -#define max( x, y ) ( ( ( x ) > ( y ) ) ? ( x ) : ( y ) ) -#define min( x, y ) ( ( ( x ) < ( y ) ) ? ( x ) : ( y ) ) -#endif - #ifndef sign #define sign( f ) ( ( f > 0 ) ? 1 : ( ( f < 0 ) ? -1 : 0 ) ) #endif diff --git a/libs/splines/util_list.h b/libs/splines/util_list.h index dfa92fb1..a8e3b8eb 100644 --- a/libs/splines/util_list.h +++ b/libs/splines/util_list.h @@ -22,7 +22,7 @@ #ifndef __UTIL_LIST_H__ #define __UTIL_LIST_H__ -#include +#include #include template< class type > diff --git a/libs/splines/util_str.cpp b/libs/splines/util_str.cpp index 62fdaedc..ee51846d 100644 --- a/libs/splines/util_str.cpp +++ b/libs/splines/util_str.cpp @@ -22,7 +22,7 @@ //need to rewrite this #include "util_str.h" -#include +#include #include #include #include diff --git a/libs/stringio.h b/libs/stringio.h index 174f15fa..85d598f3 100644 --- a/libs/stringio.h +++ b/libs/stringio.h @@ -22,7 +22,7 @@ #if !defined ( INCLUDED_STRINGIO_H ) #define INCLUDED_STRINGIO_H -#include +#include #include #include "generic/vector.h" diff --git a/libs/uniquenames.h b/libs/uniquenames.h index 8871a439..cea3c04f 100644 --- a/libs/uniquenames.h +++ b/libs/uniquenames.h @@ -22,6 +22,7 @@ #if !defined( INCLUDED_UNIQUENAMES_H ) #define INCLUDED_UNIQUENAMES_H +#include #include "debugging/debugging.h" #include #include "string/string.h" diff --git a/plugins/entity/light.cpp b/plugins/entity/light.cpp index 10912182..99b2efcd 100644 --- a/plugins/entity/light.cpp +++ b/plugins/entity/light.cpp @@ -36,7 +36,7 @@ #include "light.h" -#include +#include #include "cullable.h" #include "renderable.h" diff --git a/plugins/image/dds.cpp b/plugins/image/dds.cpp index 0da0d3a2..2a6f0666 100644 --- a/plugins/image/dds.cpp +++ b/plugins/image/dds.cpp @@ -21,7 +21,7 @@ #include "dds.h" -#include +#include #include "ifilesystem.h" #include "iarchive.h" diff --git a/plugins/image/jpeg.cpp b/plugins/image/jpeg.cpp index 31685fd8..df93ea0a 100644 --- a/plugins/image/jpeg.cpp +++ b/plugins/image/jpeg.cpp @@ -37,7 +37,7 @@ #include "jpeg.h" #include -#include +#include #include #include diff --git a/plugins/image/pcx.cpp b/plugins/image/pcx.cpp index 46bffc05..ece7d49d 100644 --- a/plugins/image/pcx.cpp +++ b/plugins/image/pcx.cpp @@ -25,7 +25,7 @@ typedef unsigned char byte; -#include +#include #include "imagelib.h" #include "bytestreamutils.h" diff --git a/plugins/image/tga.cpp b/plugins/image/tga.cpp index bc498a8f..6111c6dc 100644 --- a/plugins/image/tga.cpp +++ b/plugins/image/tga.cpp @@ -27,7 +27,7 @@ typedef unsigned char byte; -#include +#include #include "generic/bitfield.h" #include "imagelib.h" diff --git a/plugins/imagehl/hlw.cpp b/plugins/imagehl/hlw.cpp index e82b833b..cab753ab 100644 --- a/plugins/imagehl/hlw.cpp +++ b/plugins/imagehl/hlw.cpp @@ -29,7 +29,7 @@ #include "hlw.h" -#include +#include #include #include diff --git a/plugins/imagehl/mip.cpp b/plugins/imagehl/mip.cpp index 2e4f979b..171ab3e4 100644 --- a/plugins/imagehl/mip.cpp +++ b/plugins/imagehl/mip.cpp @@ -21,7 +21,7 @@ #include "mip.h" -#include +#include #include #include diff --git a/plugins/imagehl/sprite.cpp b/plugins/imagehl/sprite.cpp index 0fdec869..67cdf208 100644 --- a/plugins/imagehl/sprite.cpp +++ b/plugins/imagehl/sprite.cpp @@ -23,7 +23,7 @@ #include "sprite.h" -#include +#include #include #include diff --git a/plugins/imagepng/plugin.cpp b/plugins/imagepng/plugin.cpp index bf087416..80233844 100644 --- a/plugins/imagepng/plugin.cpp +++ b/plugins/imagepng/plugin.cpp @@ -31,7 +31,7 @@ // ====== PNG loader functionality ====== #include "png.h" -#include +#include void user_warning_fn( png_structp png_ptr, png_const_charp warning_msg ){ globalErrorStream() << "libpng warning: " << warning_msg << "\n"; diff --git a/plugins/md3model/mdlimage.cpp b/plugins/md3model/mdlimage.cpp index 3ab4e9e0..e66cb0d2 100644 --- a/plugins/md3model/mdlimage.cpp +++ b/plugins/md3model/mdlimage.cpp @@ -22,7 +22,7 @@ #include "mdlimage.h" #include -#include +#include #include "ifilesystem.h" #include "bytestreamutils.h" diff --git a/plugins/model/plugin.cpp b/plugins/model/plugin.cpp index 88a234a9..122cfa62 100644 --- a/plugins/model/plugin.cpp +++ b/plugins/model/plugin.cpp @@ -24,7 +24,7 @@ #include #include "picomodel.h" typedef unsigned char byte; -#include +#include #include #include diff --git a/plugins/shaders/shaders.cpp b/plugins/shaders/shaders.cpp index 870854f3..5532e224 100644 --- a/plugins/shaders/shaders.cpp +++ b/plugins/shaders/shaders.cpp @@ -37,7 +37,7 @@ #include "shaders.h" #include -#include +#include #include #include diff --git a/plugins/textool/StdAfx.h b/plugins/textool/StdAfx.h index a31c0a6d..12d58782 100644 --- a/plugins/textool/StdAfx.h +++ b/plugins/textool/StdAfx.h @@ -26,7 +26,7 @@ #include #include #include -#include +#include #if !defined( WIN32 ) diff --git a/plugins/vfspk3/archive.cpp b/plugins/vfspk3/archive.cpp index ea0119f6..7b52e123 100644 --- a/plugins/vfspk3/archive.cpp +++ b/plugins/vfspk3/archive.cpp @@ -25,7 +25,7 @@ #include "iarchive.h" #include -#include +#include #include #include "stream/filestream.h" diff --git a/plugins/vfspk3/vfs.cpp b/plugins/vfspk3/vfs.cpp index 7e98a415..b952f8ff 100644 --- a/plugins/vfspk3/vfs.cpp +++ b/plugins/vfspk3/vfs.cpp @@ -44,7 +44,7 @@ #include "vfs.h" #include -#include +#include #include #include "qerplugin.h" diff --git a/radiant/CMakeLists.txt b/radiant/CMakeLists.txt index d68bab1e..fc68fc99 100644 --- a/radiant/CMakeLists.txt +++ b/radiant/CMakeLists.txt @@ -210,3 +210,6 @@ target_link_libraries(radiant string xmllib ) +if(NOT WIN32) + target_link_libraries(radiant ${X11_LIBRARIES}) +endif() diff --git a/radiant/dialog.cpp b/radiant/dialog.cpp index 087d0439..58a6f4e1 100644 --- a/radiant/dialog.cpp +++ b/radiant/dialog.cpp @@ -33,7 +33,7 @@ #include "mainframe.h" -#include +#include #include #include diff --git a/radiant/eclass_def.cpp b/radiant/eclass_def.cpp index f4374342..15500123 100644 --- a/radiant/eclass_def.cpp +++ b/radiant/eclass_def.cpp @@ -66,7 +66,7 @@ StaticRegisterModule staticRegisterEclassDef( StaticEclassDefModule::instance() #include "string/string.h" -#include +#include char com_token[1024]; diff --git a/radiant/environment.cpp b/radiant/environment.cpp index a15b66ee..d6703e81 100644 --- a/radiant/environment.cpp +++ b/radiant/environment.cpp @@ -181,7 +181,7 @@ bool portable_app_setup(){ #if defined( POSIX ) -#include +#include #include #include diff --git a/radiant/qgl.cpp b/radiant/qgl.cpp index 2e44768c..645af34d 100644 --- a/radiant/qgl.cpp +++ b/radiant/qgl.cpp @@ -25,7 +25,7 @@ #include "debugging/debugging.h" #include -#include +#include #include #if defined( _WIN32 ) @@ -55,7 +55,6 @@ PROC ( WINAPI * qwglGetProcAddress )( LPCSTR ); #include #include -#include Bool ( *qglXQueryExtension )( Display *dpy, int *errorb, int *event ); void* ( *qglXGetProcAddressARB )( const GLubyte * procName ); @@ -537,7 +536,7 @@ int QGL_Init( OpenGLBinding& table ){ qwglGetProcAddress = wglGetProcAddress; #elif defined( XWINDOWS ) qglXGetProcAddressARB = (glXGetProcAddressARBProc)dlsym( RTLD_DEFAULT, "glXGetProcAddressARB" ); - if ( ( qglXQueryExtension == 0 ) || ( qglXQueryExtension( GDK_DISPLAY(),0,0 ) != True ) ) { + if ( ( qglXQueryExtension == 0 ) || ( qglXQueryExtension(XOpenDisplay(nullptr), 0, 0) != True ) ) { return 0; } #else diff --git a/radiant/server.cpp b/radiant/server.cpp index 00221d7d..714521c7 100644 --- a/radiant/server.cpp +++ b/radiant/server.cpp @@ -22,10 +22,9 @@ #include "server.h" #include "debugging/debugging.h" -#include "warnings.h" -#include #include +#include #include "os/path.h" #include "modulesystem.h" @@ -151,7 +150,12 @@ public: typedef int ( *FunctionPointer )(); DynamicLibrary( const char* filename ){ - m_library = dlopen( filename, RTLD_NOW|RTLD_LOCAL|RTLD_DEEPBIND ); + m_library = dlopen(filename, RTLD_LOCAL + | RTLD_NOW + #ifndef __APPLE__ + | RTLD_DEEPBIND + #endif + ); if ( !m_library ) { globalErrorStream() << "LoadLibrary failed: '" << filename << "'\n"; diff --git a/radiant/texmanip.cpp b/radiant/texmanip.cpp index 03196c3c..c827d93c 100644 --- a/radiant/texmanip.cpp +++ b/radiant/texmanip.cpp @@ -31,7 +31,7 @@ #include "texmanip.h" -#include +#include #include "stream/textstream.h" static byte *row1 = NULL, *row2 = NULL; diff --git a/radiant/url.cpp b/radiant/url.cpp index e5abc077..e5ed0bc5 100644 --- a/radiant/url.cpp +++ b/radiant/url.cpp @@ -33,7 +33,7 @@ bool open_url( const char* url ){ #endif #if defined( __linux__ ) || defined( __FreeBSD__ ) -#include +#include bool open_url( const char* url ){ // \todo FIXME: the way we open URLs on *nix should be improved. A script is good (see how I do on RTCW) char command[2 * PATH_MAX]; @@ -44,7 +44,7 @@ bool open_url( const char* url ){ #endif #ifdef __APPLE__ -#include +#include bool open_url( const char* url ){ char command[2 * PATH_MAX]; snprintf( command, sizeof( command ), "open \"%s\" &", url ); diff --git a/tools/quake2/common/cmdlib.h b/tools/quake2/common/cmdlib.h index 2955d53f..b40af440 100644 --- a/tools/quake2/common/cmdlib.h +++ b/tools/quake2/common/cmdlib.h @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include #include diff --git a/tools/quake2/extra/common/cmdlib.h b/tools/quake2/extra/common/cmdlib.h index 0045a09d..9296f57b 100644 --- a/tools/quake2/extra/common/cmdlib.h +++ b/tools/quake2/extra/common/cmdlib.h @@ -36,7 +36,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include -#include +#include #include #include #include diff --git a/tools/quake2/extra/qdata/qdata.h b/tools/quake2/extra/qdata/qdata.h index bd8e63c3..b6daa2c6 100644 --- a/tools/quake2/extra/qdata/qdata.h +++ b/tools/quake2/extra/qdata/qdata.h @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // qdata.h -#include +#include #include #include #include diff --git a/tools/quake2/extra/qe4/cmdlib.h b/tools/quake2/extra/qe4/cmdlib.h index b748950c..1f166b79 100644 --- a/tools/quake2/extra/qe4/cmdlib.h +++ b/tools/quake2/extra/qe4/cmdlib.h @@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include -#include +#include #include #include #include diff --git a/tools/quake2/extra/qe4/qe3.h b/tools/quake2/extra/qe4/qe3.h index 67930599..2e0b22aa 100644 --- a/tools/quake2/extra/qe4/qe3.h +++ b/tools/quake2/extra/qe4/qe3.h @@ -35,7 +35,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include "glingr.h" #include -#include +#include #include "cmdlib.h" #include "mathlib.h" diff --git a/tools/quake2/q2map/q2map.h b/tools/quake2/q2map/q2map.h index 401e6f74..3e9b092e 100644 --- a/tools/quake2/q2map/q2map.h +++ b/tools/quake2/q2map/q2map.h @@ -35,7 +35,7 @@ #include #endif -#include +#include #include "cmdlib.h" #include "mathlib.h" diff --git a/tools/quake2/qdata/qdata.h b/tools/quake2/qdata/qdata.h index cb00003a..491f9596 100644 --- a/tools/quake2/qdata/qdata.h +++ b/tools/quake2/qdata/qdata.h @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include +#include #include #include #include diff --git a/tools/quake2/qdata_heretic2/animcomp.c b/tools/quake2/qdata_heretic2/animcomp.c index fbcd21dd..8da50ecf 100644 --- a/tools/quake2/qdata_heretic2/animcomp.c +++ b/tools/quake2/qdata_heretic2/animcomp.c @@ -20,7 +20,7 @@ */ -#include +#include #include #include #include diff --git a/tools/quake2/qdata_heretic2/common/cmdlib.h b/tools/quake2/qdata_heretic2/common/cmdlib.h index c94ce377..4af3f591 100644 --- a/tools/quake2/qdata_heretic2/common/cmdlib.h +++ b/tools/quake2/qdata_heretic2/common/cmdlib.h @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include #include diff --git a/tools/quake2/qdata_heretic2/qcommon/resourcemanager.h b/tools/quake2/qdata_heretic2/qcommon/resourcemanager.h index 579931ae..b3ffb685 100644 --- a/tools/quake2/qdata_heretic2/qcommon/resourcemanager.h +++ b/tools/quake2/qdata_heretic2/qcommon/resourcemanager.h @@ -24,7 +24,7 @@ // #include "h2common.h" -#include // needed here for size_t +#include // needed here for size_t typedef struct ResourceManager_s { diff --git a/tools/quake2/qdata_heretic2/qcommon/skeletons.h b/tools/quake2/qdata_heretic2/qcommon/skeletons.h index aba4a0c8..629521c0 100644 --- a/tools/quake2/qdata_heretic2/qcommon/skeletons.h +++ b/tools/quake2/qdata_heretic2/qcommon/skeletons.h @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include // for size_t +#include // for size_t #include "arrayedlist.h" #define JN_YAW_CHANGED 0x00000001 diff --git a/tools/quake2/qdata_heretic2/qdata.h b/tools/quake2/qdata_heretic2/qdata.h index 2ead9751..8f5d2138 100644 --- a/tools/quake2/qdata_heretic2/qdata.h +++ b/tools/quake2/qdata_heretic2/qdata.h @@ -22,7 +22,7 @@ // qdata.h -#include +#include #include #include #include diff --git a/tools/quake2/qdata_heretic2/svdcmp.c b/tools/quake2/qdata_heretic2/svdcmp.c index 63811395..87d87c72 100644 --- a/tools/quake2/qdata_heretic2/svdcmp.c +++ b/tools/quake2/qdata_heretic2/svdcmp.c @@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include +#include #include #include #include -- 2.39.2