From owner-ports-jp@jp.freebsd.org  Tue Feb 29 02:04:23 2000
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id CAA22680;
	Tue, 29 Feb 2000 02:04:23 +0900 (JST)
	(envelope-from owner-ports-jp@jp.FreeBSD.org)
Received: from kiss.jg8oom.jl1zcf.prug.or.jp (122.pool15.tokyo.att.ne.jp [165.76.220.137])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id CAA22675
	for <ports-jp@jp.freebsd.org>; Tue, 29 Feb 2000 02:04:21 +0900 (JST)
	(envelope-from nabe@mobile.icc.titech.ac.jp)
Received: from localhost (localhost.jg8oom.jl1zcf.prug.or.jp [127.0.0.1])
	by kiss.jg8oom.jl1zcf.prug.or.jp (8.9.3/3.7W-99112300) with ESMTP id CAA07143;
	Tue, 29 Feb 2000 02:03:51 +0900 (JST)
To: ports-jp@jp.freebsd.org
Cc: nabe@mobile.icc.titech.ac.jp
Content-Type: Multipart/Mixed;
 boundary="--Next_Part(Tue_Feb_29_02:00:37_2000_518)--"
Content-Transfer-Encoding: 7bit
X-Mailer: Mew version 1.94.1 on XEmacs 21.1 (Bryce Canyon)
Mime-Version: 1.0
Message-Id: <20000229020349C.nabe@mail.mobile.icc.titech.ac.jp>
Date: Tue, 29 Feb 2000 02:03:49 +0900
From: Shingo WATANABE / =?ISO-2022-JP?B?GyRCRU9KVRsoQiA=?=
	=?ISO-2022-JP?B?GyRCPy04YxsoQg==?= <nabe@mobile.icc.titech.ac.jp>
X-Dispatcher: imput version 990905(IM130)
Lines: 127
Reply-To: ports-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+990727
X-Sequence: ports-jp 9024
Subject: [ports-jp 9024] patch for okphone
Errors-To: owner-ports-jp@jp.freebsd.org
Sender: owner-ports-jp@jp.freebsd.org
X-Originator: nabe@mobile.icc.titech.ac.jp

----Next_Part(Tue_Feb_29_02:00:37_2000_518)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit

$B$o$?$J$Y!wEl9)Bg$G$9!#(B

$B$:$C$HA0$K:n$C$?(B okphone $B$X$N%Q%C%A$G$9!#(Bports $B$K$O4^$^$l$F$$$J$$$h$&$J(B
$B$N$G!"$h$m$7$1$l$P2C$($F>e$2$F2<$5$$!#(B

32 $BJ8;z0J>e$N%[%9%HL>$,$D$$$F$k%3%s%T%e!<%?$G!"@5>o$K(B phone $B$9$k$?$a$N%Q%C(B
$B%A$G$9!#$3$l$,L5$$$H(B phone $B=PMh$J$$$N$G$9!#(B

$B$3$N(B ML $B$,ITE,@Z$G$7$?$i!";XE&$NDx$h$m$7$/$*4j$$$7$^$9!#(B
$B$A$J$_$K!";d$O$3$N(B ML $B$KF~$C$F$J$$$N$G(B Cc: $B$7$F$*$$$FD:$1$k$H=u$+$j$^$9!#(B


----Next_Part(Tue_Feb_29_02:00:37_2000_518)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="okphone.diff"

diff -ur okphone-1.2/client/main.c okphone-1.2.work/client/main.c
--- okphone-1.2/client/main.c	Wed Jul 15 21:43:23 1998
+++ okphone-1.2.work/client/main.c	Wed Jul 15 22:12:42 1998
@@ -3,13 +3,14 @@
 #include <stdio.h>
 #include <signal.h>
 #include <errno.h>
+#include <sys/param.h>
 
 #define	toggle(var)	var = !var
 
 struct	sockaddr_in	locaddr;	/* our own host address */
 char	buf[BUFFER];			/* general purpose character buffer */
 char	convaddr[25];			/* address of our conversation in ascii */
-char	host[32];				/* local host name */
+char	host[MAXHOSTNAMELEN];				/* local host name */
 char	realname[100];			/* user's real name from password file */
 extern	int users;				/* number of users connected - from windows.c */
 int		pending;				/* number of pending calls */
diff -ur okphone-1.2/client/names.c okphone-1.2.work/client/names.c
--- okphone-1.2/client/names.c	Fri Dec 15 18:30:09 1989
+++ okphone-1.2.work/client/names.c	Wed Jul 15 21:23:21 1998
@@ -3,6 +3,7 @@
 #include <netdb.h>
 #include <stdio.h>
 #include <pwd.h>
+#include <sys/param.h>
 
 #undef	NULL
 #define	NULL ((char *) 0)
@@ -67,7 +68,7 @@
 		tty += 5;	/* skip over "/dev/" */
  
 	/* find out about our host */
-	gethostname (host, 32);
+	gethostname (host, MAXHOSTNAMELEN);
 	if ((hp = gethostbyname ("localhost")) == (struct hostent *) 0)
 		if ((hp = gethostbyname (host)) == (struct hostent *) 0) {
 			fprintf (stderr, "Cannot find network entry for %s\n", host);
diff -ur okphone-1.2/conv/convd.c okphone-1.2.work/conv/convd.c
--- okphone-1.2/conv/convd.c	Wed Jul 15 21:43:23 1998
+++ okphone-1.2.work/conv/convd.c	Wed Jul 15 22:11:05 1998
@@ -44,6 +44,7 @@
 #include <sys/ioctl.h>
 #include <syslog.h> /* fix */
 #include <errno.h>
+#include <sys/param.h>
 
 #define BUFFER    128				/* size of char buffer to use     */
 #define MAXSLOTS  32                /* max users/conversation         */
@@ -410,10 +411,10 @@
 	extern int  sys_nerr;
 	char   buf[128];
 	char   mesg[256];
-	char   host[32];
+	char   host[MAXHOSTNAMELEN];
 	int    s;
 
-	gethostname (host, 32);
+	gethostname (host, MAXHOSTNAMELEN);
 
 	sprintf (mesg, "\nMessage from phone conversation daemon @ %s:\n", host);
 
Only in okphone-1.2.work: make.log
diff -ur okphone-1.2/master/defs.h okphone-1.2.work/master/defs.h
--- okphone-1.2/master/defs.h	Fri Dec 15 18:30:13 1989
+++ okphone-1.2.work/master/defs.h	Wed Jul 15 21:25:30 1998
@@ -13,6 +13,7 @@
 #include <netinet/in.h>
 #include <stdio.h>
 #include <errno.h>
+#include <sys/param.h>
 
 #define SOCKADDR	struct sockaddr_in    /* shorter to type */
 
@@ -56,7 +57,7 @@
 INV     *lookup();
 
 #define SIZ 512
-char    host[32];               /* name of this host */
+char    host[MAXHOSTNAMELEN];               /* name of this host */
 char	buf[SIZ];				/* general-purpose buffer */
 extern	int errno;
 int		misc;					/* socket used to send out */
diff -ur okphone-1.2/master/main.c okphone-1.2.work/master/main.c
--- okphone-1.2/master/main.c	Fri Dec 15 18:30:14 1989
+++ okphone-1.2.work/master/main.c	Wed Jul 15 21:35:13 1998
@@ -17,6 +17,7 @@
 #include <netdb.h>
 #include <sys/time.h>	/* fix */
 #include <sys/types.h>	/* fix */
+#include <sys/param.h>
 
 #ifdef FORK
 #include <sys/ioctl.h>
@@ -117,7 +118,7 @@
 
 	signal (SIGCHLD, sigchld);
 	signal (SIGALRM, ring);
-	gethostname (host, 32);
+	gethostname (host, MAXHOSTNAMELEN);
 
 	if ((hp = gethostbyname (host)) == (struct hostent *) 0) {
 		fprintf (stderr, "%s: cannot find my own address!!!\n", argv[0]);

----Next_Part(Tue_Feb_29_02:00:37_2000_518)----
