it now compiles on OS X, but does it work?
authordivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Fri, 9 Jan 2009 22:44:43 +0000 (22:44 +0000)
committerdivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Fri, 9 Jan 2009 22:44:43 +0000 (22:44 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@169 61c419a2-8eb2-4b30-bcec-8cead039b335

Makefile
contrib/sunplug/sunplug.cpp
radiant/texwindow.cpp
tools/quake2/common/threads.c
tools/quake3/common/threads.c

index a26833a..8ce76ba 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -259,7 +259,7 @@ dependencies-check:
        checkbinary binutils "$(AR)"; \
        checkbinary pkg-config "$(PKGCONFIG)"; \
        [ "$(OS)" = "Win32" ] && checkbinary mingw32 "$(WINDRES)"; \
        checkbinary binutils "$(AR)"; \
        checkbinary pkg-config "$(PKGCONFIG)"; \
        [ "$(OS)" = "Win32" ] && checkbinary mingw32 "$(WINDRES)"; \
-       [ "$(OS)" != "Win32" ] && checkbinary libc6 "$(LDD)"; \
+       [ -n "$(lDD)" ] && checkbinary libc6 "$(LDD)"; \
        $(ECHO) All required tools have been found!
        @$(ECHO)
        @if [ x"$(DEPENDENCIES_CHECK)" = x"verbose" ]; then set -x; fi; \
        $(ECHO) All required tools have been found!
        @$(ECHO)
        @if [ x"$(DEPENDENCIES_CHECK)" = x"verbose" ]; then set -x; fi; \
@@ -481,8 +481,8 @@ libddslib.$(A): CPPFLAGS_EXTRA := -Ilibs
 libddslib.$(A): \
        libs/ddslib/ddslib.o \
 
 libddslib.$(A): \
        libs/ddslib/ddslib.o \
 
-$(INSTALLDIR)/q3data.$(EXE): LIBS_EXTRA := $(LIBS_XML) $(LIBS_GLIB)
-$(INSTALLDIR)/q3data.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) -Itools/quake3/common -Ilibs -Iinclude
+$(INSTALLDIR)/q3data.$(EXE): LIBS_EXTRA := $(LIBS_XML) $(LIBS_GLIB) $(LIBS_ZLIB)
+$(INSTALLDIR)/q3data.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) $(CPPFLAGS_ZLIB) -Itools/quake3/common -Ilibs -Iinclude
 $(INSTALLDIR)/q3data.$(EXE): \
        tools/quake3/common/aselib.o \
        tools/quake3/common/bspfile.o \
 $(INSTALLDIR)/q3data.$(EXE): \
        tools/quake3/common/aselib.o \
        tools/quake3/common/bspfile.o \
index cebf44e..2a89c5c 100644 (file)
@@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 void about_plugin_window();\r
 void MapCoordinator();\r
 \r
 void about_plugin_window();\r
 void MapCoordinator();\r
 \r
-#ifdef __linux__\r
+#ifndef _WIN32\r
 // linux itoa implementation\r
 char* itoa( int value, char* result, int base )\r
 {      \r
 // linux itoa implementation\r
 char* itoa( int value, char* result, int base )\r
 {      \r
index 810fc19..f24860b 100644 (file)
@@ -1917,7 +1917,7 @@ void TextureBrowser_searchTags()
     {
           size_t shaders_found = g_TextureBrowser.m_found_shaders.size();
 
     {
           size_t shaders_found = g_TextureBrowser.m_found_shaders.size();
 
-       globalOutputStream() << "Found " << shaders_found << " textures and shaders with " << tags_searched << "\n";
+       globalOutputStream() << "Found " << (unsigned int)shaders_found << " textures and shaders with " << (unsigned int)tags_searched << "\n";
           ScopeDisableScreenUpdates disableScreenUpdates("Searching...", "Loading Textures");
 
          std::set<CopiedString>::iterator iter;
           ScopeDisableScreenUpdates disableScreenUpdates("Searching...", "Loading Textures");
 
          std::set<CopiedString>::iterator iter;
index 76e969d..9c123a5 100644 (file)
@@ -542,11 +542,7 @@ void RunThreadsOn (int workcnt, qboolean showpacifier, void(*func)(int))
 
     if(pthread_mutexattr_init(&mattrib) != 0)
       Error("pthread_mutexattr_init failed");
 
     if(pthread_mutexattr_init(&mattrib) != 0)
       Error("pthread_mutexattr_init failed");
-#if __GLIBC_MINOR__ == 1
-    if (pthread_mutexattr_settype(&mattrib, PTHREAD_MUTEX_FAST_NP) != 0)
-#else
-    if (pthread_mutexattr_settype(&mattrib, PTHREAD_MUTEX_ADAPTIVE_NP) != 0)
-#endif
+    if (pthread_mutexattr_settype(&mattrib, PTHREAD_MUTEX_ERRORCHECK) != 0)
       Error ("pthread_mutexattr_settype failed");
     recursive_mutex_init(mattrib);
 
       Error ("pthread_mutexattr_settype failed");
     recursive_mutex_init(mattrib);
 
index 137597c..8a5fa35 100644 (file)
@@ -415,7 +415,7 @@ void RunThreadsOn (int workcnt, qboolean showpacifier, void(*func)(int))
 =======================================================================
 */
 
 =======================================================================
 */
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__APPLE__)
 #define USED
 
 int numthreads = 4;
 #define USED
 
 int numthreads = 4;
@@ -540,11 +540,7 @@ void RunThreadsOn (int workcnt, qboolean showpacifier, void(*func)(int))
 
     if(pthread_mutexattr_init(&mattrib) != 0)
       Error("pthread_mutexattr_init failed");
 
     if(pthread_mutexattr_init(&mattrib) != 0)
       Error("pthread_mutexattr_init failed");
-#if __GLIBC_MINOR__ == 1
-    if (pthread_mutexattr_settype(&mattrib, PTHREAD_MUTEX_FAST_NP) != 0)
-#else
-    if (pthread_mutexattr_settype(&mattrib, PTHREAD_MUTEX_ADAPTIVE_NP) != 0)
-#endif
+    if (pthread_mutexattr_settype(&mattrib, PTHREAD_MUTEX_ERRORCHECK) != 0)
       Error ("pthread_mutexattr_settype failed");
     recursive_mutex_init(mattrib);
 
       Error ("pthread_mutexattr_settype failed");
     recursive_mutex_init(mattrib);