summaryrefslogtreecommitdiff
path: root/time/xchrono/patches/patch-ab
blob: 42ac45a99ad813cccbad26eaadc50ce34735a2e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
$NetBSD: patch-ab,v 1.1 2002/06/15 20:40:26 dmcmahill Exp $

the time stuff is needed to compile on alpha, the other stuff kills
compiler warnings

--- MultiClock.c.orig	Sat Jun 15 16:09:44 2002
+++ MultiClock.c
@@ -33,7 +33,7 @@
 #include <X11/Xaw/XawInit.h>
 #include "MultiClockP.h"
 
-extern long time();
+#include <time.h>
 static void clock_tic(), updateClocks(), DrawHand(), DrawSecond(), SetSeg(), DrawClockFace();
 static erase_hands(), round();
 	
@@ -177,7 +177,7 @@
     {
       ClassField(numberOfSlots) += CLOCK_LIST_SIZE;
       ClassField(clockList) =
-	(ClockWidget *) XtRealloc(ClassField(clockList),
+	(ClockWidget *) XtRealloc((void *) ClassField(clockList),
 				  sizeof(ClockWidget)*ClassField(numberOfSlots));
     }
 
@@ -239,7 +239,7 @@
     if(!w->clock.analog) {
        char *str;
        struct tm tm, *localtime();
-       long time_value;
+       time_t time_value;
        (void) time(&time_value);
        tm = *localtime(&time_value);
        str = asctime(&tm);
@@ -391,7 +391,7 @@
         XtIntervalId *id;
 {
   ClockWidget w = (ClockWidget) client_data;
-  long	time_value;
+  time_t	time_value;
   char localTimezone[TZ_BUFLEN];
   char *tzenv = getenv("TZ");
   struct tm *localtime();
@@ -417,7 +417,7 @@
     {
       (*list)->clock.show_second_hand =
 	(ClassField(updateInterval) <= SECOND_HAND_TIME);
-      if (XtIsRealized(*list))
+      if (XtIsRealized((Widget) *list))
 	{
 	  if ((*list)->clock.timezone)
 	  {