Subject: FVWM: fvwm-2.0.42: FvwmDebug: portability fix

From: まつしたまこと <[email-masked]>
Date: Mon, 29 Apr 1996 12:03:35 +0900

In NEWS-OS 4.x, there are no define/typedef for 'pid_t'. Here is a
patch to fix this, for FvwmDebug (too small:).

- -
Makoto `MAR_kun' MATSUSHITA

--- modules/FvwmDebug/FvwmDebug.h.dist	Wed Sep 14 03:24:41 1994
+++ modules/FvwmDebug/FvwmDebug.h	Mon Apr 29 11:58:19 1996
@@ -36,3 +36,6 @@
 #include "../../fvwm/sun_headers.h"
 #endif
 
+#ifdef sony_news
+typedef int pid_t;
+#endif
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: まつしたまこと <[email-masked]>
Date: Mon, 29 Apr 1996 12:22:45 +0900

Oops, there are more points to fix.

matusita> In NEWS-OS 4.x, there are no define/typedef for 'pid_
matusita> t'. Here is a patch to fix this, for FvwmDebug (too small:).

Also, setvbuf() and waitpid() is also NOT exists. Followings is the
RIGHT patch to fix portability probrem in FvwmDebug.

Sorry for confusing.

- -

--- modules/FvwmDebug/FvwmDebug.c.orig	Sat Mar  2 05:17:22 1996
+++ modules/FvwmDebug/FvwmDebug.c	Mon Apr 29 12:18:28 1996
@@ -62,7 +62,7 @@
   }
   else /* parent */
   {
-    if (waitpid(pid, NULL, WNOHANG) != pid)
+    if (ReapChildrenPid(pid) != pid)
     {
       dup2(PIPE[1], STDOUT_FILENO);
       dup2(PIPE[1], STDERR_FILENO);
--- modules/FvwmDebug/FvwmDebug.h.orig	Wed Sep 14 03:24:41 1994
+++ modules/FvwmDebug/FvwmDebug.h	Mon Apr 29 12:18:12 1996
@@ -36,3 +36,13 @@
 #include "../../fvwm/sun_headers.h"
 #endif
 
+#ifdef HAVE_WAITPID
+#define ReapChildrenPid(pid) waitpid(pid, NULL, WNOHANG)
+#else
+#define ReapChildrenPid(pid) wait4(pid, NULL, WNOHANG, NULL)
+#endif
+
+#ifdef sony_news
+typedef int pid_t;
+#define setvbuf(a,b,c,d) setlinebuf(a)
+#endif
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].