aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/FreeWnn-lib/files/patch-ak
blob: 1181bb7434f6041440d76ec8463190a5c0d30faa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
--- ../Xsi.orig/Wnn/uum/jhlp.c  Fri Aug 19 10:32:12 1994
+++ ./Wnn/uum/jhlp.c    Fri Aug  1 18:54:18 1997
@@ -80,6 +80,9 @@
 
 jmp_buf kk_env;
 
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
+#include <sys/param.h>
+#endif
 #ifdef SYSVR2
 #  include <sys/param.h>
 #endif /* SYSVR2 */
@@ -263,9 +266,11 @@
 
 
 #if defined(BSD42) && !defined(DGUX)
+#if !(defined(BSD) && (BSD >= 199306))
     if (saveutmp() < 0) {
    puts("Can't save utmp\n");
     }
+#endif
 #endif /* BSD42 */
 
 
@@ -771,7 +776,12 @@
 #endif
     int pid;
 
-    if ((pid = wait3(&status, WNOHANG | WUNTRACED, NULL)) == child_id) {
+/*
+ * Remove warning.
+ * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)        1996/8/20
+ */
+/*  if ((pid = wait3(&status, WNOHANG | WUNTRACED, NULL)) == child_id) { */
+    if ((pid = wait3((int *)&status, WNOHANG | WUNTRACED, NULL)) == child_id) {
    if (WIFSTOPPED(status)) {
 #ifdef SIGCONT
        kill(pid, SIGCONT);
@@ -1140,9 +1150,11 @@
    setpgrp(0, pid);
 #endif /* BSD42 */
 
+#if !(defined(BSD) && (BSD >= 199306))
    if (setutmp(ttypfd) == ERROR) {
        puts("Can't set utmp.");
    } 
+#endif
 
 #ifdef linux
    setsid();
@@ -1562,9 +1574,11 @@
    perror(prog);
     }
 
+#if !(defined(BSD) && (BSD >= 199306))
     if (resetutmp(ttypfd) == ERROR) {
    printf("Can't reset utmp.");
     }
+#endif
 #ifdef TIOCSSIZE
     pty_rowcol.ts_lines = 0;
     pty_rowcol.ts_cols = 0;
@@ -1636,7 +1650,16 @@
 char *b, *pty;
 int no;
 {
+/*
+ * Change pseudo-devices.
+ * Because FreeBSD's master pseudo-devices are pty[p-sP-S][0-9a-v].
+ * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)        1996/8/20
+ */
+#if (defined(BSD) && (BSD >= 199306)) /* 4.4BSD-Lite by Taoka */
+    sprintf(b, "%s%1c%1c", pty, "pqrsPQRS"[(no >> 5)], ((no & 0x1f > 9)? 'a' : '0') + (no & 0x1f));
+#else /* ! 4.4BSD-Lite */
     sprintf(b, "%s%1c%1x", pty, 'p' + (no >> 4), no & 0x0f);
+#endif /* ! 4.4BSD-Lite */
 }
 #endif /* !sgi */