Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Jun 2000 11:23:12 +0200
From:      Andreas Klemm <andreas@klemm.gtn.com>
To:        "Joseph I. Davida" <jd@davida.com>
Cc:        ports@FreeBSD.ORG
Subject:   Re: xntp3-5.93
Message-ID:  <20000603112312.C2863@titan.klemm.gtn.com>
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
References:  <200006030845.BAA06524@dialup-209.247.142.14.SanJose1.Level3.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000603112312.C2863>