summaryrefslogtreecommitdiff
path: root/japanese
diff options
context:
space:
mode:
authorNorikatsu Shigemura <nork@FreeBSD.org>2003-02-23 17:38:47 +0000
committerNorikatsu Shigemura <nork@FreeBSD.org>2003-02-23 17:38:47 +0000
commit56ca04cfa169d9d03c0cdbb2b90dfaf008a4f2db (patch)
tree3b7726c5aa859962dd93dff7d09faec83a3597e4 /japanese
parentAdd gnet-glib2. (diff)
Ebview requires a rich stack size each thread, so extend to 256k.
I don't know whether or not enough size(to 256k), but some test ok.
Notes
Notes: svn path=/head/; revision=76286
Diffstat (limited to 'japanese')
-rw-r--r--japanese/ebview-gtk2/Makefile1
-rw-r--r--japanese/ebview-gtk2/files/patch-src::eb.c34
-rw-r--r--japanese/ebview/Makefile1
-rw-r--r--japanese/ebview/files/patch-src::eb.c34
4 files changed, 68 insertions, 2 deletions
diff --git a/japanese/ebview-gtk2/Makefile b/japanese/ebview-gtk2/Makefile
index 5b6b9a0224ec..3194e187dcfd 100644
--- a/japanese/ebview-gtk2/Makefile
+++ b/japanese/ebview-gtk2/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ebview
PORTVERSION= 0.2.0
+PORTREVISION= 1
CATEGORIES= japanese
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/japanese/ebview-gtk2/files/patch-src::eb.c b/japanese/ebview-gtk2/files/patch-src::eb.c
index c1a9ee211e07..1866b1bc8660 100644
--- a/japanese/ebview-gtk2/files/patch-src::eb.c
+++ b/japanese/ebview-gtk2/files/patch-src::eb.c
@@ -1,5 +1,5 @@
--- src/eb.c.orig Mon Nov 18 18:13:06 2002
-+++ src/eb.c Sat Nov 30 09:04:05 2002
++++ src/eb.c Mon Feb 24 02:06:33 2003
@@ -24,6 +24,7 @@
#include <iconv.h>
#include <langinfo.h>
@@ -8,3 +8,35 @@
#define MAX_HITS 50
+@@ -1746,7 +1747,8 @@
+ DICT_GROUP *group;
+ char word[65535];
+
+- strcpy(word, arg);
++ strncpy(word, arg, sizeof(word)-1);
++ word[sizeof(word)-1] = '\0';
+
+ group_item = g_list_first(group_list);
+ while(group_item != NULL){
+@@ -1854,15 +1856,19 @@
+ {
+ gint rc;
+ gint method;
++ pthread_attr_t thread_attr;
+
+ thread_running = 1;
+ hit_count = 0;
+- rc = pthread_create(&tid, NULL, ebook_search_thread, (void *)word);
++
++ pthread_attr_init(&thread_attr);
++ pthread_attr_setstacksize(&thread_attr, 256*1024);
++ rc = pthread_create(&tid, &thread_attr, ebook_search_thread, (void *)word);
+ if(rc != 0){
+ perror("pthread_create");
+ exit(1);
+ }
+-
++ pthread_attr_destroy(&thread_attr);
+
+ method = ebook_search_method();
+ if(method == SEARCH_METHOD_FULL_TEXT){
diff --git a/japanese/ebview/Makefile b/japanese/ebview/Makefile
index 5b6b9a0224ec..3194e187dcfd 100644
--- a/japanese/ebview/Makefile
+++ b/japanese/ebview/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ebview
PORTVERSION= 0.2.0
+PORTREVISION= 1
CATEGORIES= japanese
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/japanese/ebview/files/patch-src::eb.c b/japanese/ebview/files/patch-src::eb.c
index c1a9ee211e07..1866b1bc8660 100644
--- a/japanese/ebview/files/patch-src::eb.c
+++ b/japanese/ebview/files/patch-src::eb.c
@@ -1,5 +1,5 @@
--- src/eb.c.orig Mon Nov 18 18:13:06 2002
-+++ src/eb.c Sat Nov 30 09:04:05 2002
++++ src/eb.c Mon Feb 24 02:06:33 2003
@@ -24,6 +24,7 @@
#include <iconv.h>
#include <langinfo.h>
@@ -8,3 +8,35 @@
#define MAX_HITS 50
+@@ -1746,7 +1747,8 @@
+ DICT_GROUP *group;
+ char word[65535];
+
+- strcpy(word, arg);
++ strncpy(word, arg, sizeof(word)-1);
++ word[sizeof(word)-1] = '\0';
+
+ group_item = g_list_first(group_list);
+ while(group_item != NULL){
+@@ -1854,15 +1856,19 @@
+ {
+ gint rc;
+ gint method;
++ pthread_attr_t thread_attr;
+
+ thread_running = 1;
+ hit_count = 0;
+- rc = pthread_create(&tid, NULL, ebook_search_thread, (void *)word);
++
++ pthread_attr_init(&thread_attr);
++ pthread_attr_setstacksize(&thread_attr, 256*1024);
++ rc = pthread_create(&tid, &thread_attr, ebook_search_thread, (void *)word);
+ if(rc != 0){
+ perror("pthread_create");
+ exit(1);
+ }
+-
++ pthread_attr_destroy(&thread_attr);
+
+ method = ebook_search_method();
+ if(method == SEARCH_METHOD_FULL_TEXT){