Репозитории ALT
S: | 3.2p1.4-alt13 |
5.1: | 3.2p1.4-alt7 |
3.0: | |
+backports: | 3.2p1.4-alt2.M30.3 |
Группа :: Система/Библиотеки
Пакет: libxview
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: xview-sysv-wait-and-signals.patch
Скачать
Скачать
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;