move to new auth checks. Add "a few" includes to placate a lot of warnings.

(and bump affected packages of course)
This commit is contained in:
espie 2015-07-25 16:47:12 +00:00
parent cdf0db34ce
commit 703062122e
32 changed files with 561 additions and 87 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.76 2015/07/23 10:02:08 espie Exp $
# $OpenBSD: Makefile,v 1.77 2015/07/25 16:47:12 espie Exp $
COMMENT-main = Japanese input method
COMMENT-dict = dictionaries for Japanese Wnn
@ -16,19 +16,19 @@ CATEGORIES = japanese
MULTI_PACKAGES = -main -dict -zh -zhdict -ko -kodict -xwnmo -data
PKGNAME-main = ja-Wnn-4.2
REVISION-main = 11
REVISION-main = 12
PKGNAME-dict = ja-Wnndict-4.2
REVISION-dict = 0
PKGNAME-zh = zh-Wnn-4.2
REVISION-zh = 5
REVISION-zh = 6
PKGNAME-zhdict = zh-Wnndict-4.2
REVISION-zhdict = 0
PKGNAME-ko = ko-Wnn-4.2
REVISION-ko = 5
REVISION-ko = 6
PKGNAME-kodict = ko-Wnndict-4.2
REVISION-kodict = 0
PKGNAME-xwnmo = Wnn-xwnmo-4.2
REVISION-xwnmo = 6
REVISION-xwnmo = 7
PKGNAME-data = Wnn-data-4.2
WNNDICBASE = /var

View File

@ -0,0 +1,35 @@
$OpenBSD: patch-Wnn_etc_msg_c,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Wnn/etc/msg.c.orig Fri Jul 24 10:36:54 2015
+++ Wnn/etc/msg.c Fri Jul 24 10:41:00 2015
@@ -50,12 +50,12 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include "commonhd.h"
#include "wnn_os.h"
#include "msg.h"
-extern char *getenv();
-
+#if 0
static char *
bsearch(ky, bs, nel, width, compar)
char *ky;
@@ -100,6 +100,7 @@ int (*compar)();
}
return ((char *) 0); /* not found */
}
+#endif
static char *
getlang(lang)
@@ -361,7 +362,7 @@ char *msg;
register char *lang;
{
register struct msg_cat *cd;
- char ret[128];
+ static char ret[128];
register char *msg_bd;
if(catd == 0)

View File

@ -1,6 +1,6 @@
--- Wnn/etc/pwd.c.orig Tue Sep 22 06:29:26 1992
+++ Wnn/etc/pwd.c Thu Jul 23 11:40:07 2015
@@ -59,7 +59,9 @@
+++ Wnn/etc/pwd.c Fri Jul 24 10:26:59 2015
@@ -59,34 +59,16 @@
#endif
extern char *crypt();
@ -10,24 +10,39 @@
#ifdef JS
static
#endif
@@ -84,9 +86,9 @@ char *src, *encd;
c += 6;
xx[i] = c;
}
void
-new_pwd(src, encd)
-char *src, *encd;
+new_pwd(char *src, char *encd)
{
- int i, x,c;
- char xx[2];
- char *cr;
-
- if(encd == NULL)encd = src;
- if(strcmp(src, "") == 0){ bzero(encd, WNN_PASSWD_LEN);return;}
- x = time(NULL);
- xx[0] = x & 0x3f;
- xx[1] = (x & 0x3f00) >> 8;
- for (i = 0; i < 2; i++) {
- c = xx[i] + '.';
- if (c > '9')
- c += 7;
- if (c > 'Z')
- c += 6;
- xx[i] = c;
- }
- cr = crypt(src, xx);
+ cr = crypt(src, salt);
bzero(encd, WNN_PASSWD_LEN);
- bzero(encd, WNN_PASSWD_LEN);
- strncpy(encd, cr, WNN_PASSWD_LEN);
+ strncpy(encd, cr + sizeof(salt), WNN_PASSWD_LEN);
+ crypt_newhash(src, NULL, encd, WNN_PASSWD_LEN);
}
#ifdef JS
@@ -97,5 +99,7 @@ check_pwd(src, encd)
@@ -97,5 +79,5 @@ check_pwd(src, encd)
char *src, *encd;
{
if(strcmp(encd, "") == 0) return(1); /* No passwd */
- return(!strncmp(encd, crypt(src, encd),WNN_PASSWD_LEN));
+ char *cr = crypt(src, salt);
+
+ return(!strncmp(encd, cr + sizeof(salt), WNN_PASSWD_LEN));
+ return crypt_checkpass(src, encd) == 0;
}

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-Wnn_etc_strings_c,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Wnn/etc/strings.c.orig Fri Jul 24 10:36:40 2015
+++ Wnn/etc/strings.c Fri Jul 24 10:36:47 2015
@@ -55,8 +55,6 @@
#include "commonhd.h"
#include "wnn_string.h"
-#define NULL 0
-
#define is_half_width(c) (! is_full_width(c))
#define is_full_width(c) (((c) & 0xff00))
#define is_gaiji(c) (is_full_width(c) && ! ((c) & 0x8080))

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-Wnn_include_jslib_h,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Wnn/include/jslib.h.orig Fri Jul 24 10:24:36 2015
+++ Wnn/include/jslib.h Fri Jul 24 10:24:55 2015
@@ -179,7 +179,7 @@ typedef struct wnn_env_info WNN_ENV_INFO;
#define WNN_COMMENT_LEN 512 /* jisho no comment no nagasa */
#define WNN_F_NAMELEN 100
-#define WNN_PASSWD_LEN 16 /* File Passwd Length */
+#define WNN_PASSWD_LEN 61 /* blowfish password */
struct wnn_dic_info {

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-Wnn_include_wnn_malloc_h,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Wnn/include/wnn_malloc.h.orig Mon Sep 16 23:30:10 1991
+++ Wnn/include/wnn_malloc.h Sat Jul 25 17:12:43 2015
@@ -50,6 +50,7 @@
#ifndef WNN_MALLOC
#define WNN_MALLOC
+#if 0
extern char *malloc0();
extern void free0();
extern char *realloc0();
@@ -57,4 +58,6 @@ extern char *realloc0();
#define malloc(s) malloc0(s)
#define free(p) free0(p)
#define realloc(p,s) realloc0(p,s)
+#endif
+#include <stdlib.h>
#endif /* WNN_MALLOC */

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-Wnn_jlib_jl_c,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Wnn/jlib/jl.c.orig Fri Jul 24 10:40:18 2015
+++ Wnn/jlib/jl.c Fri Jul 24 10:40:33 2015
@@ -55,6 +55,7 @@
#include "commonhd.h"
#include "config.h"
#include <stdio.h>
+#include <stdlib.h>
#include <sys/types.h>
#ifdef SYSVR2
# include <string.h>

View File

@ -1,12 +1,40 @@
$OpenBSD: patch-Wnn_jlib_js_c,v 1.1 2000/04/16 21:53:31 espie Exp $
$OpenBSD: patch-Wnn_jlib_js_c,v 1.2 2015/07/25 16:47:12 espie Exp $
--- Wnn/jlib/js.c.orig Fri Aug 19 03:30:48 1994
+++ Wnn/jlib/js.c Thu Apr 13 20:41:38 2000
@@ -221,7 +221,7 @@ register char *lang;
+++ Wnn/jlib/js.c Fri Jul 24 11:01:24 2015
@@ -71,8 +71,7 @@ extern Variables
*/
-extern char *malloc();
-
+#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#ifdef UX386
@@ -104,8 +103,6 @@ extern int errno;
#include "../etc/bdic.c"
#include "../etc/pwd.c"
-char *malloc();
-
#ifdef SYSVR2
#define bzero(adr,n) memset((adr),0,(n))
#endif
@@ -221,7 +218,7 @@ register char *lang;
#endif
return -1;
}
- if (connect(sd,(caddr_t)&saddr,strlen(saddr.sun_path)+sizeof(saddr.sun_family)) == ERROR) {
+ if (connect(sd,(caddr_t)&saddr,SUN_LEN(&saddr)) == ERROR) {
+ if (connect(sd,(void *)&saddr,SUN_LEN(&saddr)) == ERROR) {
#if DEBUG
xerror("jslib:Can't connect socket.\n");
@@ -294,7 +291,7 @@ register int timeout;
signal(SIGALRM, connect_timeout);
alarm(timeout);
}
- ret = connect(sd, (caddr_t)&saddr_in, sizeof(saddr_in));
+ ret = connect(sd, (void *)&saddr_in, sizeof(saddr_in));
if (timeout != 0 && timeout > 0) {
alarm(0);
signal(SIGALRM, SIG_IGN);

View File

@ -1,9 +1,18 @@
$OpenBSD: patch-Wnn_jserver_de_c,v 1.1 2000/04/16 21:53:31 espie Exp $
$OpenBSD: patch-Wnn_jserver_de_c,v 1.2 2015/07/25 16:47:12 espie Exp $
--- Wnn/jserver/de.c.orig Fri Aug 19 03:31:23 1994
+++ Wnn/jserver/de.c Thu Apr 13 20:41:38 2000
@@ -65,6 +65,9 @@ extern int errno; /* Pure BSD */
+++ Wnn/jserver/de.c Fri Jul 24 10:33:32 2015
@@ -61,10 +61,16 @@
#include <ctype.h>
#include <errno.h>
-extern int errno; /* Pure BSD */
-
+#include <stdlib.h>
+#include <errno.h>
#include <sys/ioctl.h>
+#include <sys/select.h>
+#include <time.h>
+#include <sys/socket.h>
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
+#include <sys/param.h>
@ -11,7 +20,16 @@ $OpenBSD: patch-Wnn_jserver_de_c,v 1.1 2000/04/16 21:53:31 espie Exp $
#ifdef SYSVR2
#include <sys/param.h>
#ifndef SIGCHLD
@@ -264,7 +267,16 @@ char **argv;
@@ -187,7 +193,7 @@ int get2_cur();
char cmd_name[80];
/* No arguments are used. Only options. */
-void
+int
main(argc, argv)
int argc;
char **argv;
@@ -264,7 +270,16 @@ char **argv;
fclose(stdin);
fclose(stdout);
if(!noisy){

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-Wnn_jserver_error_c,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Wnn/jserver/error.c.orig Fri Jul 24 10:33:44 2015
+++ Wnn/jserver/error.c Fri Jul 24 10:34:05 2015
@@ -55,6 +55,8 @@
#include "commonhd.h"
#include "de_header.h"
#include <pwd.h>
+#include <stdlib.h>
+#include <time.h>
extern int errno;

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-Wnn_jserver_malloc_c,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Wnn/jserver/malloc.c.orig Sat Jul 25 17:10:54 2015
+++ Wnn/jserver/malloc.c Sat Jul 25 17:11:24 2015
@@ -50,14 +50,7 @@
*/
#include <stdio.h>
#include "wnn_malloc.h"
-#undef malloc
-#undef realloc
-#undef free
-
-extern char *malloc();
-extern void free();
-extern char *realloc();
-extern char *calloc();
+#include <stdlib.h>
char *
malloc0(size)

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-Wnn_jserver_readfile_c,v 1.1 2000/04/16 21:53:31 espie Exp $
$OpenBSD: patch-Wnn_jserver_readfile_c,v 1.2 2015/07/25 16:47:12 espie Exp $
--- Wnn/jserver/readfile.c.orig Fri Sep 25 00:35:47 1992
+++ Wnn/jserver/readfile.c Thu Apr 13 20:41:39 2000
+++ Wnn/jserver/readfile.c Sat Jul 25 17:14:22 2015
@@ -423,6 +423,7 @@ struct JT *jt2;
jt2 = (struct JT *)malloc(sizeof(struct JT));

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-Wnn_jutil_atod_c,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Wnn/jutil/atod.c.orig Tue Jun 28 04:07:27 1994
+++ Wnn/jutil/atod.c Fri Jul 24 18:35:08 2015
@@ -54,6 +54,8 @@ UJIS 形式を、辞書登録可能形式, 及び固定形式辞書に変換<E5A489>
#include <stdio.h>
#include <ctype.h>
+#include <string.h>
+#include <stdlib.h>
#include "commonhd.h"
#include "config.h"
#include "jslib.h"
@@ -113,7 +115,6 @@ struct uind1 *tary; /* index 1 */
int tnum = 0;
struct uind2 *uhopter;
-char *malloc();
char *hinsi_file_name = NULL;

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-Wnn_jutil_atof_c,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Wnn/jutil/atof.c.orig Sat Jul 25 17:03:20 2015
+++ Wnn/jutil/atof.c Sat Jul 25 17:03:47 2015
@@ -125,6 +125,7 @@ static char *rcs_id = "$Id: atof.c,v 1.5 1994/06/28 02
#include <stdio.h>
+#include <stdlib.h>
#include "commonhd.h"
#include "hinsi.h"
#include "jslib.h"

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-Wnn_jutil_atorev_c,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Wnn/jutil/atorev.c.orig Fri Jul 24 18:32:12 2015
+++ Wnn/jutil/atorev.c Fri Jul 24 18:32:29 2015
@@ -54,6 +54,7 @@ UJIS 形式を、逆変換可能形式に変換するプログラム。
#include <stdio.h>
#include <ctype.h>
+#include <stdlib.h>
#include "commonhd.h"
#include "jslib.h"
#include "jh.h"

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-Wnn_jutil_dtoa_c,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Wnn/jutil/dtoa.c.orig Fri Jul 24 18:33:04 2015
+++ Wnn/jutil/dtoa.c Fri Jul 24 18:33:27 2015
@@ -53,6 +53,8 @@ static char *rcs_id = "$Id: dtoa.c,v 1.9 1994/06/28 02
*/
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include "commonhd.h"
#include "config.h"
#include "jslib.h"

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-Wnn_jutil_ujisf_c,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Wnn/jutil/ujisf.c.orig Sat Jul 25 17:04:27 2015
+++ Wnn/jutil/ujisf.c Sat Jul 25 17:04:44 2015
@@ -55,6 +55,7 @@
int wnnerror;
#include <stdio.h>
+#include <stdlib.h>
#include "commonhd.h"
#include "jslib.h"
#include "jh.h"

View File

@ -1,7 +1,15 @@
$OpenBSD: patch-Wnn_jutil_wddel_c,v 1.1 2014/03/23 17:22:45 espie Exp $
--- Wnn/jutil/wddel.c.orig Sun Mar 23 18:10:08 2014
+++ Wnn/jutil/wddel.c Sun Mar 23 18:10:25 2014
@@ -199,7 +199,7 @@ char **argv;
$OpenBSD: patch-Wnn_jutil_wddel_c,v 1.2 2015/07/25 16:47:12 espie Exp $
--- Wnn/jutil/wddel.c.orig Mon Nov 30 08:35:07 1992
+++ Wnn/jutil/wddel.c Sat Jul 25 17:05:26 2015
@@ -53,6 +53,7 @@ static char *rcs_id = "$Id: wddel.c,v 1.5 1992/11/30 0
*/
#include <stdio.h>
+#include <stdlib.h>
#include "commonhd.h"
#include "config.h"
#include "jllib.h"
@@ -199,7 +200,7 @@ char **argv;
fprintf(stderr, "The specified dictionary isn't registable\n");
exit(1);
}

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-Wnn_jutil_wdreg_c,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Wnn/jutil/wdreg.c.orig Sat Jul 25 17:04:55 2015
+++ Wnn/jutil/wdreg.c Sat Jul 25 17:05:08 2015
@@ -53,6 +53,7 @@ static char *rcs_id = "$Id: wdreg.c,v 1.5 1992/11/30 0
*/
#include <stdio.h>
+#include <stdlib.h>
#include <sys/types.h>
#include <sys/file.h>
#include "commonhd.h"

View File

@ -1,7 +1,15 @@
$OpenBSD: patch-Wnn_jutil_wnnstat_c,v 1.1 2000/04/16 21:53:31 espie Exp $
--- Wnn/jutil/wnnstat.c.orig Thu Apr 13 20:41:34 2000
+++ Wnn/jutil/wnnstat.c Thu Apr 13 20:41:39 2000
@@ -69,7 +69,7 @@ struct wnn_ret_buf rb = {0, NULL};
$OpenBSD: patch-Wnn_jutil_wnnstat_c,v 1.2 2015/07/25 16:47:12 espie Exp $
--- Wnn/jutil/wnnstat.c.orig Fri Jul 24 10:31:15 2015
+++ Wnn/jutil/wnnstat.c Fri Jul 24 10:44:41 2015
@@ -49,6 +49,7 @@ static char *rcs_id = "$Id: wnnstat.c,v 1.15 1994/06/2
/* Version 4.0
*/
#include <stdio.h>
+#include <stdlib.h>
#include "jslib.h"
#include "jllib.h"
#include "jd_sock.h"
@@ -69,7 +70,7 @@ struct wnn_ret_buf rb = {0, NULL};
#define W_DIC_ALL 5
#define W_VERSION 6
@ -10,7 +18,7 @@ $OpenBSD: patch-Wnn_jutil_wnnstat_c,v 1.1 2000/04/16 21:53:31 espie Exp $
extern int eujis_to_jis8(), eujis_to_sjis();
#endif
#ifdef CHINESE
@@ -129,13 +129,13 @@ char **argv;
@@ -129,13 +130,13 @@ char **argv;
strcpy(lang, WNN_DEFAULT_LANG);
#ifdef JAPANESE
@ -27,7 +35,7 @@ $OpenBSD: patch-Wnn_jutil_wnnstat_c,v 1.1 2000/04/16 21:53:31 espie Exp $
#endif
switch(c){
case 'w':
@@ -317,13 +317,13 @@ static void
@@ -317,13 +318,13 @@ static void
usage()
{
#ifdef JAPANESE

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-Wnn_jutil_wnntouch_c,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Wnn/jutil/wnntouch.c.orig Sat Jul 25 17:03:57 2015
+++ Wnn/jutil/wnntouch.c Sat Jul 25 17:04:12 2015
@@ -53,6 +53,7 @@ static char *rcs_id = "$Id: wnntouch.c,v 1.3 1992/09/2
*/
#include <stdio.h>
+#include <stdlib.h>
#include "jslib.h"
#include "commonhd.h"

View File

@ -0,0 +1,28 @@
$OpenBSD: patch-Wnn_uum_history_c,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Wnn/uum/history.c.orig Tue Nov 26 07:48:10 1991
+++ Wnn/uum/history.c Fri Jul 24 17:55:20 2015
@@ -49,6 +49,7 @@
/* Version 4.0
*/
#include <stdio.h>
+#include <stdlib.h>
#include "commonhd.h"
#include "sdefine.h"
#include "sheader.h"
@@ -73,7 +74,6 @@ static void set_up_history();
int
init_history()
{
- char *malloc();
int size1;
char *area_pter;
@@ -108,8 +108,6 @@ make_history(wstr, n)
register w_char *wstr;
register int n;
{
- extern char *malloc();
-
if (!history_cunt)
return(0);
if (n <= 0 || n > maxchg || *wstr == NULL)

View File

@ -1,7 +1,15 @@
$OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
--- Wnn/uum/jhlp.c.orig Sun Dec 8 16:18:39 2013
+++ Wnn/uum/jhlp.c Sun Dec 8 17:24:56 2013
@@ -80,6 +80,9 @@ struct passwd *getpwuid();
$OpenBSD: patch-Wnn_uum_jhlp_c,v 1.5 2015/07/25 16:47:12 espie Exp $
--- Wnn/uum/jhlp.c.orig Fri Jul 24 17:43:06 2015
+++ Wnn/uum/jhlp.c Fri Jul 24 18:05:03 2015
@@ -49,6 +49,7 @@ static char *rcs_id = "$Id: jhlp.c,v 1.40 1994/08/19 0
/* Version 4.0
*/
#include <stdio.h>
+#include <stdlib.h>
#include <signal.h>
#include "jllib.h"
#include "commonhd.h"
@@ -80,6 +81,9 @@ struct passwd *getpwuid();
jmp_buf kk_env;
@ -11,7 +19,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
#ifdef SYSVR2
# include <sys/param.h>
#endif /* SYSVR2 */
@@ -88,9 +91,21 @@ jmp_buf kk_env;
@@ -88,9 +92,21 @@ jmp_buf kk_env;
# include <sys/wait.h>
#endif /* HAVE_WAIT3 */
@ -34,7 +42,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
#ifdef SYSVR2
#ifdef TERMINFO
@@ -101,7 +116,7 @@ jmp_buf kk_env;
@@ -101,7 +117,7 @@ jmp_buf kk_env;
#if defined(SVR4) || defined(hpux) || defined(sgi)
#include <sys/termio.h>
#endif
@ -43,7 +51,25 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
#include <termios.h>
#endif
@@ -166,14 +181,14 @@ char **argv;
@@ -137,7 +153,7 @@ extern int errno;
extern char *optarg;
extern int optind;
-extern char *ttyname(), *malloc(), *getenv();
+extern char *ttyname();
static void save_signals();
static void restore_signals();
@@ -148,7 +164,7 @@ static void do_end(), open_pty(), open_ttyp(), do_main
change_size(), default_usage();
/** メイン */
-void
+int
main(argc, argv)
int argc;
char **argv;
@@ -166,14 +182,14 @@ char **argv;
flow_control = FLOW_CONTROL;
code_trans = default_code_trans;
@ -61,7 +87,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
for (;i < argc; i++) {
argv[i - 2] = argv[i];
}
@@ -185,12 +200,7 @@ char **argv;
@@ -185,12 +201,7 @@ char **argv;
if(*lang_dir == '\0') {
if ((p = getenv("LANG")) != NULL) {
@ -75,7 +101,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
}
}
for (f = function_db; *lang_dir && f && f->lang; f++) {
@@ -233,8 +243,8 @@ char **argv;
@@ -233,8 +244,8 @@ char **argv;
server_env = WNN_DEF_SERVER_ENV;
}
if(name = getenv(server_env)) {
@ -86,7 +112,25 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
}
}
@@ -263,9 +273,11 @@ char **argv;
@@ -244,7 +255,7 @@ char **argv;
}
if((p = getenv(WNN_COUNTDOWN_ENV)) == NULL) {
- setenv(WNN_COUNTDOWN_ENV,"0");
+ setenv(WNN_COUNTDOWN_ENV,"0", 1);
} else if (atoi(p) <= 0) {
puteustring(MSG_GET(4), stdout);
/*
@@ -253,7 +264,7 @@ char **argv;
exit(126);
} else {
sprintf(p,"%d",atoi(p) - 1);
- setenv(WNN_COUNTDOWN_ENV,p);
+ setenv(WNN_COUNTDOWN_ENV,p, 1);
}
if((tname = getenv("TERM")) == NULL) {
@@ -263,9 +274,11 @@ char **argv;
#if defined(BSD42) && !defined(DGUX)
@ -98,7 +142,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
#endif /* BSD42 */
@@ -312,7 +324,7 @@ char **argv;
@@ -312,7 +325,7 @@ char **argv;
#endif /* TERMCAP */
open_pty();
@ -107,7 +151,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
open_ttyp();
#endif
exec_cmd(argv);
@@ -492,7 +504,7 @@ static int do_X_opt()
@@ -492,7 +505,7 @@ static int do_X_opt()
static int do_k_opt()
{
@ -116,7 +160,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
if (*uumkey_name_in_uumrc == '\0') {
return -1;
}
@@ -502,7 +514,7 @@ static int do_k_opt()
@@ -502,7 +515,7 @@ static int do_k_opt()
static int do_c_opt()
{
@ -125,7 +169,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
if (*convkey_name_in_uumrc == '\0') {
return -1;
}
@@ -512,7 +524,7 @@ static int do_c_opt()
@@ -512,7 +525,7 @@ static int do_c_opt()
static int do_r_opt()
{
@ -134,7 +178,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
if (*rkfile_name_in_uumrc == '\0') {
return -1;
}
@@ -528,8 +540,8 @@ static int do_l_opt()
@@ -528,8 +541,8 @@ static int do_l_opt()
static int do_D_opt()
{
@ -145,7 +189,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
if (*def_servername == '\0') {
return -1;
}
@@ -538,7 +550,7 @@ static int do_D_opt()
@@ -538,7 +551,7 @@ static int do_D_opt()
static int do_n_opt()
{
@ -154,7 +198,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
if (*username == '\0') {
return -1;
}
@@ -581,14 +593,14 @@ char **argv;
@@ -581,14 +594,14 @@ char **argv;
#endif /* SYSVR2 */
extern char *index();
@ -173,7 +217,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
usage(ostr);
}
}
@@ -600,7 +612,7 @@ char **argv;
@@ -600,7 +613,7 @@ char **argv;
/** tty に対する ioctl のセット */
@ -182,7 +226,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
struct sgttyb savetmio;
/*
struct sgttyb ttyb =
@@ -642,11 +654,11 @@ j_term_init()
@@ -642,11 +655,11 @@ j_term_init()
}
#endif /* BSD42 */
@ -197,7 +241,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
IGNBRK | ICRNL | IXON, /* c_iflag */
ONLCR | OPOST, /* c_oflag */
B9600 | CS8 | CSTOPB | CREAD | CLOCAL, /* c_cflag */
@@ -678,13 +690,13 @@ get_rubout()
@@ -678,13 +691,13 @@ get_rubout()
int
j_term_init()
{
@ -213,7 +257,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
buf1.c_lflag &= ~(ECHONL | ECHOK | ECHOE | ECHO | XCASE | ICANON | ISIG);
buf1.c_iflag = 0;
buf1.c_oflag &= ~OPOST;
@@ -705,7 +717,7 @@ j_term_init()
@@ -705,7 +718,7 @@ j_term_init()
buf1.c_cc[VEOF] = 1; /* cf. ICANON */
buf1.c_cc[VEOL] = 0;
#endif /* linux */
@ -222,7 +266,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
fprintf(stderr, "error in ioctl TCSETA.\n");
exit(1);
}
@@ -764,14 +776,15 @@ intfntype
@@ -764,14 +777,15 @@ intfntype
chld_handler()
{
#ifdef HAVE_WAIT3
@ -243,7 +287,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
if (WIFSTOPPED(status)) {
#ifdef SIGCONT
kill(pid, SIGCONT);
@@ -1107,7 +1120,7 @@ char **argv;
@@ -1107,7 +1121,7 @@ char **argv;
#ifdef BSD42
int pid;
#endif
@ -252,7 +296,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
struct winsize win;
extern Term_RowWidth,crow;
#endif
@@ -1140,16 +1153,18 @@ char **argv;
@@ -1140,16 +1154,18 @@ char **argv;
setpgrp(0, pid);
#endif /* BSD42 */
@ -273,7 +317,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
dup2(ttypfd, 0);
dup2(ttypfd, 1);
dup2(ttypfd, 2);
@@ -1187,7 +1202,7 @@ char **argv;
@@ -1187,7 +1203,7 @@ char **argv;
err("Can't set utmp.");
}
*/
@ -282,7 +326,23 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
crow = win.ws_row = Term_RowWidth = win.ws_row - conv_lines;
ioctl(ttyfd, TIOCSWINSZ, &win);
setgid(getgid());
@@ -1342,7 +1357,7 @@ open_ttyp()
@@ -1198,6 +1214,7 @@ char **argv;
}
}
+#if 0
/** 環境変数のセット */
void
setenv(var, value)
@@ -1234,6 +1251,7 @@ char *value;
strcat(environ[i], "=");
strcat(environ[i], value);
}
+#endif
#ifdef SVR4
static int
@@ -1342,7 +1360,7 @@ open_ttyp()
chown(nmbuf, getuid(), getgid());
chmod(nmbuf, 0622);
#endif /* !linux */
@ -291,7 +351,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
ioctl(ttyfd, TIOCGETC, &tcharsv);
ioctl(ttyfd, TIOCGLTC, &ltcharsv);
ioctl(ttyfd, TIOCGETP, &ttyb);
@@ -1446,11 +1461,23 @@ open_ttyp()
@@ -1446,11 +1464,23 @@ open_ttyp()
close(open(ttyname(ttypfd), O_WRONLY, 0));
*/
#endif /* defined(SYSVR2) && !defined(linux) */
@ -315,7 +375,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
}
/** pty のオープン */
@@ -1524,15 +1551,13 @@ do_end()
@@ -1524,15 +1554,13 @@ do_end()
signal(SIGCHLD, SIG_DFL);
fcntl(ttyfd, F_SETFL, 0);
@ -334,7 +394,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
fprintf(stderr, "error in ioctl TCSETA.\n");
exit(1);
}
@@ -1562,9 +1587,11 @@ do_end()
@@ -1562,9 +1590,11 @@ do_end()
perror(prog);
}
@ -346,7 +406,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
#ifdef TIOCSSIZE
pty_rowcol.ts_lines = 0;
pty_rowcol.ts_cols = 0;
@@ -1636,7 +1663,16 @@ ptyname(b, pty, no)
@@ -1636,7 +1666,16 @@ ptyname(b, pty, no)
char *b, *pty;
int no;
{
@ -363,7 +423,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
}
#endif /* !sgi */
@@ -1755,14 +1791,14 @@ change_size()
@@ -1755,14 +1794,14 @@ change_size()
if ((i = win.ws_row) != 0) {
crow = Term_RowWidth = i - conv_lines;
@ -380,7 +440,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
ioctl(ttypfd, TIOCSWINSZ, &win);
#else /* linux */
#ifdef TIOCSSIZE
@@ -1770,7 +1806,8 @@ change_size()
@@ -1770,7 +1809,8 @@ change_size()
pty_rowcol.ts_cols = maxlength; /* instead of columns */
ioctl(ttypfd, TIOCSSIZE, &pty_rowcol);
#endif /* TIOCSSIZE */
@ -390,7 +450,7 @@ $OpenBSD: patch-Wnn_uum_jhlp_c,v 1.4 2013/12/08 16:42:24 espie Exp $
{
int grp;
ioctl(ptyfd, TIOCGPGRP, &grp);
@@ -1781,7 +1818,6 @@ change_size()
@@ -1781,7 +1821,6 @@ change_size()
#endif
}
#endif /* sun */

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-Wnn_uum_setutmp_c,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Wnn/uum/setutmp.c.orig Fri Jul 24 10:42:23 2015
+++ Wnn/uum/setutmp.c Fri Jul 24 10:42:49 2015
@@ -49,6 +49,7 @@
/* Version 4.0
*/
#include <stdio.h>
+#include <string.h>
#include <sys/types.h>
#include <utmp.h>
#include <pwd.h>

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-Wnn_uum_sheader_h,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Wnn/uum/sheader.h.orig Fri Jul 24 17:54:53 2015
+++ Wnn/uum/sheader.h Fri Jul 24 17:55:11 2015
@@ -333,7 +333,6 @@ extern void set_screen_vars_default();
extern void set_keypad_on();
extern void set_keypad_off();
extern void set_scroll_region();
-extern void setenv();
extern int setutmp();
extern int st_colum();
extern void t_cont_line_note_delete();

View File

@ -1,7 +1,17 @@
$OpenBSD: patch-Wnn_uum_wnnrc_op_c,v 1.1 2000/04/16 21:53:32 espie Exp $
--- Wnn/uum/wnnrc_op.c.orig Sat Apr 15 21:28:33 2000
+++ Wnn/uum/wnnrc_op.c Sat Apr 15 21:31:43 2000
@@ -148,7 +148,7 @@ char *s;
$OpenBSD: patch-Wnn_uum_wnnrc_op_c,v 1.2 2015/07/25 16:47:12 espie Exp $
--- Wnn/uum/wnnrc_op.c.orig Fri Jul 24 10:31:15 2015
+++ Wnn/uum/wnnrc_op.c Fri Jul 24 10:44:10 2015
@@ -50,7 +50,8 @@
*/
/* uumrc operations */
-#include "stdio.h"
+#include <stdio.h>
+#include <stdlib.h>
#include <ctype.h>
#include <sys/errno.h>
#include <pwd.h>
@@ -148,7 +149,7 @@ char *s;
#endif /* defined(SYSVR2) && !defined(AIXV3) */
if(*s != '~' && *s != '@') {
@ -10,7 +20,7 @@ $OpenBSD: patch-Wnn_uum_wnnrc_op_c,v 1.1 2000/04/16 21:53:32 espie Exp $
*s = '\0';
noerr = 1;
}else{
@@ -160,7 +160,7 @@ char *s;
@@ -160,7 +161,7 @@ char *s;
#else
if(NULL != (p = strchr(++s1, '/'))){
#endif
@ -19,7 +29,7 @@ $OpenBSD: patch-Wnn_uum_wnnrc_op_c,v 1.1 2000/04/16 21:53:32 espie Exp $
*p = '\0';
} else *tmp = '\0';
/* ここまでは準備。s…先頭、s1…文字目、p…最初の'/'のあったところ
@@ -581,8 +581,8 @@ open_uumrc()
@@ -581,8 +582,8 @@ open_uumrc()
}
strcpy(buf, LIBDIR);
strcat(buf, "/");

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-Xwnmo_romkan_m_rk_alloc_c,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Xwnmo/romkan_m/rk_alloc.c.orig Sat Jul 25 17:02:12 2015
+++ Xwnmo/romkan_m/rk_alloc.c Sat Jul 25 17:02:27 2015
@@ -64,6 +64,7 @@
#endif /*MULTI*/
#endif
#include "rext.h"
+#include <stdlib.h>
static
void

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-Xwnmo_romkan_m_rk_main_c,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Xwnmo/romkan_m/rk_main.c.orig Fri Jul 24 18:31:11 2015
+++ Xwnmo/romkan_m/rk_main.c Fri Jul 24 18:31:32 2015
@@ -64,6 +64,7 @@
#endif /*MULTI*/
#endif
#include "rext.h"
+#include <stdlib.h>
#ifdef MULTI
#define DISOUT ((cur_rk->flags & RK_NONISE) ? cur_rk->rk_output : cur_rk->disout)

View File

@ -1,7 +1,15 @@
$OpenBSD: patch-Xwnmo_xwnmo_do_xjutil_c,v 1.1 2011/11/13 13:24:14 naddy Exp $
--- Xwnmo/xwnmo/do_xjutil.c.orig Sun Nov 13 06:08:50 2011
+++ Xwnmo/xwnmo/do_xjutil.c Sun Nov 13 06:09:04 2011
@@ -254,11 +254,7 @@ static void
$OpenBSD: patch-Xwnmo_xwnmo_do_xjutil_c,v 1.2 2015/07/25 16:47:12 espie Exp $
--- Xwnmo/xwnmo/do_xjutil.c.orig Tue Aug 23 10:16:57 1994
+++ Xwnmo/xwnmo/do_xjutil.c Fri Jul 24 18:29:45 2015
@@ -37,6 +37,7 @@
#ifdef USING_XJUTIL
#include <stdio.h>
+#include <stdlib.h>
#include <sys/wait.h>
#include <signal.h>
#include <X11/Xos.h>
@@ -254,11 +255,7 @@ static void
catch_sigchld()
{
XIMLangDataBase *ld;

View File

@ -1,7 +1,15 @@
$OpenBSD: patch-Xwnmo_xwnmo_jhlp_c,v 1.2 2013/12/08 16:42:24 espie Exp $
$OpenBSD: patch-Xwnmo_xwnmo_jhlp_c,v 1.3 2015/07/25 16:47:12 espie Exp $
--- Xwnmo/xwnmo/jhlp.c.orig Thu Aug 4 09:10:14 1994
+++ Xwnmo/xwnmo/jhlp.c Sun Dec 8 17:36:22 2013
@@ -89,12 +89,7 @@ static char rcs_id[] = "$Id: jhlp.c,v 1.26 1994/08/04
+++ Xwnmo/xwnmo/jhlp.c Sat Jul 25 17:00:53 2015
@@ -80,6 +80,7 @@ static char rcs_id[] = "$Id: jhlp.c,v 1.26 1994/08/04
/* Version 4.0
*/
#include <signal.h>
+#include <stdlib.h>
#include <pwd.h>
#include "commonhd.h"
#include "sdefine.h"
@@ -89,12 +90,7 @@ static char rcs_id[] = "$Id: jhlp.c,v 1.26 1994/08/04
#include "config.h"
#include "ext.h"
@ -15,7 +23,7 @@ $OpenBSD: patch-Xwnmo_xwnmo_jhlp_c,v 1.2 2013/12/08 16:42:24 espie Exp $
extern char *optarg;
extern int optind;
@@ -238,7 +233,7 @@ char **argv;
@@ -238,7 +234,7 @@ char **argv;
/* get rubout_code */
#define UNDEF_STTY 0xff
@ -24,7 +32,7 @@ $OpenBSD: patch-Xwnmo_xwnmo_jhlp_c,v 1.2 2013/12/08 16:42:24 espie Exp $
static void
get_rubout()
{
@@ -253,13 +248,13 @@ get_rubout()
@@ -253,13 +249,13 @@ get_rubout()
}
#endif /* BSD42 */
@ -41,7 +49,7 @@ $OpenBSD: patch-Xwnmo_xwnmo_jhlp_c,v 1.2 2013/12/08 16:42:24 espie Exp $
(tmio.c_cc[VERASE] == UNDEF_STTY)) {
rubout_code = RUBOUT; /* BackSpase */
} else {
@@ -415,7 +410,6 @@ char **argv;
@@ -415,7 +411,6 @@ char **argv;
XLCd xlc;
#endif /* X11R5 */
extern char *get_server_env();

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-Xwnmo_xwnmo_killxwnmo_c,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Xwnmo/xwnmo/killxwnmo.c.orig Tue Oct 4 00:17:35 1994
+++ Xwnmo/xwnmo/killxwnmo.c Sat Jul 25 17:01:22 2015
@@ -33,6 +33,8 @@ static char rcs_id[] = "$Id: killxwnmo.c,v 1.3 1994/10
* kuwa%omron.co.jp@uunet.uu.net
*/
#include <signal.h>
+#include <stdlib.h>
+#include <string.h>
#include <pwd.h>
#include "wnn_os.h"
#include <X11/Xlib.h>
@@ -48,7 +50,7 @@ signal_catch()
exit(1);
}
-void
+int
main(argc, argv)
int argc;
char **argv;

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-Xwnmo_xwnmo_localalloc_c,v 1.1 2015/07/25 16:47:12 espie Exp $
--- Xwnmo/xwnmo/localalloc.c.orig Fri Jul 24 18:27:58 2015
+++ Xwnmo/xwnmo/localalloc.c Fri Jul 24 18:28:12 2015
@@ -49,7 +49,7 @@
#include "ext.h"
#endif /* XJUTIL */
-extern char *malloc(), *realloc(), *calloc();
+#include <stdlib.h>
#ifdef ALLOC_DEBUG
#define DEBUG_TBL_SIZE 10000
typedef struct _alloc_debug_struct {