From owner-freebsd-ports Sat Jun 3 2:30:40 2000 Delivered-To: freebsd-ports@freebsd.org Received: from picalon.gun.de (picalon.gun.de [192.109.159.1]) by hub.freebsd.org (Postfix) with ESMTP id E1F5E37BB68 for ; Sat, 3 Jun 2000 02:30:34 -0700 (PDT) (envelope-from andreas@klemm.gtn.com) Received: (from uucp@localhost) by picalon.gun.de (8.9.3/8.9.3) id LAA10293; Sat, 3 Jun 2000 11:30:21 +0200 (MET DST) >Received: (from andreas@localhost) by klemm.gtn.com (8.9.3/8.9.3) id LAA03860; Sat, 3 Jun 2000 11:23:12 +0200 (CEST) (envelope-from andreas) Date: Sat, 3 Jun 2000 11:23:12 +0200 From: Andreas Klemm To: "Joseph I. Davida" Cc: ports@FreeBSD.ORG Subject: Re: xntp3-5.93 Message-ID: <20000603112312.C2863@titan.klemm.gtn.com> References: <200006030845.BAA06524@dialup-209.247.142.14.SanJose1.Level3.net> Mime-Version: 1.0 X-Mailer: Mutt 1.0.1i In-Reply-To: <200006030845.BAA06524@dialup-209.247.142.14.SanJose1.Level3.net>; from jd@davida.com on Sat, Jun 03, 2000 at 01:45:57AM -0700 X-Operating-System: FreeBSD 5.0-CURRENT SMP X-Disclaimer: A free society is one where it is safe to be unpopular Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi ! I quitted maintainership on this port. Cc'd to ports. Please update your ports collection. Maybe this is already fixed. Best regards Andreas /// On Sat, Jun 03, 2000 at 01:45:57AM -0700, Joseph I. Davida wrote: > Dear Andreas, > I patched the file util/ntptime.c in order to > take care of problems with tv_usec struct member. > The original author must have used a variant of unix > where the struct timespec is what FreeBSD calls timeval. > So, the author was passing his timespec as if it were > a timeval. So where ever I saw him doing that, I simply > used the FreeBSD macros to convert timespec to timeval > and use the true FreeBSD timeval where the compilation > errors were comming up. > I also had to add -D__FreeBSD__ to the Makefile. > > CFLAGS = -g -O2 -Wall -pipe -D__FreeBSD__ > ^^^^^^^^^^^^^^ > > This probably will have to go into Makefile.in so that it > will get propagated to Makefile when configure is run. > > The compiler still spits out tons of warnings. > I am just too tired to track down. > Perhaps they are truly innocuous. > Perhaps they are terribly dangerous. I dont know. > > Also, the main Makefile in usr/ports/net/xntpd needs > to be fixed. For some reason it complained that I > should not be using PKGNAME, and to use PORTNAME > and PORTVERSION. > > > Cheers, > > Joe > > ------------------------------------------------------------------ > > Here are the context diffs for util/ntptime.c: > > 99a100,102 > > #ifdef __FreeBSD__ > > struct timeval tv; > > #endif > 216a220,228 > > #ifdef __FreeBSD__ > > /* The author of this program was using his struct > > member ntv.time as a timeval structure. It is a timespec > > structure. So we convert it to a timeval for him, and > > then pass the timeval struct to other funcs and macros. > > */ > > TIMESPEC_TO_TIMEVAL(&tv, &ntv.time); > > times[c] = tv.tv_usec; > > #else > 217a230 > > #endif > 268a282,291 > > #ifdef __FreeBSD__ > > /* The author of this program was using his struct > > member ntv.time as a timeval structure. It is a timespec > > structure. So we convert it to a timeval for him, and > > then pass the timeval struct to other funcs and macros. > > Note: Author's TVTOTS is not the same as TIMEVAL_TO_TIMESPEC > > */ > > TIMESPEC_TO_TIMEVAL(&tv, &ntv.time); > > TVTOTS(&tv, &ts); > > #else > 269a293 > > #endif /* __FreeBSD__ */ > 273a298,300 > > #ifdef __FreeBSD__ > > prettydate(&ts), (int) tv.tv_usec); > > #else > 274a302 > > #endif /* __FreeBSD__ */ > 278a307,309 > > #ifdef __FreeBSD__ > > (int) tv.tv_sec, (int) tv.tv_usec, > > #else > 279a311 > > #endif /* __FreeBSD__ */ -- Andreas Klemm http://people.FreeBSD.ORG/~andreas http://www.freebsd.org/~fsmp/SMP/SMP.html powered by Symmetric MultiProcessor FreeBSD New APSFILTER 542 and songs from our band - http://people.freebsd.org/~andreas To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message