aboutsummaryrefslogtreecommitdiff
path: root/japanese/FreeWnn-server/files/patch-ab
blob: 92af97ad29337b4818c25a9fba51e550b8e34b37 (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
--- ./Wnn/jserver/de.c.orig	Fri Aug 19 10:31:23 1994
+++ ./Wnn/jserver/de.c	Fri Aug  1 18:54:55 1997
@@ -65,6 +65,9 @@
 
 #include <sys/ioctl.h>
 
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
+#include <sys/param.h>
+#endif
 #ifdef SYSVR2
 #include <sys/param.h>
 #ifndef SIGCHLD
@@ -264,7 +267,16 @@
 	fclose(stdin);
 	fclose(stdout);
 	if(!noisy){
+#if !(defined(BSD) && (BSD >= 199306)) /* !4.4BSD-Lite by Taoka */
 	    fclose(stderr);
+#else /* 4.4BSD-Lite */
+	    int fd = open("/dev/null", O_WRONLY);
+	    if (fd < 0) {
+		xerror("Cannot open /dev/null\n");
+	    }
+	    dup2(fd, 2);
+	    close(fd);
+#endif /* 4.4BSD-Lite */
 	}
 
 #if defined(hpux) || defined(SOLARIS)