diff options
author | alex <alex@FreeBSD.org> | 2000-07-20 15:32:29 +0800 |
---|---|---|
committer | alex <alex@FreeBSD.org> | 2000-07-20 15:32:29 +0800 |
commit | 4d57c46ff41f3aaa4583c678e39cd563f1ed31b6 (patch) | |
tree | 2874e43a3dbc657e3aaddf6750fb4e66d9903b37 /www/kannel | |
parent | ae7ffdce4bb3dd71ae92092daa60a7db48389ae2 (diff) | |
download | freebsd-ports-gnome-4d57c46ff41f3aaa4583c678e39cd563f1ed31b6.tar.gz freebsd-ports-gnome-4d57c46ff41f3aaa4583c678e39cd563f1ed31b6.tar.zst freebsd-ports-gnome-4d57c46ff41f3aaa4583c678e39cd563f1ed31b6.zip |
Fix bug, when WAP-mobiles finally try to request a page.
This patch raises the pthread stack default size and compiles
the port with -pthread.
While I'm here, add closing ' for sed-regexp (thanks ViM syntax highlighting!)
Submitted by: "Ari Suutari" <ari@suutari.iki.fi>
Diffstat (limited to 'www/kannel')
-rw-r--r-- | www/kannel/Makefile | 3 | ||||
-rw-r--r-- | www/kannel/files/patch-af | 59 |
2 files changed, 61 insertions, 1 deletions
diff --git a/www/kannel/Makefile b/www/kannel/Makefile index 944b475d2734..821114f7481a 100644 --- a/www/kannel/Makefile +++ b/www/kannel/Makefile @@ -17,6 +17,7 @@ LIB_DEPENDS= xml:${PORTSDIR}/textproc/libxml GNU_CONFIGURE= yes USE_GMAKE= yes WRKSRC= ${WRKDIR}/gateway-0.10.2/ +CFLAGS+= -pthread do-install: .if !defined(NOPORTDOCS) @@ -29,7 +30,7 @@ do-install: .if !defined(NOPORTDOCS) post-install: @cd ${WRKSRC}/doc && \ - for a in `/usr/bin/find . -type f | ${SED} -e 's:^\./::g` ; \ + for a in `/usr/bin/find . -type f | ${SED} -e 's:^\./::g'` ; \ do ${ECHO} share/doc/kannel/$$a >> ${TMPPLIST} ; done @${ECHO} "@dirrm share/doc/kannel/arch" >> ${TMPPLIST} @${ECHO} "@dirrm share/doc/kannel/userguide" >> ${TMPPLIST} diff --git a/www/kannel/files/patch-af b/www/kannel/files/patch-af new file mode 100644 index 000000000000..d519dd626a4f --- /dev/null +++ b/www/kannel/files/patch-af @@ -0,0 +1,59 @@ +*** gwlib/gwthread-pthread.c.orig Tue Jul 18 15:08:24 2000 +--- gwlib/gwthread-pthread.c Wed Jul 19 13:23:39 2000 +*************** +*** 58,63 **** +--- 58,68 ---- + pthread_key_t tsd_key; + + pthread_mutex_t threadtable_lock; ++ /* ++ * Thread creation parameters. ++ */ ++ static pthread_attr_t thread_attr; ++ #define MIN_THREAD_STACK_SIZE (256 * 1024) + + static void lock(void) { + int ret; +*************** +*** 172,177 **** +--- 177,183 ---- + void gwthread_init(void) { + int ret; + int i; ++ int stack_size; + + pthread_mutex_init(&threadtable_lock, NULL); + +*************** +*** 184,189 **** +--- 190,202 ---- + threadtable[i] = NULL; + } + active_threads = 0; ++ /* ++ * Make sure that thread stack is large enough. ++ */ ++ pthread_attr_init(&thread_attr); ++ pthread_attr_getstacksize(&thread_attr, &stack_size); ++ if (stack_size < MIN_THREAD_STACK_SIZE) ++ pthread_attr_setstacksize(&thread_attr, MIN_THREAD_STACK_SIZE); + + create_threadinfo_main(); + } +*************** +*** 285,291 **** + return -1; + } + +! ret = pthread_create(&id, NULL, &new_thread, p); + if (ret != 0) { + unlock(); + error(ret, "Could not create new thread."); +--- 298,304 ---- + return -1; + } + +! ret = pthread_create(&id, &thread_attr, &new_thread, p); + if (ret != 0) { + unlock(); + error(ret, "Could not create new thread."); |