summaryrefslogtreecommitdiff
path: root/x11/xscreensaver/patches
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2002-03-14 01:02:29 +0000
committerwiz <wiz@pkgsrc.org>2002-03-14 01:02:29 +0000
commit10a608f7edbefbf05d74dc21886074c1f49b3732 (patch)
treeb9686e97fffb5e26f22002c96aaa2df4a16f8f95 /x11/xscreensaver/patches
parent5f9efe76fb9027837b42c88e40d592b24198fad7 (diff)
downloadpkgsrc-10a608f7edbefbf05d74dc21886074c1f49b3732.tar.gz
Use marginally different "official" diffs for glsnake compilation problem
provided by Jamie Zawinski.
Diffstat (limited to 'x11/xscreensaver/patches')
-rw-r--r--x11/xscreensaver/patches/patch-ad51
-rw-r--r--x11/xscreensaver/patches/patch-af18
2 files changed, 49 insertions, 20 deletions
diff --git a/x11/xscreensaver/patches/patch-ad b/x11/xscreensaver/patches/patch-ad
index e1e10872cf3..c2cc25df35a 100644
--- a/x11/xscreensaver/patches/patch-ad
+++ b/x11/xscreensaver/patches/patch-ad
@@ -1,4 +1,4 @@
-$NetBSD: patch-ad,v 1.5 2002/02/24 21:42:57 wiz Exp $
+$NetBSD: patch-ad,v 1.6 2002/03/14 01:02:29 wiz Exp $
--- hacks/glx/glsnake.c.orig Thu Feb 14 13:06:38 2002
+++ hacks/glx/glsnake.c
@@ -22,45 +22,54 @@ $NetBSD: patch-ad,v 1.5 2002/02/24 21:42:57 wiz Exp $
int morphing;
nodeang_t node[24];
GLfloat roty;
-@@ -660,6 +660,7 @@
- #define RANDSIGN() ((random() & 1) ? 1 : -1)
-
- void glsnake_init(ModeInfo *mi) {
-+ struct timezone localtimezone;
- glsnake_configuration * bp;
- int wire = MI_IS_WIREFRAME(mi);
-
-@@ -693,8 +694,8 @@
+@@ -693,8 +693,17 @@
bp->dragging = 0;
bp->interactive = 0;
- ftime(&(bp->last_iteration));
- memcpy(&(bp->last_morph), &(bp->last_iteration), sizeof(struct timeb));
-+ gettimeofday(&(bp->last_iteration), &localtimezone);
-+ memcpy(&(bp->last_morph), &(bp->last_iteration), sizeof(struct timeval));
++ {
++# ifdef GETTIMEOFDAY_TWO_ARGS
++ struct timezone tzp;
++ gettimeofday(&bp->last_iteration, &tzp);
++# else
++ gettimeofday(&bp->last_iteration);
++# endif
++ }
++
++ memcpy(&bp->last_morph, &(bp->last_iteration),
++ sizeof(bp->last_morph));
/* srand((unsigned int) bp->last_iteration.time); */
/* load the model files */
-@@ -871,7 +872,8 @@
+@@ -871,7 +880,7 @@
long morf_msec;
float iter_angle_max;
int i;
- struct timeb current_time;
+ struct timeval current_time;
-+ struct timezone localtimezone;
int still_morphing;
/* Do nothing to the model if we are paused */
-@@ -881,7 +883,7 @@
+@@ -880,8 +889,15 @@
+ usleep(1);
return;
}
- /* ftime is winDOS compatible */
+- /* ftime is winDOS compatible */
- ftime(&current_time);
-+ gettimeofday(&current_time, &localtimezone);
++
++ {
++# ifdef GETTIMEOFDAY_TWO_ARGS
++ struct timezone tzp;
++ gettimeofday(&current_time, &tzp);
++# else
++ gettimeofday(&current_time);
++# endif
++ }
/* <spiv> Well, ftime gives time with millisecond resolution.
* <Jaq> if current time is exactly equal to last iteration,
-@@ -892,18 +894,18 @@
+@@ -892,18 +908,20 @@
* it would be the same
* <spiv> b) The code will divide by zero
*/
@@ -71,7 +80,8 @@ $NetBSD: patch-ad,v 1.5 2002/02/24 21:42:57 wiz Exp $
if (iter_msec) {
/* save the current time */
- memcpy(&(bp->last_iteration), &current_time, sizeof(struct timeb));
-+ memcpy(&(bp->last_iteration), &current_time, sizeof(struct timeval));
++ memcpy(&bp->last_iteration, &current_time,
++ sizeof(bp->last_iteration));
/* work out if we have to switch models */
- morf_msec = bp->last_iteration.millitm - bp->last_morph.millitm +
@@ -81,7 +91,8 @@ $NetBSD: patch-ad,v 1.5 2002/02/24 21:42:57 wiz Exp $
if ((morf_msec > statictime) && !bp->interactive) {
- memcpy(&(bp->last_morph), &(bp->last_iteration), sizeof(struct timeb));
-+ memcpy(&(bp->last_morph), &(bp->last_iteration), sizeof(struct timeval));
++ memcpy(&bp->last_morph, &(bp->last_iteration),
++ sizeof(bp->last_morph));
start_morph(RAND(bp->m_count), 0, bp);
}
diff --git a/x11/xscreensaver/patches/patch-af b/x11/xscreensaver/patches/patch-af
new file mode 100644
index 00000000000..96fedfb8229
--- /dev/null
+++ b/x11/xscreensaver/patches/patch-af
@@ -0,0 +1,18 @@
+$NetBSD: patch-af,v 1.4 2002/03/14 01:02:29 wiz Exp $
+
+--- hacks/screenhack.h.orig Sat Jan 20 05:28:31 2001
++++ hacks/screenhack.h
+@@ -1,4 +1,4 @@
+-/* xscreensaver, Copyright (c) 1992-2001 Jamie Zawinski <jwz@jwz.org>
++/* xscreensaver, Copyright (c) 1992-2002 Jamie Zawinski <jwz@jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+@@ -102,5 +102,7 @@
+ #define bzero __ERROR_use_memset_not_bzero_in_xscreensaver__
+ #undef bcopy
+ #define bcopy __ERROR_use_memcpy_not_bcopy_in_xscreensaver__
++#undef ftime
++#define ftime __ERROR_use_gettimeofday_not_ftime_in_xscreensaver__
+
+ #endif /* __SCREENHACK_H__ */