Here are patches to fix these issues.

First, the use of regexp.h as noted by the submitter.

Second, the use of 'union wait' which is apparently also unsupported
by the glibc in stretch.

Third, the manpage preprocessing error.  This is not actually a build
failure (which is presumably a bug in imake.)  And of course, using
'cpp' to preprocess man pages seems like an even worse idea than using
it to preprocess Makefiles.  But, just in case it'll make somebody
happy, here's a patch to fix that issue.
Description: Use POSIX regular expression API in olvwm.
 Do not use the regexp.h functions, which are not available in current
 glibc.

--- xview-3.2p1.4.orig/clients/olvwm-4.1/virtual.c
+++ xview-3.2p1.4/clients/olvwm-4.1/virtual.c
@@ -58,9 +58,19 @@ static regexp_err(int val);
 #define TRUE 1
 #define FALSE 0
 
+#if 1
+#include <regex.h>
+#define POSIX_REGEXP
+#else
 #include <regexp.h>
+#endif
+
 #ifdef REGEXP
 regexp *expbuf;
+#elif defined(POSIX_REGEXP)
+static regex_t expbuf;
+#else
+static char expbuf[256];
 #endif
 
 #ifdef IDENT
@@ -2146,14 +2156,14 @@ int val;
     }
 }
 
-static char expbuf[256];
-
 static
 rexMatch(string)
     char *string;
 {
 #ifdef REGEXP
     return regexec(expbuf, string);
+#elif defined(POSIX_REGEXP)
+    return !regexec(&expbuf, string, 0, NULL, 0);
 #else
     return step(string,expbuf);
 #endif
@@ -2191,6 +2201,8 @@ char newPattern[256];
     newPattern[j++] = '\0';
 #ifdef REGEXP
     expbuf = regcomp(newPattern);
+#elif defined(POSIX_REGEXP)
+    regcomp(&expbuf, newPattern, 0);
 #else
 #if defined(__linux__) && defined(__GLIBC__)
     /* See comment above.
Description: Use SysV/POSIX APIs/types in place of some old BSD ones.
 Notably, current glibc doesn't support 'union wait'.

--- xview-3.2p1.4.orig/clients/olvwm-4.1/olwm.c
+++ xview-3.2p1.4/clients/olvwm-4.1/olwm.c
@@ -708,7 +708,7 @@ handleChildSignal()
 void
 ReapChildren()
 {
-#ifdef SYSV
+#if defined(SYSV) || defined(__linux__)
         pid_t pid;
         int status;
 #else
@@ -720,7 +720,7 @@ ReapChildren()
 	if (!deadChildren)
 		return;
 
-#ifdef SYSV
+#if defined(SYSV) || defined(__linux__)
 	sighold(SIGCHLD);
 #else
 	oldmask = sigblock(sigmask(SIGCHLD));
@@ -730,7 +730,7 @@ ReapChildren()
 
 	while (1) {
 
-#ifdef SYSV
+#if defined(SYSV) || defined(__linux__)
                 pid = waitpid(-1, &status, WNOHANG);
 #else
                 pid = wait3(&status, WNOHANG, (struct rusage *)0);
@@ -757,7 +757,7 @@ ReapChildren()
 
 	deadChildren = False;
 
-#ifdef SYSV
+#if defined(SYSV) || defined(__linux__)
 	sigrelse(SIGCHLD);
 #else
         (void) sigsetmask(oldmask);
--- xview-3.2p1.4.orig/clients/olwm/olwm.c
+++ xview-3.2p1.4/clients/olwm/olwm.c
@@ -634,7 +634,7 @@ handleChildSignal()
 void
 ReapChildren()
 {
-#ifdef SYSV
+#if defined(SYSV) || defined(__linux__)
         pid_t pid;
         int status;
 #else
@@ -645,7 +645,7 @@ ReapChildren()
 
 	if (!deadChildren)
 		return;
-#ifdef SYSV
+#if defined(SYSV) || defined(__linux__)
 	sighold(SIGCHLD);
 #else
 	oldmask = sigblock(sigmask(SIGCHLD));
@@ -655,7 +655,7 @@ ReapChildren()
 
 	while (1) {
 
-#ifdef SYSV
+#if defined(SYSV) || defined(__linux__)
                 pid = waitpid(-1, &status, WNOHANG);
 #else
                 pid = wait3(&status, WNOHANG, (struct rusage *)0);
@@ -682,7 +682,7 @@ ReapChildren()
 
 	deadChildren = False;
 
-#ifdef SYSV
+#if defined(SYSV) || defined(__linux__)
 	sigrelse(SIGCHLD);
 #else
         (void) sigsetmask(oldmask);
--- xview-3.2p1.4.orig/contrib/examples/notifier/ntfy_pipe.c
+++ xview-3.2p1.4/contrib/examples/notifier/ntfy_pipe.c
@@ -161,7 +161,7 @@ Notify_value
 sigchldcatcher(client, pid, status, rusage)
 Notify_client client; /* the client noted in main() */
 int pid; /* the pid that died */
-#ifdef SVR4
+#ifdef SYSV_WAIT
 int *status;
 #else
 union wait *status; /* the status of the process (unused here) */
@@ -169,7 +169,7 @@ union wait *status; /* the status of the
 struct rusage *rusage; /* resources used by this process (unused) */
 {
     if (WIFEXITED(*status)) {
-#ifdef SVR4
+#ifdef SYSV_WAIT
         printf("Process termined with status %d\n", *status);
 #else
         printf("Process termined with status %d\n", status->w_retcode);
--- xview-3.2p1.4.orig/lib/libxview/base/base.h
+++ xview-3.2p1.4/lib/libxview/base/base.h
@@ -63,6 +63,7 @@
 #define XV_OS_SVR4
 #undef XV_USE_TTCOMPAT
 #define SYSV_UCONTEXT 
+#define SYSV_WAIT
 #define XV_USE_XVFCNTL 
 #endif
  
--- xview-3.2p1.4.orig/lib/libxview/misc/expandname.c
+++ xview-3.2p1.4/lib/libxview/misc/expandname.c
@@ -121,11 +121,11 @@ xv_expand_name(name)
 	length += status;
     }
     (void) close(pivec[0]);
-#ifndef SVR4
+#ifndef SYSV_WAIT
     while (wait((union wait *) & status) != pid);
-#else /* SVR4 */
+#else /* SYSV_WAIT */
     while (wait( & status) != pid);
-#endif /* SVR4 */
+#endif /* SYSV_WAIT */
     ;
     status &= 0377;
     if (status != 0 && status != SIGPIPE) {
--- xview-3.2p1.4.orig/lib/libxview/notify/ndisd_wait.c
+++ xview-3.2p1.4/lib/libxview/notify/ndisd_wait.c
@@ -22,11 +22,11 @@ extern          Notify_value
 notify_default_wait3(client, pid, status, rusage)
     Notify_client   client;
     int             pid;
-#ifndef SVR4
+#ifndef SYSV_WAIT
     union wait     *status;
-#else /* SVR4 */
+#else /* SYSV_WAIT */
     int *status;
-#endif /* SVR4 */
+#endif /* SYSV_WAIT */
     struct rusage  *rusage;
 {
     return (NOTIFY_IGNORED);
--- xview-3.2p1.4.orig/lib/libxview/notify/nintn_wait.c
+++ xview-3.2p1.4/lib/libxview/notify/nintn_wait.c
@@ -22,11 +22,11 @@ extern          Notify_value
 notify_next_wait3_func(nclient, pid, status, rusage)
     Notify_client   nclient;
     int             pid;
-#ifndef SVR4
+#ifndef SYSV_WAIT
     union wait     *status;
-#else /* SVR4 */
+#else /* SYSV_WAIT */
     int *status;
-#endif /* SVR4 */
+#endif /* SYSV_WAIT */
     struct rusage  *rusage;
 {
     Notify_func     func;
--- xview-3.2p1.4.orig/lib/libxview/notify/ntfy_test.c
+++ xview-3.2p1.4/lib/libxview/notify/ntfy_test.c
@@ -596,11 +596,11 @@ Notify_value
 nt_wait3_func(client, pid, status, rusage)
     CLIENT         *client;
     int             pid;
-#ifndef SVR4
+#ifndef SYSV_WAIT
     union wait     *status;
-#else /* SVR4 */
+#else /* SYSV_WAIT */
     int     *status;
-#endif /* SVR4 */
+#endif /* SYSV_WAIT */
     struct rusage  *rusage;
 {
     CONDITION      *cond;
--- xview-3.2p1.4.orig/lib/libxview/ttysw/tty.c
+++ xview-3.2p1.4/lib/libxview/ttysw/tty.c
@@ -534,7 +534,7 @@ static
 tty_quit_on_death(client, pid, status, rusage)
     caddr_t         client;
     int             pid;
-#ifndef SVR4
+#ifndef SYSV_WAIT
     union wait     *status;
 #else
     int     *status;
@@ -586,7 +586,7 @@ static
 tty_handle_death(tty_folio_private, pid, status, rusage)
     Ttysw_folio     tty_folio_private;
     int             pid;
-#ifndef SVR4
+#ifndef SYSV_WAIT
     union wait     *status;
 #else
     int     *status;
Description: Fix preprocessing errors in the 'shelltool' manpage.
 For whatever reason, this manpage is preprocessed using 'cpp', so
 lines that begin with '#' or contain '/*' will cause problems.

--- xview-3.2p1.4.orig/clients/cmdtool/shelltool.man
+++ xview-3.2p1.4/clients/cmdtool/shelltool.man
@@ -396,11 +396,11 @@ file:
 .sp .5
 .nf
 .ft B
-# dynamically set the name stripe of the tool:
+\(sh dynamically set the name stripe of the tool:
 alias header 'echo \-n "\eE]l\e!*\eE\e"'
-# dynamically set the label on the icon:
+\(sh dynamically set the label on the icon:
 alias iheader 'echo \-n "\eE]L\e!*\eE\e"'
-# dynamically set the image on the icon:
+\(sh dynamically set the image on the icon:
 alias icon 'echo \-n "\eE]I\e!*\eE\e"'
 .fi
 .RE
@@ -413,7 +413,7 @@ alias icon 'echo \-n "\eE]I\e!*\eE\e"'
 .TP
 .B /usr/bin/xview/shelltool
 .TP
-.B /usr/demo/*
+.B /usr/demo\(sl*
 .PD
 .SH "SEE ALSO"
 .LP

Reply via email to