merge my campaign page changes with default
authorPeriklis Ntanasis <pntanasis@gmail.com>
Wed, 12 Jun 2013 04:58:27 +0300
changeset 9189 b0d16164dfa0
parent 9184 8bf450fe6cc8 (current diff)
parent 9187 a15ea245adf9 (diff)
child 9191 fc54667b1203
merge my campaign page changes with default
--- a/QTfrontend/game.cpp	Wed Jun 12 04:53:04 2013 +0300
+++ b/QTfrontend/game.cpp	Wed Jun 12 04:58:27 2013 +0300
@@ -153,7 +153,7 @@
 
     HWProto::addStringToBuffer(teamscfg, "TL");
     HWProto::addStringToBuffer(teamscfg, QString("etheme %1")
-                               .arg((themeModel->rowCount() > 0) ? themeModel->index(rand() % themeModel->rowCount()).data().toString() : "steel"));
+                               .arg((themeModel->rowCount() > 0) ? themeModel->index(rand() % themeModel->rowCount()).data(ThemeModel::ActualNameRole).toString() : "steel"));
     HWProto::addStringToBuffer(teamscfg, "eseed " + QUuid::createUuid().toString());
 
     HWProto::addStringToBuffer(teamscfg, "e$template_filter 2");
--- a/cmake_modules/cpackvars.cmake	Wed Jun 12 04:53:04 2013 +0300
+++ b/cmake_modules/cpackvars.cmake	Wed Jun 12 04:58:27 2013 +0300
@@ -58,6 +58,7 @@
     "\\\\.db$"
     "\\\\.dof$"
     "\\\\.or$"
+    "\\\\.stackdump$"
     #archives
     "\\\\.zip$"
     "\\\\.gz$"
--- a/misc/libphysfs/CMakeLists.txt	Wed Jun 12 04:53:04 2013 +0300
+++ b/misc/libphysfs/CMakeLists.txt	Wed Jun 12 04:58:27 2013 +0300
@@ -48,11 +48,13 @@
     # Fallback to older OS X on PowerPC to support wider range of systems...
     if(CMAKE_OSX_ARCHITECTURES MATCHES ppc)
         add_definitions(-DMAC_OS_X_VERSION_MIN_REQUIRED=1020)
-        set(OTHER_LDFLAGS ${OTHER_LDFLAGS} " -mmacosx-version-min=10.2")
+        list(APPEND OTHER_LDFLAGS "-mmacosx-version-min=10.2")
     endif(CMAKE_OSX_ARCHITECTURES MATCHES ppc)
 
     # Need these everywhere...
     add_definitions(-fno-common)
+    find_library(foundation_framework NAMES Foundation)
+    list(APPEND OTHER_LDFLAGS ${foundation_framework})
     find_library(iokit_framework NAMES IOKit)
     list(APPEND OTHER_LDFLAGS ${iokit_framework})
 endif(MACOSX)
--- a/misc/libphysfs/platform_macosx.c	Wed Jun 12 04:53:04 2013 +0300
+++ b/misc/libphysfs/platform_macosx.c	Wed Jun 12 04:58:27 2013 +0300
@@ -44,6 +44,31 @@
     fflush(stderr);
     abort();
 }
+
+
+/* apparently libssp is missing from 10.4 SDK
+   code from http://wiki.osdev.org/GCC_Stack_Smashing_Protector */
+void * __stack_chk_guard = NULL;
+
+void __stack_chk_guard_setup()
+{
+    unsigned char * p;
+    p = (unsigned char *) &__stack_chk_guard;
+
+    /* If you have the ability to generate random numbers in your kernel then use them,
+       otherwise for 32-bit code: *p = 0x00000aff; */
+    *p = random();
+}
+
+void __attribute__((noreturn)) __stack_chk_fail()
+{
+    /* put your panic function or similar in here */
+    unsigned char * vid = (unsigned char *)0xB8000;
+    vid[1] = 7;
+    for(;;)
+    vid[0]++;
+}
+
 #endif
 #endif /* __APPLE__ */