- remove unused code as debian flagged it as potentially unsafe

This commit is contained in:
Mark Vejvoda
2012-11-12 04:18:43 +00:00
parent 924b0898ba
commit 24fae99539
3 changed files with 1 additions and 157 deletions

View File

@@ -12,10 +12,9 @@
#include <unistd.h>
#include "util.h"
#include "conversion.h"
// For gcc backtrace on crash!
//#if defined(__GNUC__) && !defined(__MINGW32__) && !defined(__FreeBSD__) && !defined(BSD)
#if defined(HAS_GCC_BACKTRACE)
//#include <mcheck.h>
#include <execinfo.h>
#include <cxxabi.h>
@@ -34,20 +33,6 @@ namespace Shared{ namespace Platform{
string PlatformExceptionHandler::application_binary="";
bool PlatformExceptionHandler::disableBacktrace = false;
// This was the simplest, most portable solution i could find in 5 mins for linux
int MessageBox(int handle, const char *msg, const char *title, int buttons) {
char cmd[8096]="";
snprintf(cmd, 8096,"gdialog --title \"%s\" --msgbox \"%s\"", title, msg);
//if(fork()==0){
//close(1); close(2);
int ret = system(cmd);
//exit(0);
//}
return ret;
}
void message(string message) {
std::cerr << "******************************************************\n";
std::cerr << " " << message << "\n";
@@ -63,17 +48,14 @@ bool ask(string message) {
void exceptionMessage(const exception &excp) {
std::cerr << "Exception: " << excp.what() << std::endl;
//int result = MessageBox(NULL, excp.what(), "Error", 0);
}
//#if defined(__GNUC__) && !defined(__FreeBSD__) && !defined(BSD)
#if defined(HAS_GCC_BACKTRACE)
static int getFileAndLine(char *function, void *address, char *file, size_t flen) {
int line=-1;
if(PlatformExceptionHandler::application_binary != "") {
const int maxbufSize = 8096;
char buf[maxbufSize+1]="";
//char *p=NULL;
// prepare command to be executed
// our program need to be passed after the -e parameter
@@ -166,7 +148,6 @@ string PlatformExceptionHandler::getStackTrace() {
return errMsg;
}
//#if defined(__GNUC__) && !defined(__MINGW32__) && !defined(__FreeBSD__) && !defined(BSD)
#if defined(HAS_GCC_BACKTRACE)
// if(disableBacktrace == false && sdl_quitCalled == false) {
//errMsg = "\nStack Trace:\n";