]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Partial OSX support Melanosuchus/cmake 10/head
authorTimePath <andrew.hardaker1995@gmail.com>
Fri, 22 Jan 2016 11:23:05 +0000 (22:23 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Fri, 22 Jan 2016 11:23:05 +0000 (22:23 +1100)
73 files changed:
CMakeLists.txt
cmake/FindGtkGLExt.cmake
contrib/bobtoolz/DPatch.h
contrib/bobtoolz/DShape.h
contrib/bobtoolz/DTreePlanter.h
contrib/bobtoolz/dialogs/dialogs-gtk.cpp
contrib/bobtoolz/shapes.cpp
contrib/bobtoolz/visfind.cpp
contrib/gtkgensurf/bitmap.cpp
contrib/gtkgensurf/dec.cpp
contrib/gtkgensurf/face.cpp
contrib/gtkgensurf/font.cpp
contrib/gtkgensurf/gendlgs.cpp
contrib/gtkgensurf/genmap.cpp
contrib/gtkgensurf/gensurf.cpp
contrib/gtkgensurf/heretic.cpp
contrib/gtkgensurf/view.cpp
contrib/hydratoolz/plugin.h
contrib/prtview/portals.cpp
contrib/prtview/prtview.cpp
contrib/sunplug/sunplug.cpp
contrib/ufoaiplug/ufoai_level.cpp
libs/cmdlib/cmdlib.cpp
libs/eclasslib.h
libs/gtkutil/entry.h
libs/imagelib.h
libs/l_net/l_net_wins.c
libs/profile/file.cpp
libs/profile/profile.cpp
libs/selectionlib.h
libs/splines/math_angles.h
libs/splines/math_vector.cpp
libs/splines/q_shared.h
libs/splines/util_list.h
libs/splines/util_str.cpp
libs/stringio.h
libs/uniquenames.h
plugins/entity/light.cpp
plugins/image/dds.cpp
plugins/image/jpeg.cpp
plugins/image/pcx.cpp
plugins/image/tga.cpp
plugins/imagehl/hlw.cpp
plugins/imagehl/mip.cpp
plugins/imagehl/sprite.cpp
plugins/imagepng/plugin.cpp
plugins/md3model/mdlimage.cpp
plugins/model/plugin.cpp
plugins/shaders/shaders.cpp
plugins/textool/StdAfx.h
plugins/vfspk3/archive.cpp
plugins/vfspk3/vfs.cpp
radiant/CMakeLists.txt
radiant/dialog.cpp
radiant/eclass_def.cpp
radiant/environment.cpp
radiant/qgl.cpp
radiant/server.cpp
radiant/texmanip.cpp
radiant/url.cpp
tools/quake2/common/cmdlib.h
tools/quake2/extra/common/cmdlib.h
tools/quake2/extra/qdata/qdata.h
tools/quake2/extra/qe4/cmdlib.h
tools/quake2/extra/qe4/qe3.h
tools/quake2/q2map/q2map.h
tools/quake2/qdata/qdata.h
tools/quake2/qdata_heretic2/animcomp.c
tools/quake2/qdata_heretic2/common/cmdlib.h
tools/quake2/qdata_heretic2/qcommon/resourcemanager.h
tools/quake2/qdata_heretic2/qcommon/skeletons.h
tools/quake2/qdata_heretic2/qdata.h
tools/quake2/qdata_heretic2/svdcmp.c

index aa31feb8b14514e8ac6f3410f85024f65ea48e5f..a39ab7ab8d89c01cbfdd9ddda6de8cc2a05be0bb 100644 (file)
@@ -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
index 59da179c093de4489a1f35b79cce5e698df124c6..efbdb56a0e7cd8f0d1be6774de0234127e78654d 100644 (file)
@@ -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()
index 8808daeb695768a30cd8e6decfc6b1447f1908fa..dea1b5768c33c1a42f7e848143e1e0c3588f4c76 100644 (file)
@@ -25,7 +25,7 @@
 #define AFX_DPATCH_H__26C6B083_CE5B_420B_836B_1DDA733C04CE__INCLUDED_
 
 #include <list>
-#include <stdlib.h>
+#include <cstdlib>
 
 typedef struct
 {
index 1f6c91fcaece093f3afb36c4e2c4aacb3126988a..16f6ba681875dce5bd26cc498b938475c0c3e31b 100644 (file)
@@ -28,7 +28,7 @@
 #pragma once
 #endif // _MSC_VER > 1000
 
-#include <stdlib.h>
+#include <cstdlib>
 #include "mathlib.h"
 #include "DMap.h"
 class DBrush;
index 1d198ae63dddfed5b3f27278a01609c70ba526eb..9f8cbdd9d8021d61cdd4b45e38a46f29778ad7d2 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef __DTREE_H__
 #define __DTREE_H__
 
+#include <cstdlib>
 #include "qerplugin.h"
 #include "signal/isignal.h"
 #include "string/string.h"
index 4f84838d9a9db592016d82894aebfae9f9c31b87..c1169a9d166cd7f6ab566b5f51d074c05078e7bb 100644 (file)
@@ -20,6 +20,7 @@
 #include "dialogs-gtk.h"
 #include "../funchandlers.h"
 
+#include <cstdlib>
 #include "str.h"
 #include <list>
 #include <gtk/gtk.h>
index f466c5153558315b3a223d3419558b87982ee6f7..4ebe8c8a2f2737bc4145d5dddb51f907a097b223 100644 (file)
@@ -45,6 +45,8 @@
 #include "scenelib.h"
 #include "texturelib.h"
 
+#include <cstdlib>
+
 //#include "dialogs-gtk.h"
 
 /************************
        / |   / |
       /  |  /  |
     4 ----- 6  |
- |  2|_|___|8
- |  /  |   /
- | /   |  /       ----> WEST, definitely
||/    | /
    |  2|_|___|8
    |  /  |   /
    | /   |  /       ----> WEST, definitely
    |/    | /
     1|_____|/3
 
  */
index 629c163336688a4b1ca5808e84a0f7eef5617801..56c3ea522c1b62c9af703f7eee3db52f89b2956e 100644 (file)
@@ -8,6 +8,7 @@
 #include "bsploader.h"
 
 #include <list>
+#include <cstdlib>
 
 typedef struct {
        int portalclusters;
@@ -209,7 +210,7 @@ std::list<DWinding*> *CreateTrace( dleaf_t *leaf, int c, vis_header *header, byt
                }
        }
 
-       delete repeatlist;
+       delete[] repeatlist;
 
        return pointlist;
 }
index 2ca7e6b4b6f02d6b33193a037a2fff30eb3b267c..4647ec311cc2b2ea9e5f3838f79fa410de45fb27 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #include <stdio.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <math.h>
 #include "gensurf.h"
 
index 158a43020231cf432ad8c678aa3a06b08973eb18..ca671165853f68106bf5ba6e4dc867be1ceb2926 100644 (file)
@@ -24,7 +24,7 @@
 #define REAL double
 #endif /* not SINGLE */
 
-#include <stdlib.h>
+#include <cstdlib>
 #include <stdio.h>
 #include <math.h>
 #include "gensurf.h"
index 77ce7decfdb6ade0d18c132b265a1730990f1b81..496afaf950edfb8ac52ff3a8a742f3d3855f6b26 100644 (file)
@@ -17,7 +17,7 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <stdlib.h>
+#include <cstdlib>
 #include <math.h>
 #include "gensurf.h"
 
index 35004bfdcec88804af42509a54721982133a621b..17aebc8027b6d299262c8c72450b2cde59984566 100644 (file)
@@ -26,7 +26,7 @@
 // Leonardo Zide (leo@lokigames.com)
 //
 
-#include <stdlib.h>
+#include <cstdlib>
 #include "gensurf.h"
 
 static const unsigned char data[2048] = {
index bfaf98490eb3f7fe3649502775c07f4d52775bb3..c5f4aebbd2063307d40f848ebbdac36e39ad978d 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <gtk/gtk.h>
 #include <stdio.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <string.h>
 #include <math.h>
 #include "gensurf.h"
index a31bfbcb207558e99f101dbae0e46311ebd24787..8339bc79c0b432b3675f9febab63d5fcc28c5011 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #include <math.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <stdio.h>
 #include "gensurf.h"
 
index b28416e29bb485fceda4f2177c90dfc1dd2370b7..4f05ec4afd64cea5718e525f6dd8acf3dddc510e 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <gtk/gtk.h>
 #include <stdio.h>
-#include <stdlib.h>
+#include <cstdlib>
 /*
    #include <string.h>
    #include <tchar.h>
index e07a378b6270a141876e65f954e4719fa8e7dd25..469d8a726c5b457dec495228533933d35b798057 100644 (file)
@@ -17,7 +17,7 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <stdlib.h>
+#include <cstdlib>
 #include <math.h>
 #include <stdio.h>
 #include "gensurf.h"
index ba0c43d5251c1ce7bf32a310582afc4b39e5d608..cb6859e7971b49d2d085c1b2a135dc21721151c7 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <math.h>
 #include <stdio.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include "gensurf.h"
 
 #undef ISOMETRIC
index 7e9e97712d59a78ce507185e71a3aa66dcb93858..7ea69b9c27ed3405d689fc247929af002e63b48f 100644 (file)
@@ -37,7 +37,7 @@
 
 #include <gtk/gtk.h>
 #include <stdio.h>
-#include <stdlib.h>
+#include <cstdlib>
 
 #include "iplugin.h"
 
index b85945bc34892ea47915eb21508272f7076f3974..f23e8677b582742fbbdc2c9165cf9f28e32063b9 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "portals.h"
 #include <string.h>
-#include <stdlib.h>
+#include <cstdlib>
 #ifndef __APPLE__
 #include <search.h>
 #endif
index 24070336cdb1c28a3d76a2a1a8fb7d2096d0abb0..fe9abdc13707cfe3c726e4a55b0185ce9e1415b1 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "prtview.h"
 #include <stdio.h>
-#include <stdlib.h>
+#include <cstdlib>
 
 #include "profile/profile.h"
 
index 50fb2cd8ee681f8abd93d02f2b3596c13251d966..482a222734486965aaedb1fae390ca7bf7b45fa3 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include "sunplug.h"
+#include <cstdlib>
 
 #include "debugging/debugging.h"
 
index c7554e4d2c4771858e3b438cd16cd1afa468ca03..ebf21e04dfd42a3ce316129736ec420105b18130 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "string/string.h"
 #include <list>
+#include <cstdlib>
 
 class Level;
 
index 2a9ab55a35182430f3a94c202fb2d7d700ceaa7f..6a40ed9da4b2fc82160e742ceacd9f81474f78c7 100644 (file)
@@ -35,6 +35,7 @@
 
 #if defined ( POSIX )
 
+#include <cstdlib>
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/wait.h>
index ac0718b32b4b62238ca4ce852bfe410ed4c84f05..b4ef6cb7681dcd2bf8af464b945bad43e76f28ec 100644 (file)
@@ -23,7 +23,7 @@
 #define INCLUDED_ECLASSLIB_H
 
 #include <stdio.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <list>
 #include <map>
 #include <vector>
index 814be152bfd901791839b3224ce51acd91223b53..972514d0db92fb5d2f2430618a5c26db86b51c40 100644 (file)
@@ -23,7 +23,7 @@
 #define INCLUDED_GTKUTIL_ENTRY_H
 
 #include <stdio.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <gtk/gtkentry.h>
 
 inline void entry_set_string( GtkEntry* entry, const char* string ){
index c3e9c1c93aa0995463357a239f91a57a538ed4ea..05fe835c30ee1223fb902e603b62b996f7eeca7e 100644 (file)
@@ -25,7 +25,7 @@
 #include "iimage.h"
 #include "iarchive.h"
 #include "idatastream.h"
-#include <stdlib.h>
+#include <cstdlib>
 
 struct RGBAPixel
 {
index 30ef9ac035d23cc39deb7cd5b8a547a8feafe3a0..c47ff26590378de083882d8b5890d544e10fd62b 100644 (file)
@@ -31,7 +31,7 @@
 
 #include <windows.h>
 #include <stdio.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <string.h>
 #include "l_net.h"
 #include "l_net_wins.h"
index 4ad46ea241e58a5ab4fff1c10ec0ce47e2400de5..efc62f927db9754d9171bcd2d3a122724f1f7a87 100644 (file)
@@ -38,7 +38,7 @@
 #include "file.h"
 
 #include <memory.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <string.h>
 #include <stdarg.h>
 
index c1505e073b15ac1c2b68fbf58a5fd92568dbe11e..60132a06fcfc6fe831d4e473c504dbb572386037 100644 (file)
@@ -42,7 +42,7 @@
 
 #include "file.h"
 
-#include <stdlib.h>
+#include <cstdlib>
 
 #include "str.h"
 
index cb0e43e5171cd1135b91840d0195ad1aba420a71..b4d3a7e16e8cd588f6c934db3614a3b107067c13 100644 (file)
@@ -25,7 +25,7 @@
 #include "iselection.h"
 #include "generic/callback.h"
 #include "scenelib.h"
-#include <stdlib.h>
+#include <cstdlib>
 
 class SelectableBool : public Selectable
 {
index f356b56943555d5586116163e983d4ad3b4cb2ff..675b117bb89f17ba171d9e17f23f03f4101bc146 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef __MATH_ANGLES_H__
 #define __MATH_ANGLES_H__
 
-#include <stdlib.h>
+#include <cstdlib>
 #include <assert.h>
 
 #include "math_vector.h"
index 572f903e0611fc732dc3ff9b5300261ad11c9789..673ada07d7c5d6b05e7ea3851b3eb2bf6279a9c8 100644 (file)
@@ -25,7 +25,7 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <time.h>
 #include <ctype.h>
 
index 6cad80bc97eec9ac4f5e2b8cbaa6e7a1e57874d9..80e11b22d5718778d59d580a1a0d04938c57d4f1 100644 (file)
@@ -62,7 +62,7 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <time.h>
 #include <ctype.h>
 #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
index dfa92fb12aed23b071174a839b6e2a2c9b70ee2d..a8e3b8eb153690f749d65e05c8f1582f459173a4 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef __UTIL_LIST_H__
 #define __UTIL_LIST_H__
 
-#include <stdlib.h>
+#include <cstdlib>
 #include <assert.h>
 
 template< class type >
index 62fdaedc50f6f5905beb1b22977841568ab7d0bb..ee51846d5c69ca35a15a6e9a4acfc1ad23709746 100644 (file)
@@ -22,7 +22,7 @@
 //need to rewrite this
 
 #include "util_str.h"
-#include <stdlib.h>
+#include <cstdlib>
 #include <ctype.h>
 #include <stdio.h>
 #include <stdarg.h>
index 174f15fab7b6c6f06cd28b7cbc68cf04584dd94b..85d598f34f4e85da28b6a1670c080ff15cd0e66e 100644 (file)
@@ -22,7 +22,7 @@
 #if !defined ( INCLUDED_STRINGIO_H )
 #define INCLUDED_STRINGIO_H
 
-#include <stdlib.h>
+#include <cstdlib>
 #include <cctype>
 
 #include "generic/vector.h"
index 8871a43938ca67b96b8e990904592719791484e1..cea3c04fd95445306cd9f2aac9e265f4d54a4117 100644 (file)
@@ -22,6 +22,7 @@
 #if !defined( INCLUDED_UNIQUENAMES_H )
 #define INCLUDED_UNIQUENAMES_H
 
+#include <cstdlib>
 #include "debugging/debugging.h"
 #include <map>
 #include "string/string.h"
index 109121824eefc791b4adb2bb17aafa90b0e9422b..99b2efcdea128bd28294a63b99eb1016bd68ccc6 100644 (file)
@@ -36,7 +36,7 @@
 
 #include "light.h"
 
-#include <stdlib.h>
+#include <cstdlib>
 
 #include "cullable.h"
 #include "renderable.h"
index 0da0d3a223c1f728acafc71e954cac55bde29aab..2a6f06666d2b893b84cd5b00e642451637fdd998 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "dds.h"
 
-#include <stdlib.h>
+#include <cstdlib>
 
 #include "ifilesystem.h"
 #include "iarchive.h"
index 31685fd86fda5feb8f0f3dc10291c25e4ed33ede..df93ea0a40d2c6878b7c3c53a1a3d147f7f32b1f 100644 (file)
@@ -37,7 +37,7 @@
 #include "jpeg.h"
 
 #include <setjmp.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <stdio.h>
 #include <string.h>
 
index 46bffc056186dc5c69a0a6cc9b280c5cc1d09078..ece7d49d14117b30ae6385eccb4a1bd324a9e9f9 100644 (file)
@@ -25,7 +25,7 @@
 
 typedef unsigned char byte;
 
-#include <stdlib.h>
+#include <cstdlib>
 
 #include "imagelib.h"
 #include "bytestreamutils.h"
index bc498a8fff6972afae3c6e4597492d68fb617c49..6111c6dc8aef2e2fedc3b75915afcbbba51596c4 100644 (file)
@@ -27,7 +27,7 @@
 
 typedef unsigned char byte;
 
-#include <stdlib.h>
+#include <cstdlib>
 
 #include "generic/bitfield.h"
 #include "imagelib.h"
index e82b833bfa2480c5b3bacd27bfd885f42b2dee14..cab753aba55410a4a2f309eafcb790a48051b836 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "hlw.h"
 
-#include <stdlib.h>
+#include <cstdlib>
 #include <string.h>
 #include <stdio.h>
 
index 2e4f979b40fa51268dc5b33f17a16be49ae1dfa8..171ab3e4e9c9f7e821c36814b5fc5c1bc4768e95 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "mip.h"
 
-#include <stdlib.h>
+#include <cstdlib>
 #include <string.h>
 #include <stdio.h>
 
index 0fdec869d34767e81182ceb66edd5f288574d234..67cdf208c73887ed8553c4b555cab2e562e7c397 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "sprite.h"
 
-#include <stdlib.h>
+#include <cstdlib>
 #include <string.h>
 #include <stdio.h>
 
index bf0874165c71dbbbfd8294970d2589063ac77826..80233844aa5563b0c8e30cd636d24c82da15a23a 100644 (file)
@@ -31,7 +31,7 @@
 // ====== PNG loader functionality ======
 
 #include "png.h"
-#include <stdlib.h>
+#include <cstdlib>
 
 void user_warning_fn( png_structp png_ptr, png_const_charp warning_msg ){
        globalErrorStream() << "libpng warning: " << warning_msg << "\n";
index 3ab4e9e0754273f611a01c6fe0d18f99cf27152e..e66cb0d219590b90df5935c6a2de9df918ced1fd 100644 (file)
@@ -22,7 +22,7 @@
 #include "mdlimage.h"
 
 #include <math.h>
-#include <stdlib.h>
+#include <cstdlib>
 
 #include "ifilesystem.h"
 #include "bytestreamutils.h"
index 88a234a9c8498fb2e8860b2cd5bc38e51cb00e59..122cfa625f287742f4635cbbfd9fdd9e716200fb 100644 (file)
@@ -24,7 +24,7 @@
 #include <stdio.h>
 #include "picomodel.h"
 typedef unsigned char byte;
-#include <stdlib.h>
+#include <cstdlib>
 #include <algorithm>
 #include <list>
 
index 870854f324be9e003b80666dfa977c8ae7c4cb55..5532e2240aac86e3bdbed46ceb47738c97ab6bb1 100644 (file)
@@ -37,7 +37,7 @@
 #include "shaders.h"
 
 #include <stdio.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <map>
 #include <list>
 
index a31c0a6d8842bdcc9c80cf1b18c68332d720ccba..12d5878213d70f7e01fd395c7b13221791e53d28 100644 (file)
@@ -26,7 +26,7 @@
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
 #include <stdio.h>
-#include <stdlib.h>
+#include <cstdlib>
 
 #if !defined( WIN32 )
 
index ea0119f6ee018c6fc745e806ddd226b370e95291..7b52e1234fd22f0cbaf19d77694bde003ab559ae 100644 (file)
@@ -25,7 +25,7 @@
 #include "iarchive.h"
 
 #include <stdio.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <vector>
 
 #include "stream/filestream.h"
index 7e98a41594f2eeffc162c0284f12541ac601254b..b952f8ff476725c9247f9565be24e0af3c9b70e1 100644 (file)
@@ -44,7 +44,7 @@
 #include "vfs.h"
 
 #include <stdio.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <glib.h>
 
 #include "qerplugin.h"
index d68bab1ea8579d2a06f6a334bcb1bf514743ec71..fc68fc99080ec982b30577d2711e84a6466a312f 100644 (file)
@@ -210,3 +210,6 @@ target_link_libraries(radiant
     string
     xmllib
 )
+if(NOT WIN32)
+    target_link_libraries(radiant ${X11_LIBRARIES})
+endif()
index 087d0439992df58d26075edf29b263aa0a93f82c..58a6f4e1027ec045b6f9ca80b55e85a885cd2045 100644 (file)
@@ -33,7 +33,7 @@
 
 #include "mainframe.h"
 
-#include <stdlib.h>
+#include <cstdlib>
 
 #include <gtk/gtkmain.h>
 #include <gtk/gtkvbox.h>
index f43743426bfd7e8dfed968b020ae7ee87e8c9033..1550012305d193e800161e4939e58c4214f668a8 100644 (file)
@@ -66,7 +66,7 @@ StaticRegisterModule staticRegisterEclassDef( StaticEclassDefModule::instance()
 
 #include "string/string.h"
 
-#include <stdlib.h>
+#include <cstdlib>
 
 
 char com_token[1024];
index a15b66ee9537ceb6858b0922dd485131f0f8276a..d6703e81e0c578d670a55fabe6f5545a1a47102f 100644 (file)
@@ -181,7 +181,7 @@ bool portable_app_setup(){
 
 #if defined( POSIX )
 
-#include <stdlib.h>
+#include <cstdlib>
 #include <pwd.h>
 #include <unistd.h>
 
index 2e44768c97973ef9b30f295dafe9b49986d5fc4e..645af34dde3dd2e464e50204f288f4b94f617394 100644 (file)
@@ -25,7 +25,7 @@
 #include "debugging/debugging.h"
 
 #include <stdio.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <string.h>
 
 #if defined( _WIN32 )
@@ -55,7 +55,6 @@ PROC ( WINAPI * qwglGetProcAddress )( LPCSTR );
 
 #include <GL/glx.h>
 #include <dlfcn.h>
-#include <gdk/gdkx.h>
 
 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
index 00221d7d7d165f49621a042f8b5bdd73593e19ce..714521c7ec6e14e8abe06706f463a00c38b98c26 100644 (file)
 #include "server.h"
 
 #include "debugging/debugging.h"
-#include "warnings.h"
 
-#include <vector>
 #include <map>
+#include <vector>
 #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";
index 03196c3cd30c9da23978ca60cfabab06a8bd31bb..c827d93c94587748353af62c0a49dc5278197454 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "texmanip.h"
 
-#include <stdlib.h>
+#include <cstdlib>
 #include "stream/textstream.h"
 
 static byte *row1 = NULL, *row2 = NULL;
index e5abc077f5b9424e2ddbb9afb66a368d410993b8..e5ed0bc57f0b73c18afa956ea3982981e095a031 100644 (file)
@@ -33,7 +33,7 @@ bool open_url( const char* url ){
 #endif
 
 #if defined( __linux__ ) || defined( __FreeBSD__ )
-#include <stdlib.h>
+#include <cstdlib>
 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 <stdlib.h>
+#include <cstdlib>
 bool open_url( const char* url ){
        char command[2 * PATH_MAX];
        snprintf( command, sizeof( command ), "open \"%s\" &", url );
index 2955d53f2a966aaa962cb9be569240b89c5b1328..b40af4409ffced06610ba88699fe06052896a200 100644 (file)
@@ -26,7 +26,7 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <errno.h>
 #include <ctype.h>
 #include <time.h>
index 0045a09d5c5e2e24229035523129e8dbe8c5f6a4..9296f57b50338cf8f42cef3a8ac19fc3167c635e 100644 (file)
@@ -36,7 +36,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 #include <stdio.h>
 #include <string.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <errno.h>
 #include <ctype.h>
 #include <time.h>
index bd8e63c3df211928cf091f1dfae3be4e8d28cbc1..b6daa2c681d0c7995eb160be9d1c179665249fde 100644 (file)
@@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 // qdata.h
 
 
-#include <stdlib.h>
+#include <cstdlib>
 #include <stdio.h>
 #include <math.h>
 #include <string.h>
index b748950cb8344cdfb35682597b3343664b91d9de..1f166b793e663b416b8a8589a86d762e78ac316d 100644 (file)
@@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 #include <stdio.h>
 #include <string.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <errno.h>
 #include <ctype.h>
 #include <time.h>
index 679305991b23eeaee8825145fc63932c3e1f3bb0..2e0b22aa2bdcf853d6cc2489b165a774573d127d 100644 (file)
@@ -35,7 +35,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include <gl/glaux.h>
 #include "glingr.h"
 #include <math.h>
-#include <stdlib.h>
+#include <cstdlib>
 
 #include "cmdlib.h"
 #include "mathlib.h"
index 401e6f740072129a2dae00806a9b28f6c0e8ac7a..3e9b092ee8d4dad65fc3bbbeb89413a9420bf37b 100644 (file)
@@ -35,7 +35,7 @@
        #include <windows.h>
 #endif
 
-#include <stdlib.h>
+#include <cstdlib>
 
 #include "cmdlib.h"
 #include "mathlib.h"
index cb00003a4191515235d8f98073b092bb847fd977..491f9596e9be7a4471bb85e01e52cbdc892cfe50 100644 (file)
@@ -19,7 +19,7 @@
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include <stdlib.h>
+#include <cstdlib>
 #include <stdio.h>
 #include <math.h>
 #include <string.h>
index fbcd21dd710ae096f0531d2e092ea739790b2778..8da50ecf5642130e8513eb6b96cb14cd5bc95043 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 
-#include <stdlib.h>
+#include <cstdlib>
 #include <stdio.h>
 #include <math.h>
 #include <memory.h>
index c94ce37744eb31283c43fee6e491d4fd7000835b..4af3f591af40fab12871b7d21010104136f72fdc 100644 (file)
@@ -38,7 +38,7 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <stdlib.h>
+#include <cstdlib>
 #include <errno.h>
 #include <ctype.h>
 #include <time.h>
index 579931ae9b4c6d189ebddeeed2461a999e36a78a..b3ffb6853e4595cc507e033abf2b36b3ad92c72c 100644 (file)
@@ -24,7 +24,7 @@
 //
 
 #include "h2common.h"
-#include <stdlib.h>     // needed here for size_t
+#include <cstdlib>     // needed here for size_t
 
 typedef struct ResourceManager_s
 {
index aba4a0c889c860ca890244787e1b0a9bf016a163..629521c01590af3173033206cb31c422874d68a5 100644 (file)
@@ -19,7 +19,7 @@
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include <stdlib.h> // for size_t
+#include <cstdlib> // for size_t
 #include "arrayedlist.h"
 
 #define JN_YAW_CHANGED      0x00000001
index 2ead9751e2c191e3ba0c87e36e3048b77a6de013..8f5d21386b10202413df3614282ac3edca662b21 100644 (file)
@@ -22,7 +22,7 @@
 // qdata.h
 
 
-#include <stdlib.h>
+#include <cstdlib>
 #include <stdio.h>
 #include <math.h>
 #include <string.h>
index 63811395b22d0b6c35047c3b631c3c59966d2769..87d87c72372a9d560ae41ab0907ae316270d65b4 100644 (file)
@@ -19,7 +19,7 @@
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include <stdlib.h>
+#include <cstdlib>
 #include <stdio.h>
 #include <assert.h>
 #include <string.h>