make this go on alpha

This commit is contained in:
dmcmahill 2002-06-15 20:40:25 +00:00
parent 006aa2b9f9
commit 15ba098414
2 changed files with 54 additions and 1 deletions

View file

@ -1,5 +1,6 @@
$NetBSD: distinfo,v 1.1.1.1 2002/05/14 18:47:52 agc Exp $ $NetBSD: distinfo,v 1.2 2002/06/15 20:40:25 dmcmahill Exp $
SHA1 (xchrono.shar) = 8cc61b949ff4c1972cfa810831d562d058fa9e2f SHA1 (xchrono.shar) = 8cc61b949ff4c1972cfa810831d562d058fa9e2f
Size (xchrono.shar) = 56292 bytes Size (xchrono.shar) = 56292 bytes
SHA1 (patch-aa) = 59c5946422c0ac76907e1d512dd64b9a1899029d SHA1 (patch-aa) = 59c5946422c0ac76907e1d512dd64b9a1899029d
SHA1 (patch-ab) = 414ed2bfc2aa0aeafaf50c4980bb8394ca3e1407

View file

@ -0,0 +1,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)
{