Replied: Mon, 28 Oct 1996 21:59:50 -0500
Replied: "Ulrich.Windl@rz.uni-regensburg.de mills@udel.ed"
Received: from snow-white.ee.udel.edu by whimsy.udel.edu id aa17403;
          28 Oct 96 10:07 GMT
Received: from ngate.ngate.uni-regensburg.de (ngate.rz.uni-regensburg.de [132.199.3.13]) by rrzs3.rz.uni-regensburg.de (8.7.4/8.7.3) with SMTP id LAA23125 for <stenn@whimsy.udel.edu>; Mon, 28 Oct 1996 11:09:24 +0100 (MET)
Received: from rz.uni-regensburg.de by ngate.ngate.uni-regensburg.de; Mon, 28 Oct 96 12:09 GMT
Received: from rz.uni-regensburg.de by kgate.ngate.uni-regensburg.de; Mon, 28 Oct 96 10:07 GMT
Received: from localhost by rkdvmhp1.dvm.klinik.uni-regensburg.de with SMTP
	(1.40.112.8/16.2-961007-2) id AA063597243; Mon, 28 Oct 1996 11:07:23 +0100
Date: Mon, 28 Oct 1996 11:07:22 +0100 (MEZ)
From: Ulrich Windl <@rkdvmhp1.dvm.klinik.uni-regensburg.de:>
Reply-To: Ulrich.Windl@rz.uni-regensburg.de
To: Harlan Stenn <stenn@whimsy.udel.edu>
Subject: xntp3-5.86.2: test results
Message-Id: <Pine.HPP.3.94.961028110552.6287B-100000@rkdvmhp1.dvm.klinik.uni-regensburg.de>
X-Pgp-Key: 0x[E8]43660D
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hello

here is what I got on my Linux box when trying to compile xntp3-86.2
(applied your patches against the tree from xntp3-86.tar).

elf:/home/windl/xntp3-5.86.2 > ./configure --enable-debugging --disable-all-clocks --enable-RAWDCF --enable-MEINBERG --enable-accurate-adjtime --enable-tick=5
creating cache ./config.cache
checking host system type... i586-unknown-linux
checking for gcc... gcc
checking whether we are using GNU C... yes
...
updating cache ./config.cache
creating ./config.status
creating Makefile
creating adjtimed/Makefile
creating authstuff/Makefile
creating clockstuff/Makefile
creating include/Makefile
creating kernel/Makefile
creating kernel/sys/Makefile
creating libntp/Makefile
creating libparse/Makefile
creating ntpdate/Makefile
creating ntpq/Makefile
creating ntptrace/Makefile
creating parseutil/Makefile
creating xntpd/Makefile
creating xntpdc/Makefile
creating util/Makefile
creating config.h
elf:/home/windl/xntp3-5.86.2 > make
cd . && automake Makefile
/bin/sh: automake: command not found
make: *** [Makefile.in] Error 127
elf:/home/windl/xntp3-5.86.2 > 

I edited all the Makefiles with ``vi $(find . -name Makefile)'' and
replaced ``automake'' by ``touch'' (yes, it's really ugly fix).

The ``make'' then worked OK.

A note on using gcc: You are currently using CFLAGS="-O -g". To my
knowledge "-O2" tries to produce faster and shorter code at the
expense of CPU time during compilation. "-O3" tries to inline
functions automatically that seem to be short and have a simple
structure. Therefore I'd suggest to use "-O2" or "-O3" for gcc. Also
using "-W" or "-Wall" can help to detect obvious errors (The Linux
kernel uses "-Wall" when being compiled). I personally use even more
aggressive warnings like "-Wshadow", "-Wansi", "-Wcast-align" and
"-Wwrite-strings".

For ``make check'' I got the following message:
gcc -c -DHAVE_CONFIG_H -I. -I. -I.. -I../include  -g -O authcert.c
In file included from ../include/ntp_machine.h:9,
                 from ../include/ntp_types.h:6,
                 from ../include/ntp_stdlib.h:6,
                 from authcert.c:12:
../config.h:58: warning: `DES' redefined
authcert.c:11: warning: this is the location of the previous definition

To enable kernel clock support I had to modify the sources a bit (as
you indicated). Despite of the chaotic state in Linux, there's one
strange thing I had to modify ntp_loopfilter.c:

#  ifdef HAVE___ADJTIMEX
#   define ntp_adjtime(t)  adjtimex((t))
#  endif

Previously ``adjtimex'' (Linux system call) was ``__adjtimed''
(something else), but if you consider ``HAVE___ADJTIMEX'' it's
obviously a spelling error. (BTW: ntp_request.c has the same thing
duplicated)

To summarize the changes needed for my Linux version (S.u.S.E. Linux
4.3#2 with kernel 2.0.22):

#defined KERNEL_PLL in config.h

Added ``#define SIGSYS SIGSEGV'' in line 808 of ntp_loopfilter.c
(absolutely ugly and wrong fix, but works)

The two changes from above.

An unrelated thing: Can I configure ``server 127.127.8.0 mode 5'' at
run-time, and if so, how do I specify the ``mode'' parameter?

For some reason my clear-text password (key 15, type 'A') did no
longer work in xntpdc; it was prompted as MD5 password. Is that OK?

Still another thing: Is there a reason why ``enable pps'' is not the
default? If the PPS code is not implemented, it wouldn't be used
anyway, right?

Finally two patches to the HTML directory (I couldn't resist checking it) in
unified diff format (now that it is allowed):

elf:/home/windl/test-HTML > diff -u patches.html~ patches.html
--- patches.html~	Sat Oct 26 16:21:44 1996
+++ patches.html	Sat Oct 26 20:39:05 1996
@@ -60,7 +60,7 @@
 source code control, there is currently no tracking of specific changes.
 
 <p>The best way to see what's changed between two distributions is to
-run a <code>diff<\code> against them.
+run a <code>diff</code> against them.
 
 <p>Thanks for your contribution and happy chime.
 

elf:/home/windl/test-HTML > diff -u release.html~ release.html
--- release.html~	Sat Oct 26 16:21:44 1996
+++ release.html	Sat Oct 26 20:39:42 1996
@@ -175,6 +175,4 @@
 uw: Ulrich Windl &lt;Ulrich.Windl@rz.uni-regensburg.de&gt;
 </pre>
 
-</pre>
-
 <hr><address>David L. Mills (mills@udel.edu)</address></body></html>

(My exuses if the second error was introduced in my last large patch)

Ulrich Windl

P.S. According to my limited understanding of the Intel 386 assembler and
     the UNIX notation of it, the Linux 2.0 kernel does not create any signal
     (no SIGSYS) when the number for a system call is out of range or not
     implemented, but returns ``ENOSYS'' (38) instead. Maybe you could use
     this...

P.P.S. I still found another bug (maybe more similar bugs around):
diff -u /home/windl/xntp3-5.86.2/xntpd/ntp_unixclock.c.orig /home/windl/xntp3-5.86.2/xntpd/ntp_unixclock.c
--- /home/windl/xntp3-5.86.2/xntpd/ntp_unixclock.c.orig	Fri Aug 30 07:25:31 1996
+++ /home/windl/xntp3-5.86.2/xntpd/ntp_unixclock.c	Sun Oct 27 18:01:11 1996
@@ -400,7 +400,7 @@
 
     /* Skippy says we need to know TICK before handling TICKADJ */
     {
-#if defined(HAVE_SYS_TIMEX_H) && (HAVE___ADJTIMEX)
+#if defined(HAVE_SYS_TIMEX_H) && defined(HAVE___ADJTIMEX)
 	struct timex txc;
 #endif /* HAVE_SYS_TIMEX_H && HAVE___ADJTIMEX */
 

