pkgsrc/x11/xphoon/patches/patch-ac
nra a2ae10c443 Add xphoon-19910918. PR #13500 by Stoned Elipot.
Xphoon sets X the root window to a picture of the moon in its current phase.
2001-07-18 14:27:31 +00:00

48 lines
883 B
Text

$NetBSD: patch-ac,v 1.1.1.1 2001/07/18 14:27:31 nra Exp $
--- xphoon.c.orig Wed Sep 18 21:57:37 1991
+++ xphoon.c
@@ -31,9 +31,16 @@
/* Externals. */
+#include <sys/param.h>
+
+#if (defined(BSD) && (BSD >= 199306))
+#include <stdlib.h>
+#include <time.h>
+#else
extern char* malloc();
extern long time();
extern long random();
+#endif
extern void getbits();
extern double jtime();
@@ -65,7 +72,7 @@
int blackflag, demoflag;
int printpid;
char* display_name;
- long clock;
+ time_t clock;
int pid, tty;
int size;
char* mooncopy;
@@ -190,6 +197,7 @@
(void) fflush( stdout );
/* Go stealth (ditch our controlling tty). */
+#ifdef TIOCNOTTY
tty = open( "/dev/tty", 0 );
if ( tty < 0 )
{
@@ -207,6 +215,9 @@
}
(void) close( tty );
}
+#else
+ setsid();
+#endif
}
size = BitmapSize( moon_w, moon_h );