openbsd-ports/misc/plan/patches/patch-src-daemon_c
2000-04-21 21:26:17 +00:00

51 lines
1.1 KiB
Plaintext

--- src/daemon.c.orig Tue Apr 1 14:40:28 1997
+++ src/daemon.c Sun Jun 22 14:17:04 1997
@@ -68,6 +68,14 @@
void *toplevel = 0; /* dummy for formfile.c */
#endif
+#if (defined BSD && !defined OSF)
+typedef union wait wait_type;
+#define WAIT_STATUS(x) (x.w_status)
+#else
+typedef int wait_type;
+#define WAIT_STATUS(x) (x)
+#endif
+
static void popup_window(), send_mail(), write_script(), exec_program();
static char *get_subject(), *get_subtitle(), *get_icontitle();
#ifdef MIPS
@@ -210,6 +218,7 @@
sleep(twait);
#endif
refresh_lock(LOCK_PATH);
+#ifndef RABBITS
#ifdef SUN
if (pw) {
struct utmp ut;
@@ -259,6 +268,7 @@
}
}
#endif
+#endif
total_wait -= twait;
}
}
@@ -411,12 +421,10 @@
int sig;
{
char path[40]; /* script to delete */
-#if (defined BSD && !defined OSF)
- union wait dummy;
-#else
- int dummy;
-#endif
- sprintf(path, "/tmp/pland%d", wait(&dummy));
+ wait_type dummy;
+
+ sprintf(path, "/tmp/pland%d", wait(&WAIT_STATUS(dummy)));
+
if (debug)
printf("%s: deleting script \"%s\"\n", progname, path);
(void)unlink(path);