Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-01-19 01:05:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-19 01:05:37 +0400
commitb7a2402da68accb283314bc7929d037e1a115da9 (patch)
treeaad6a551a224a9c8b1cbf487fa0e06fa5fdc202d /source/creator
parent5f9ea0d7eb675dceb5ef981d0bbe221237a3c6fc (diff)
fix for building with BSD & MinGW.
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 6cee9b09a52..624b1148072 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -53,10 +53,10 @@
#endif
/* for backtrace */
-#ifdef WIN32
-# include <DbgHelp.h>
-#else
+#if defined(__linux__) || defined(__APPLE__)
# include <execinfo.h>
+#elif defined(_MSV_VER)
+# include <DbgHelp.h>
#endif
#include <stdlib.h>
@@ -448,10 +448,12 @@ static int set_fpe(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(dat
return 0;
}
+#if defined(__linux__) || defined(__APPLE__)
+
+/* Unix */
static void blender_crash_handler_backtrace(FILE *fp)
{
#define SIZE 100
-#ifndef WIN32
void *buffer[SIZE];
int nptrs;
char **strings;
@@ -468,10 +470,17 @@ static void blender_crash_handler_backtrace(FILE *fp)
}
free(strings);
-#else /* WIN32 */
+#undef SIZE
+}
+
+#elif defined(_MSV_VER)
+
+static void blender_crash_handler_backtrace(FILE *fp)
+{
(void)fp;
+
#if 0
- #define MAXSYMBOL 256
+#define MAXSYMBOL 256
unsigned short i;
void *stack[SIZE];
unsigned short nframes;
@@ -496,10 +505,17 @@ static void blender_crash_handler_backtrace(FILE *fp)
MEM_freeN(symbolinfo);
#endif
-#endif
-#undef SIZE
}
+#else /* non msvc/osx/linux */
+
+static void blender_crash_handler_backtrace(FILE *fp)
+{
+ (void)fp;
+}
+
+#endif
+
static void blender_crash_handler(int signum)
{