openbsd-ports/japanese/Wnn/patches/patch-Wnn_jserver_de_c
espie e8c9eaf450 Loads of changes, not quite finished yet.
- format man pages using new jgroff, so that we can install a full set
of documentation.
- move INSTALL script into a separate script, so that adding a new user
need not be done at the time of INSTALL.
- add a few strlcpy to fix a few holes. This stuff is rather bad, though.
- use terminfo instead of termcap, for better keycap names, fixing quite
a few bugs that made it impossible to build that version along the way...
- move scripts into /usr/local/bin instead of /usr/local/bin/Wnn4.

- use @comment no checksum
in packing list, even though pkg_add does not support that yet.
Not quite completely ready, but getting there...
2000-04-16 21:53:26 +00:00

31 lines
810 B
Plaintext

$OpenBSD: patch-Wnn_jserver_de_c,v 1.1 2000/04/16 21:53:31 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 */
#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 @@ char **argv;
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)