2008-09-12 [colin] 3.5.0cvs103
[claws.git] / src / crash.c
index 329e31d6caf7431dba81e143b769997146ee177a..70705b31031e2015d947ea712ae5f90de9610f20 100644 (file)
@@ -4,7 +4,7 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -13,8 +13,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 
  */
 
 #ifdef HAVE_CONFIG_H
@@ -80,7 +80,7 @@ static void            crash_cleanup_exit             (void);
 
 /***/
 
-static const gchar *DEBUG_SCRIPT = "bt\nkill\nq";
+static const gchar *DEBUG_SCRIPT = "thread all apply\nbt full\nkill\nq";
 
 /***/
 
@@ -300,10 +300,11 @@ static void crash_save_crash_log(GtkButton *button, const gchar *text)
        time_t timer;
        struct tm *lt;
        char buf[100];
+       struct tm buft;
        gchar *filename;
 
        timer = time(NULL);
-       lt = localtime(&timer);
+       lt = localtime_r(&timer, &buft);
        strftime(buf, sizeof buf, "claws-crash-log-%Y-%m-%d-%H-%M-%S.txt", lt);
        if (NULL != (filename = filesel_select_file_save(_("Save crash information"), buf))
        &&  *filename)
@@ -316,7 +317,7 @@ static void crash_save_crash_log(GtkButton *button, const gchar *text)
  */
 static void crash_create_bug_report(GtkButton *button, const gchar *data)
 {
-       open_uri(BUGZILLA_URI, prefs_common.uri_cmd);
+       open_uri(BUGZILLA_URI, prefs_common_get_uri_cmd());
 }
 
 /*!
@@ -360,7 +361,7 @@ static void crash_debug(unsigned long crash_pid,
                dup(choutput[1]);
                close(choutput[0]);
                if (-1 == execvp("gdb", argp)) 
-                       puts("error execvp\n");
+                       g_print("error execvp\n");
        } else {
                char buf[100];
                int r;
@@ -371,7 +372,7 @@ static void crash_debug(unsigned long crash_pid,
                 * make it non blocking
                 */
                if (-1 == fcntl(choutput[0], F_SETFL, O_NONBLOCK))
-                       puts("set to non blocking failed\n");
+                       g_print("set to non blocking failed\n");
 
                /*
                 * get the output
@@ -417,13 +418,16 @@ static const gchar *get_compiled_in_features(void)
 #if USE_OPENSSL
                   " OpenSSL"
 #endif
+#if USE_GNUTLS
+                  " GnuTLS"
+#endif
 #if USE_LDAP
                   " LDAP"
 #endif
 #if USE_JPILOT
                   " JPilot"
 #endif
-#if USE_ASPELL
+#if USE_ENCHANT
                   " GNU/aspell"
 #endif
 #if HAVE_LIBETPAN
@@ -555,7 +559,7 @@ static void crash_handler(int sig)
 static void crash_cleanup_exit(void)
 {
        const char *filename = claws_get_socket_name();
-       g_unlink(filename);
+       claws_unlink(filename);
 }
 
 #endif