summaryrefslogtreecommitdiff
path: root/news/pan/patches/patch-ac
diff options
context:
space:
mode:
Diffstat (limited to 'news/pan/patches/patch-ac')
-rw-r--r--news/pan/patches/patch-ac40
1 files changed, 40 insertions, 0 deletions
diff --git a/news/pan/patches/patch-ac b/news/pan/patches/patch-ac
new file mode 100644
index 00000000000..da20c3f5786
--- /dev/null
+++ b/news/pan/patches/patch-ac
@@ -0,0 +1,40 @@
+$NetBSD: patch-ac,v 1.5 2002/10/02 03:08:51 rh Exp $
+
+--- pan/pan.c.orig Fri Nov 9 10:53:07 2001
++++ pan/pan.c
+@@ -42,6 +42,24 @@
+ #include <pan/thread-watch.h>
+ #include <pan/util.h>
+
++#ifdef __NetBSD__
++#include <gtk/gtk.h>
++#include <pthread.h>
++
++/*
++ * NetBSD uses non-preemptive pth, so we yield the processor periodically
++ */
++
++gint
++pth_nbschedule (gpointer data)
++{
++ pthread_yield_np();
++
++ return TRUE;
++}
++#endif
++
++
+ static gint save_session (GnomeClient * client,
+ gint phase,
+ GnomeSaveStyle save_style,
+@@ -196,6 +214,10 @@
+ newsrc_import (s, newsrc_filename, newsrc_port_subscribed_only);
+ }
+ }
++
++#ifdef __NetBSD__
++ gtk_timeout_add (200, pth_nbschedule, NULL);
++#endif
+
+ gtk_main ();
+