Files
pkgsrc-ng/wm/uwm/patches/patch-aj
2013-09-26 17:14:40 +02:00

61 lines
1.5 KiB
Plaintext

$NetBSD: patch-aj,v 1.3 2013/01/11 23:36:16 joerg Exp $
--- Menu.c.orig 1988-10-01 09:41:13.000000000 +0000
+++ Menu.c
@@ -72,6 +72,12 @@ Bool alternateGC = True; /* true if only
#define vfork() fork()
#endif
+#ifdef X_NOT_STDC_ENV
+char *malloc();
+#endif
+
+static void AdjustMaxColors(int pixel);
+
/* the following procedure is a copy of the implementation of system,
* modified to reset the handling of SIGINT, SIGQUIT, and SIGHUP before
* exec-ing
@@ -84,6 +90,14 @@ char *s;
char **oldenviron;
extern char **environ, **newenviron;
+#ifdef SIGCHLD
+ /*
+ * Children are now handled in uwm.c, but make sure
+ * uwm blocks :-) for compatibility with other systems.
+ */
+
+ signal(SIGCHLD, SIG_DFL);
+#endif
oldenviron = environ;
environ = newenviron;
if ((pid = vfork()) == 0) {
@@ -107,6 +121,9 @@ char *s;
status = -1;
signal(SIGINT, istat);
signal(SIGQUIT, qstat);
+#ifdef SIGCHLD
+ clear_children();
+#endif
return(status);
}
@@ -129,7 +146,6 @@ MenuInfo *menu;
char *hlname; /* Pointer to hi-liter name. */
char *strbuf; /* String buffer for IsTextNL. */
Bool checkMotion = TRUE; /* To Restore Cursor Position */
- char *malloc();
int funcbutton; /* function button for window select */
/*
@@ -697,8 +713,7 @@ MenuInfo *menu;
* Decrement "MaxColors" if this pixel value has never been used in a
* menu before.
*/
-AdjustMaxColors(pixel)
-int pixel;
+static void AdjustMaxColors(int pixel)
{
register MenuLink *mptr;
register MenuLine *lptr;