Author: post
Date: 2010-04-05 13:47:34 +0200 (Mon, 05 Apr 2010)
New Revision: 3336
Modified:
trunk/src/application.c
Log:
Make internal stack trace a single define (so it is easier to disable)
Modified: trunk/src/application.c
===================================================================
--- trunk/src/application.c 2010-04-05 10:37:27 UTC (rev 3335)
+++ trunk/src/application.c 2010-04-05 11:47:34 UTC (rev 3336)
@@ -17,6 +17,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA.
*/
+#if defined(__GNUC__) && (defined (__x86_64__) || defined (__i386__)) &&
!defined(__MINGW32__)
+#define RS_USE_INTERNAL_STACKTRACE
+#endif
+
#include <rawstudio.h>
#include <glib/gstdio.h>
#include <glib.h>
@@ -28,7 +32,7 @@
#ifndef WIN32
#include <gconf/gconf-client.h>
#endif
-#if defined(__GNUC__) && (defined (__x86_64__) || defined (__i386__)) &&
!defined(__MINGW32__)
+#if defined(RS_USE_INTERNAL_STACKTRACE)
#include <execinfo.h>
#include <signal.h>
#define __USE_GNU
@@ -581,7 +585,7 @@
g_static_rec_mutex_unlock (&gdk_lock);
}
-#if defined(__GNUC__) && (defined (__x86_64__) || defined (__i386__)) &&
!defined(__MINGW32__)
+#if defined(RS_USE_INTERNAL_STACKTRACE)
#if defined (__x86_64__)
#define PROG_COUNTER_REG REG_RIP
@@ -674,8 +678,9 @@
free( funcNames );
exit(0);
}
-#endif
+#endif // defined(RS_USE_INTERNAL_STACKTRACE)
+
int
main(int argc, char **argv)
{
@@ -684,7 +689,7 @@
gboolean do_test = FALSE;
int opt;
gboolean use_system_theme = DEFAULT_CONF_USE_SYSTEM_THEME;
-#if defined(__GNUC__) && (defined (__x86_64__) || defined (__i386__)) &&
!defined(__MINGW32__)
+#if defined(RS_USE_INTERNAL_STACKTRACE)
struct sigaction sa;
memset(&sa, 0, sizeof(sigaction));
sigemptyset(&sa.sa_mask);
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit