Fix crash issue of cannaserver.

Obtained from:	NetBSD, Canna CVS Repositry
Approved by:	portmgr (marcus)
Committed at:	the 27th EBUG Meeting at Bandai, Niigata, Japan (Powered by Daisuke)
Committed with:	EBUG Members (hre, karl, daigu, high, mikio, kaw and nork@)
This commit is contained in:
Norikatsu Shigemura 2008-09-20 09:59:24 +00:00
parent f025b838e6
commit 4912d6624e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=220439
6 changed files with 36 additions and 3 deletions

View file

@ -8,7 +8,7 @@
PORTNAME= Canna
PORTVERSION= 3.7p3
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= japanese
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_JP}
MASTER_SITE_SUBDIR= canna/9565/

View file

@ -0,0 +1,11 @@
--- lib/RK/ncache.c.orig 2003-09-17 17:50:52.000000000 +0900
+++ lib/RK/ncache.c 2008-09-20 01:46:07.000000000 +0900
@@ -27,7 +27,7 @@
#include "RKintern.h"
#define NCHASH 101
-#define hash(x) ((int)((x)%NCHASH))
+#define hash(x) ((int)(((unsigned long)(x))%NCHASH))
static struct ncache Nchash[NCHASH];
static struct ncache Ncfree;

View file

@ -8,7 +8,7 @@
PORTNAME= Canna
PORTVERSION= 3.7p3
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= japanese
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_JP}
MASTER_SITE_SUBDIR= canna/9565/

View file

@ -0,0 +1,11 @@
--- lib/RK/ncache.c.orig 2003-09-17 17:50:52.000000000 +0900
+++ lib/RK/ncache.c 2008-09-20 01:46:07.000000000 +0900
@@ -27,7 +27,7 @@
#include "RKintern.h"
#define NCHASH 101
-#define hash(x) ((int)((x)%NCHASH))
+#define hash(x) ((int)(((unsigned long)(x))%NCHASH))
static struct ncache Nchash[NCHASH];
static struct ncache Ncfree;

View file

@ -8,7 +8,7 @@
PORTNAME= Canna
PORTVERSION= 3.7p3
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= japanese
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_JP}
MASTER_SITE_SUBDIR= canna/9565/

View file

@ -0,0 +1,11 @@
--- lib/RK/ncache.c.orig 2003-09-17 17:50:52.000000000 +0900
+++ lib/RK/ncache.c 2008-09-20 01:46:07.000000000 +0900
@@ -27,7 +27,7 @@
#include "RKintern.h"
#define NCHASH 101
-#define hash(x) ((int)((x)%NCHASH))
+#define hash(x) ((int)(((unsigned long)(x))%NCHASH))
static struct ncache Nchash[NCHASH];
static struct ncache Ncfree;