[source] rdate

bridged with qdn.public.qnxrtp.porting
Post Reply
Guest

[source] rdate

Post by Guest » Fri Aug 09, 2002 8:54 pm

I somehow managed to port the NetBSD's rdate.
The guts was to write down the adjtime() which
wasn't available in Neutrino.
I thought cburgess ported rdate before, but couldn't find it now.

(time_t is UNSIGNED?? oh weez..)

Haven't tried, but ntp(xntpd) may compile by plopping in this adjtime.c.

This post is just the current status; I'll continue to refine.
better adjtime(), build directory, install, packaging, license, manual...
--
kabe

#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.2.1).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 2002-08-10 05:31 JST by <kabe@imux3188>.
# Source directory was `/autofs/home/kabe'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 536 -rw-rw-r-- rdate/Makefile
# 2859 -rw-rw-r-- rdate/adjtime.c
# 2532 -rw-rw-r-- rdate/rdate.8
# 4983 -rw-rw-r-- rdate/rdate.c
#
save_IFS="${IFS}"
IFS="${IFS}:"
gettext_dir=FAILED
locale_dir=FAILED
first_param="$1"
for dir in $PATH
do
if test "$gettext_dir" = FAILED && test -f $dir/gettext \
&& ($dir/gettext --version >/dev/null 2>&1)
then
set `$dir/gettext --version 2>&1`
if test "$3" = GNU
then
gettext_dir=$dir
fi
fi
if test "$locale_dir" = FAILED && test -f $dir/shar \
&& ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
then
locale_dir=`$dir/shar --print-text-domain-dir`
fi
done
IFS="$save_IFS"
if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
then
echo=echo
else
TEXTDOMAINDIR=$locale_dir
export TEXTDOMAINDIR
TEXTDOMAIN=sharutils
export TEXTDOMAIN
echo="$gettext_dir/gettext -s"
fi
if touch -am -t 200112312359.59 $$.touch >/dev/null 2>&1 && test ! -f 200112312359.59 -a -f $$.touch; then
shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"'
elif touch -am 123123592001.59 $$.touch >/dev/null 2>&1 && test ! -f 123123592001.59 -a ! -f 123123592001.5 -a -f $$.touch; then
shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"'
elif touch -am 1231235901 $$.touch >/dev/null 2>&1 && test ! -f 1231235901 -a -f $$.touch; then
shar_touch='touch -am $3$4$5$6$2 "$8"'
else
shar_touch=:
echo
$echo 'WARNING: not restoring timestamps. Consider getting and'
$echo "installing GNU \`touch', distributed in GNU File Utilities..."
echo
fi
rm -f 200112312359.59 123123592001.59 123123592001.5 1231235901 $$.touch
#
if mkdir _sh12712; then
$echo 'x -' 'creating lock directory'
else
$echo 'failed to create lock directory'
exit 1
fi
# ============= rdate/Makefile ==============
if test ! -d 'rdate'; then
$echo 'x -' 'creating directory' 'rdate'
mkdir 'rdate'
fi
if test -f 'rdate/Makefile' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'rdate/Makefile' '(file already exists)'
else
$echo 'x -' extracting 'rdate/Makefile' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'rdate/Makefile' &&
# $NetBSD: Makefile,v 1.5 1997/10/18 03:50:58 lukem Exp $
# $Id: Makefile,v 1.6 2002/08/09 20:25:49 kabe Exp $
X
PROG= rdate
X
MAN= rdate.8
X
LDLIBS=-lsocket
CCLINK=$(CC)
X
OBJS = rdate.o adjtime.o
X
$(PROG): $(OBJS) $(PROG).use
X $(CCLINK) -o $@ $(OBJS) $(LDLIBS)
X usemsg $@ $(PROG).use
X
$(PROG).use: rdate.c
X sed -ne '/#if __USAGE/,/#endif/s/^\/\///p' rdate.c > $@
X
clean::
X $(RM) $(PROG)
X $(RM) *.o a.out core *~ #~
X $(RM) $(PROG).use
X
#BINDIR=/usr/bin
#install: $(PROG)
# mkdir -p $(DESTDIR)$(BINDIR)
# cp -p $(PROG) $(DESTDIR)$(BINDIR)
X
SHAR_EOF
(set 20 02 08 10 05 25 49 'rdate/Makefile'; eval "$shar_touch") &&
chmod 0664 'rdate/Makefile' ||
$echo 'restore of' 'rdate/Makefile' 'failed'
if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
&& ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
md5sum -c << SHAR_EOF >/dev/null 2>&1 \
|| $echo 'rdate/Makefile:' 'MD5 check failed'
0d49c8c12afd6fdd367db85c70a048be rdate/Makefile
SHAR_EOF
else
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'rdate/Makefile'`"
test 536 -eq "$shar_count" ||
$echo 'rdate/Makefile:' 'original size' '536,' 'current size' "$shar_count!"
fi
fi
# ============= rdate/adjtime.c ==============
if test -f 'rdate/adjtime.c' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'rdate/adjtime.c' '(file already exists)'
else
$echo 'x -' extracting 'rdate/adjtime.c' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'rdate/adjtime.c' &&
/*
X * adjtime() for QNXNTO
X *
X * $Id: adjtime.c,v 1.2 2002/08/09 20:20:10 kabe Exp $
X */
X
#include <stdio.h>
#include <sys/types.h>
#include <sys/time.h>
#include <stdint.h>
X
#if __QNXNTO__
#include <sys/neutrino.h>
#define UNSIGNED_TV_SEC
#endif
X
static long nanoslew_per_sec = 500000; /* 0.5millisec max slew per second */
X /* 500000000; /* 0.5 max slew per second */
X
#if defined(__QNXNTO__) && !defined(HAVE_ADJTIME)
int
adjtime(struct timeval *delta, struct timeval * const olddelta)
{
X int64_t nto_delta; /* nanosecs */
X
#ifdef DEBUG
X if (delta) fprintf(stderr,"adjtime: %ld:%ld\n", delta->tv_sec, delta->tv_usec);
#endif
X /* if delta==0, return current delta remaining */
X /* (which is zero for now) */
X if (delta->tv_sec==0 && delta->tv_usec==0) {
X if (olddelta) {
X struct _clockadjust oldadjust;
X uint64_t d;
X ClockAdjust(CLOCK_REALTIME, NULL, &oldadjust);
X /* XXX overflow warning */
X nto_delta = (uint64_t)oldadjust.tick_nsec_inc * (uint64_t)oldadjust.tick_count;
X d = nto_delta /= 1000; /* nanosec to usec */
X olddelta->tv_sec = d / 1000000;
X /* beware for negative d;
X * should -1us be {0,-1} or {-1, 999999}? */
X d -= olddelta->tv_sec * 1000000;
X olddelta->tv_usec = d;
X }
X return 0;
X }
X
X /* XXX typeof(tv.tv_sec)==time_t COULD BE UNSIGNED! */
X nto_delta =
#ifdef UNSIGNED_TV_SEC
X (int64_t)(signed long)delta->tv_sec * 1000000000LL +
#else
X (int64_t)delta->tv_sec * 1000000000LL +
#endif
X (int64_t)delta->tv_usec * 1000LL;
X
#ifdef DEBUG
X fprintf(stderr,"delta=%lld\n", nto_delta);
#endif
X if (-nanoslew_per_sec <= nto_delta &&
X nto_delta <= nanoslew_per_sec) {
X /* bump immediately */
X uint64_t nto_time;
X ClockTime(CLOCK_REALTIME, NULL, &nto_time);
X nto_time += nto_delta;
X return ClockTime(CLOCK_REALTIME, &nto_time, NULL);
X }
X
X {
X struct _clockperiod nto_period;
X struct _clockadjust newadjust;
X long nanoslew_per_tick;
X
X /* get current tick length */
X ClockPeriod(CLOCK_REALTIME, NULL, &nto_period, 0);
X
X /* how many nanosecs can we slew per tick?
X * ticks/s == 10e9 / nto_period.nsec (tick/s; Hz)
X * MAXNANOS/tick = nanoslew_per_sec / ticks/s
X * = nanoslew_per_sec / 10e9 * nto_period.nsec
X * = nanoslew_per_sec * nto_period.nsec / 10e9
X */
X /* this value doesn't change unless ClockPeriod was changed */
X nanoslew_per_tick = (((uint64_t)nanoslew_per_sec / 1000) * nto_period.nsec) / 1000000;
X if (nto_delta<0) nanoslew_per_tick = -nanoslew_per_tick;
X
X newadjust.tick_nsec_inc = nanoslew_per_tick;
X newadjust.tick_count = nto_delta / nanoslew_per_tick;
#ifdef DEBUG
X fprintf(stderr, "Slewing %ld nsec * %lu ticks (range %ld seconds)\n", newadjust.tick_nsec_inc, newadjust.tick_count, (long)((uint64_t)newadjust.tick_count*nto_period.nsec/1000000000));
#endif
X return ClockAdjust(CLOCK_REALTIME, &newadjust, NULL);
X }
}
#endif
SHAR_EOF
(set 20 02 08 10 05 20 10 'rdate/adjtime.c'; eval "$shar_touch") &&
chmod 0664 'rdate/adjtime.c' ||
$echo 'restore of' 'rdate/adjtime.c' 'failed'
if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
&& ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
md5sum -c << SHAR_EOF >/dev/null 2>&1 \
|| $echo 'rdate/adjtime.c:' 'MD5 check failed'
5b7b645682c9b8b4c8bc105062fe974f rdate/adjtime.c
SHAR_EOF
else
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'rdate/adjtime.c'`"
test 2859 -eq "$shar_count" ||
$echo 'rdate/adjtime.c:' 'original size' '2859,' 'current size' "$shar_count!"
fi
fi
# ============= rdate/rdate.8 ==============
if test -f 'rdate/rdate.8' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'rdate/rdate.8' '(file already exists)'
else
$echo 'x -' extracting 'rdate/rdate.8' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'rdate/rdate.8' &&
X.\" $NetBSD: rdate.8,v 1.9 2002/01/19 11:45:00 wiz Exp $
X.\"
X.\" Copyright (c) 1994 Christos Zoulas
X.\" All rights reserved.
X.\"
X.\" Redistribution and use in source and binary forms, with or without
X.\" modification, are permitted provided that the following conditions
X.\" are met:
X.\" 1. Redistributions of source code must retain the above copyright
X.\" notice, this list of conditions and the following disclaimer.
X.\" 2. Redistributions in binary form must reproduce the above copyright
X.\" notice, this list of conditions and the following disclaimer in the
X.\" documentation and/or other materials provided with the distribution.
X.\" 3. All advertising materials mentioning features or use of this software
X.\" must display the following acknowledgement:
X.\" This product includes software developed by Christos Zoulas.
X.\" 4. The name of the author may not be used to endorse or promote products
X.\" derived from this software without specific prior written permission.
X.\"
X.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
X.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
X.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
X.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
X.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
X.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
X.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
X.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
X.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
X.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
X.\"
X.Dd April 30, 1994
X.Dt RDATE 8
X.Os
X.Sh NAME
X.Nm rdate
X.Nd set the system's date from a remote host
X.Sh SYNOPSIS
X.Nm
X.Op Fl psa
X.Ar host
X.Sh DESCRIPTION
X.Nm
displays and sets the local date and time from the
host name or address given as the argument. It uses the RFC868
protocol which is usually implemented as a built-in service of
X.Xr inetd 8 .
X.Pp
Available options:
X.Pp
X.Bl -tag -width indent
X.It Fl p
Do not set, just print the remote time
X.It Fl s
Do not print the time.
X.It Fl a
Use the
X.Xr adjtime 2
call to gradually skew the local time to the
remote time rather than just hopping.
X.El
X.Sh FILES
X.Bl -tag -width /var/log/wtmp -compact
X.It Pa /var/log/wtmp
A record of date resets and time changes.
X.El
X.Sh SEE ALSO
X.Xr adjtime 2 ,
X.Xr gettimeofday 2 ,
X.Xr utmp 5 ,
X.Xr inetd 8
SHAR_EOF
(set 20 02 08 09 22 56 19 'rdate/rdate.8'; eval "$shar_touch") &&
chmod 0664 'rdate/rdate.8' ||
$echo 'restore of' 'rdate/rdate.8' 'failed'
if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
&& ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
md5sum -c << SHAR_EOF >/dev/null 2>&1 \
|| $echo 'rdate/rdate.8:' 'MD5 check failed'
446d9b8a0c5ad6b3423159a9b7feafbb rdate/rdate.8
SHAR_EOF
else
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'rdate/rdate.8'`"
test 2532 -eq "$shar_count" ||
$echo 'rdate/rdate.8:' 'original size' '2532,' 'current size' "$shar_count!"
fi
fi
# ============= rdate/rdate.c ==============
if test -f 'rdate/rdate.c' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'rdate/rdate.c' '(file already exists)'
else
$echo 'x -' extracting 'rdate/rdate.c' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'rdate/rdate.c' &&
/* $Id: rdate.c,v 1.7 2002/08/09 20:20:10 kabe Exp $ */
X
/*
X * Copyright (c) 1994 Christos Zoulas
X * All rights reserved.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X * notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X * notice, this list of conditions and the following disclaimer in the
X * documentation and/or other materials provided with the distribution.
X * 3. All advertising materials mentioning features or use of this software
X * must display the following acknowledgement:
X * This product includes software developed by Christos Zoulas.
X * 4. The name of the author may not be used to endorse or promote products
X * derived from this software without specific prior written permission.
X *
X * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
X * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
X * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
X * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
X * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
X * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
X * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
X * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
X * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
X * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
X */
/* Modified for QNXRTP by kabe */
X
/*
X * rdate.c: Set the date from the specified host
X *
X * Uses the rfc868 time protocol at socket 37.
X * Time is returned as the number of seconds since
X * midnight January 1st 1900.
X */
X
#include <sys/cdefs.h>
#ifndef lint
static const char *_rcsid="$NetBSD: rdate.c,v 1.14 2002/07/14 01:01:10 wiz Exp $";
#endif /* lint */
X
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
X
#include <netinet/in.h>
X
#include <ctype.h>
#include <err.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#if __NETBSD
#include <util.h>
#endif
X
/* seconds from midnight Jan 1900 - 1970 */
#define DIFFERENCE 2208988800UL
X
static char *gProgname = "";
X
#if __USAGE
/* use Makefile to extract this ... */
//%C - set system time and date from remote host (time server port 37)
//
//%C [-psa] host
// -p just print, don't set
// -s just set, don't print
// -a use adjtime for gradual change instead of instant change
#endif
X
int
main(int argc, char *argv[])
{
X int pr = 0, silent = 0, s;
X int slidetime = 0;
X int adjustment;
X time_t tim;
X char *hname, *emsg;
X struct addrinfo hints, *res, *res0;
X int c;
X int error;
X
X gProgname=strrchr(argv[0], '/');
X if (NULL == gProgname) {
X gProgname = argv[0];
X } else {
X gProgname++; /* skip / */
X }
X
X adjustment = 0;
X while ((c = getopt(argc, argv, "psa")) != -1)
X switch (c) {
X case 'p':
X pr++;
X break;
X
X case 's':
X silent++;
X break;
X
X case 'a':
X slidetime++;
X break;
X
X default:
X return 1;
X }
X
X if (argc - 1 != optind) {
X fprintf(stderr, "Usage: %s [-psa] host\n", gProgname);
X return 1;
X }
X hname = argv[optind];
X
X memset(&hints, 0, sizeof (hints));
X hints.ai_family = PF_UNSPEC;
X hints.ai_socktype = SOCK_STREAM;
X hints.ai_flags = AI_CANONNAME;
X error = getaddrinfo(hname, "time", &hints, &res0);
X if (error)
X errx(1, "%s: %s", gai_strerror(error), hname);
X
X for (res = res0, s = -1; res != NULL; res = res->ai_next) {
X s = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
X if (s < 0) {
X emsg = "socket";
X continue;
X }
X
X if (connect(s, res->ai_addr, res->ai_addrlen)) {
X close(s);
X s = -1;
X emsg = "connect";
X continue;
X }
X
X break;
X }
X if (s < 0)
X err(1, "%s", emsg);
X
X if (read(s, &tim, sizeof(time_t)) != sizeof(time_t))
X err(1, "Could not read data");
X
X (void) close(s);
X tim = ntohl(tim) - DIFFERENCE;
X
X if (!pr) {
X struct timeval tv;
X if (!slidetime) {
X logwtmp("|", "date", "");
X tv.tv_sec = tim;
X tv.tv_usec = 0;
X if (settimeofday(&tv, NULL) == -1)
X err(1, "Could not set time of day");
X logwtmp("{", "date", "");
X } else {
X struct timeval tv_current;
X if (gettimeofday(&tv_current, NULL) == -1)
X err(1, "Could not get local time of day");
X /* XXX typeof(tv.tv_sec)==time_t COULD BE UNSIGNED! */
X adjustment = tv.tv_sec = tim - tv_current.tv_sec;
X tv.tv_usec = 0;
X if (adjtime(&tv, NULL) == -1)
X err(1, "Could not adjust time of day");
X }
X }
X
X if (!silent) {
X (void) fputs(ctime(&tim), stdout);
X if (slidetime)
X (void) fprintf(stdout,
X "%s: adjust local clock by %d seconds\n",
X gProgname, adjustment);
X }
X return 0;
}
X
SHAR_EOF
(set 20 02 08 10 05 20 10 'rdate/rdate.c'; eval "$shar_touch") &&
chmod 0664 'rdate/rdate.c' ||
$echo 'restore of' 'rdate/rdate.c' 'failed'
if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
&& ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
md5sum -c << SHAR_EOF >/dev/null 2>&1 \
|| $echo 'rdate/rdate.c:' 'MD5 check failed'
26f8ea62456228f24165b395e0d8d0a0 rdate/rdate.c
SHAR_EOF
else
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'rdate/rdate.c'`"
test 4983 -eq "$shar_count" ||
$echo 'rdate/rdate.c:' 'original size' '4983,' 'current size' "$shar_count!"
fi
fi
rm -fr _sh12712
exit 0

Guest

ntp (Re: [source] rdate)

Post by Guest » Sat Aug 10, 2002 5:00 pm

Haven't tried, but ntp(xntpd) may compile by plopping in this adjtime.c.
Wups, ntp-4.1.72 (alpha) already has QNX adjtime() in libntp/adjtime.c
(though I guess this will still barf on negative time delta)

--
kabe

Guest

Re: ntp (Re: [source] rdate)

Post by Guest » Sun Aug 11, 2002 3:24 am

Somehow managed to port ntp-4.1.72 (alpha).

<URL:http://www.dais.is.tohoku.ac.jp/~kabe/v ... public.qpr>
(for QNX 6.2; recompile should do on 6.1)

At least it is working against explicit NTP server.

I'd like to hear whether it works for
* multicast
* Serial line clock sources
which I can't confirm.
(I live in multicastclient NTP LAN which Solaris happily joins but
QNX seems to not see it ...)

Applied patch below.
--
kabe

ntp-4.1.72.tar.gz

already have *-*-qnx* and adjtime.c for QNX ....

configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/ntp

make

make -n install
(tries to install everything into /usr/bin ...?)

configure --prefix=/usr --bindir=/usr/sbin --sysconfdir=/etc --localstatedir=/var/ntp

** tickadj will be installed, but of no use;
** tickadj -a 10000 (set tickadj) will coredump (no file to open)
** (NTP doesn't have /dev/kmem, so kernel val tick/tickadj is useless)
build will be controlled by @MAKE_TICKADJ@ of configure
(--disable-kmem ?)
configure: added *-*-qnx*) for NOKMEM, _tick, _tickadj

configure --prefix=/usr \
--bindir=/usr/sbin \
--sysconfdir=/etc \
--localstatedir=/var/run

runnable as ntpd/ntpd

multicastclient won't work (even after disable auth); nic driver?


packaging:
make install DESTDIR=`pwd`/../pack
....ooops, correct was --prefix=/opt

configure --prefix=/opt \
--bindir=/opt/sbin \
--sysconfdir=/etc \
--localstatedir=/var/run
make install DESTDIR=`pwd`/../pack
cp -pr html ../pack/opt/help/ntp_4.2
(confirm ../pack/opt/help/ntp_4.2/index.htm)
#packager -a -d -f ../repo ../pack
packager -d -f ../repo -m ../repo/ntp4-4.1.72-*.qpr ../pack
(TODO?: direct the user to prepare /etc/ntp.conf)

#mv /tmp/pkgr*/*.qpm ../repo/
rmdir /tmp/pkgr*

## .repdata needs the image;
## repackaging *.qpr to include the gif image:
- extract *qpr
- add the image into *repdata/LicenseUrl/*
- repackage
tar cf - ntp4-*-public.{qpm,repdata,qpk} |
gzip -9 > ntp4-4.1.72-x86-public.qpr

find . -name '*.dist' | xargs -n1 ../0diff > /tmp/a
========================= patch ========
*** ./libntp/adjtime.c.dist Sat Nov 3 15:48:19 2001
--- ./libntp/adjtime.c Sun Aug 11 11:28:49 2002
***************
*** 261,266 ****
--- 261,267 ----
# include <sys/time.h>

# include <ntp_stdlib.h>
+ # include "ntp_syslog.h"

int
adjtime (struct timeval *delta, struct timeval *olddelta)
***************
*** 272,278 ****
/*
* How many nanoseconds are we adjusting?
*/
! delta_nsec = delta->tv_sec * 1e9 + delta->tv_usec * 1000;
/*
* Build the adjust structure and call ClockAdjust()
*/
--- 273,282 ----
/*
* How many nanoseconds are we adjusting?
*/
! /* in NTO tv_sec==time_t==UNSIGNED so minus delta will go nowhere;
! * fortunately ntpd only adjtime()s on tv_sec=0 so
! * this doesn't surface */
! delta_nsec = (signed long)delta->tv_sec * 1e9 + delta->tv_usec * 1000;
/*
* Build the adjust structure and call ClockAdjust()
*/
***************
*** 297,302 ****
--- 301,314 ----

adj.tick_nsec_inc = increment;
adj.tick_count = count;
+ #ifdef DEBUG
+ if (debug > 2)
+ msyslog(LOG_DEBUG,
+ "QNX adjtime(): adjust %g msec for %ld nsec * %lu (durate %g ms)\n",
+ delta_nsec/1000.0,
+ adj.tick_nsec_inc, adj.tick_count,
+ ((double)period.nsec/1e9*adj.tick_count*1000.0));
+ #endif
}
else
{
*** ./configure.dist Wed Dec 19 11:01:30 2001
--- ./configure Sun Aug 11 04:58:50 2002
***************
*** 13855,13874 ****
--- 13855,13877 ----
;;
*-*-hpux*)
#ans=no
;;
*-*-irix[456]*)
ans=no
;;
*-*-linux*)
ans=no
;;
+ *-*-qnx*) # Microkernel, no tick, no tickadj
+ ans=no
+ ;;
*-*-winnt3.5)
ans=no
;;
esac

fi;
ac_cv_var_can_kmem=$ans
fi
echo "$as_me:13873: result: $ac_cv_var_can_kmem" >&5
echo "${ECHO_T}$ac_cv_var_can_kmem" >&6
***************
*** 13950,13972 ****
;;
*-ibm-aix[34]*)
ans=no
;;
*-*-mpeix*)
ans=no
;;
*-*-ptx*)
ans=tick
;;
! *-*-sco3.2v[45]*)
ans=no
;;
*-*-solaris2*)
ans=nsec_per_tick
;;
*-*-sysv4*)
ans=tick
;;
esac
ac_cv_var_nlist_tick=$ans
fi
echo "$as_me:13972: result: $ac_cv_var_nlist_tick" >&5
--- 13953,13978 ----
;;
*-ibm-aix[34]*)
ans=no
;;
*-*-mpeix*)
ans=no
;;
*-*-ptx*)
ans=tick
;;
! *-*-qnx*)
ans=no
;;
+ *-*-sco3.2v[45]*)
+ ans=no
+ ;;
*-*-solaris2*)
ans=nsec_per_tick
;;
*-*-sysv4*)
ans=tick
;;
esac
ac_cv_var_nlist_tick=$ans
fi
echo "$as_me:13972: result: $ac_cv_var_nlist_tick" >&5
***************
*** 13979,14001 ****
;;
esac
#
echo "$as_me:13982: checking for the units of 'tick'" >&5
echo $ECHO_N "checking for the units of 'tick'... $ECHO_C" >&6
if test "${ac_cv_var_tick_nano+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ans=usec
case "$target" in
! *-*-solaris2*)
ans=nsec
;;
esac
ac_cv_var_tick_nano=$ans
fi
echo "$as_me:13995: result: $ac_cv_var_tick_nano" >&5
echo "${ECHO_T}$ac_cv_var_tick_nano" >&6
case "$ac_cv_var_tick_nano" in
nsec)
cat >>confdefs.h <<\EOF
#define TICK_NANO 1
EOF
--- 13985,14010 ----
;;
esac
#
echo "$as_me:13982: checking for the units of 'tick'" >&5
echo $ECHO_N "checking for the units of 'tick'... $ECHO_C" >&6
if test "${ac_cv_var_tick_nano+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ans=usec
case "$target" in
! *-*-nto-qnx*)
ans=nsec
;;
+ *-*-solaris2*)
+ ans=nsec
+ ;;
esac
ac_cv_var_tick_nano=$ans
fi
echo "$as_me:13995: result: $ac_cv_var_tick_nano" >&5
echo "${ECHO_T}$ac_cv_var_tick_nano" >&6
case "$ac_cv_var_tick_nano" in
nsec)
cat >>confdefs.h <<\EOF
#define TICK_NANO 1
EOF
***************
*** 14027,14049 ****
;;
*-*-aix*)
ans=tickadj
;;
*-*-mpeix*)
ans=no
;;
*-*-ptx*)
ans=tickadj
;;
! *-*-sco3.2v4*)
ans=no
;;
*-*-sco3.2v5.0*)
ans=clock_drift
;;
*-*-solaris2*)
ans=no # hrestime_adj
;;
*-*-sysv4*)
ans=tickadj
;;
esac
--- 14036,14061 ----
;;
*-*-aix*)
ans=tickadj
;;
*-*-mpeix*)
ans=no
;;
*-*-ptx*)
ans=tickadj
;;
! *-*-qnx*)
ans=no
;;
+ *-*-sco3.2v4*)
+ ans=no
+ ;;
*-*-sco3.2v5.0*)
ans=clock_drift
;;
*-*-solaris2*)
ans=no # hrestime_adj
;;
*-*-sysv4*)
ans=tickadj
;;
esac
***************
*** 14062,14081 ****
--- 14074,14096 ----
echo "$as_me:14062: checking for the units of 'tickadj'" >&5
echo $ECHO_N "checking for the units of 'tickadj'... $ECHO_C" >&6
if test "${ac_cv_var_tickadj_nano+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ans=usec
case "$target" in
*-*-solaris2*)
ans=nsec
;;
+ *-*-nto-qnx*)
+ ans=nsec
+ ;;
esac
ac_cv_var_tickadj_nano=$ans
fi
echo "$as_me:14075: result: $ac_cv_var_tickadj_nano" >&5
echo "${ECHO_T}$ac_cv_var_tickadj_nano" >&6
case "$ac_cv_var_tickadj_nano" in
nsec)
cat >>confdefs.h <<\EOF
#define TICKADJ_NANO 1
EOF
***************
*** 14103,14125 ****
;;
*-*-mpeix*)
ans=no
;;
*-*-nextstep*)
ans=_dosynctodr
;;
*-*-ptx*)
ans=doresettodr
;;
! *-*-sco3.2v4*)
ans=no
;;
*-*-sco3.2v5*)
ans=track_rtc
;;
*-*-solaris2*)
ans=dosynctodr
;;
*-*-sysv4*)
ans=doresettodr
;;
*)
--- 14118,14143 ----
;;
*-*-mpeix*)
ans=no
;;
*-*-nextstep*)
ans=_dosynctodr
;;
*-*-ptx*)
ans=doresettodr
;;
! *-*-qnx*) # manually invoke "rtc -s hw"
ans=no
;;
+ *-*-sco3.2v4*)
+ ans=no
+ ;;
*-*-sco3.2v5*)
ans=track_rtc
;;
*-*-solaris2*)
ans=dosynctodr
;;
*-*-sysv4*)
ans=doresettodr
;;
*)
***************
*** 14208,14227 ****
--- 14226,14248 ----
;;
*-*-irix*)
ans=10000
;;
*-*-linux*)
ans=txc.tick
;;
*-*-mpeix*)
ans=no
;;
+ *-*-nto-qnx*)
+ ans=no # approx 1ms or 10ms; use ClockPeriod()
+ ;;
*-*-winnt3.5)
ans='(every / 10)'
;;
*)
ans='1000000L/hz'
;;
esac
fi;
ac_cv_var_tick=$ans
fi
***************
*** 14271,14290 ****
--- 14292,14314 ----
*-*-hpux*)
case "$ac_cv_var_adjtime_is_accurate" in
yes) ans='tick/16' ;;
esac
;;
*-*-irix*)
ans=150
;;
*-*-mpeix*)
ans=no
+ ;;
+ *-*-nto-qnx*)
+ ans=no # NTO assumes crystal is accurate?
;;
*-*-sco3.2v5.0*)
ans=10000L/hz
;;
*-*-solaris2*)
case "$ac_cv_var_adjtime_is_accurate" in
yes)
#ans='tick/16'
;;
esac

Guest

[source] rdate-1.1

Post by Guest » Fri Aug 30, 2002 6:24 pm

The previously posted rdate had a serious bug which could
go berserk on small negative adjust/zero adjust.

Dunno how may people were using this but strongly recommended update.

(Why is *qpg detected as binary??)
--
kabe

#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.2.1).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 2002-08-31 02:37 JST by <kabe@sra-tohoku.co.jp>.
# Source directory was `/autofs/home/kabe/qnx'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 815 -rw-rw-r-- rdate/Makefile
# 2532 -rw-rw-r-- rdate/rdate.8
# 5086 -rw-rw-r-- rdate/rdate.c
# 116 -rw-rw-r-- rdate/TODO
# 2493 -rw-rw-r-- rdate/adjtime.c
# 323 -rw-rw-r-- rdate/a.c
# 12075 -rw-rw-rw- rdate/rdate-1.1-x86-public.qpr
# 3819 -rw-rw-r-- rdate/rdate.qpg
#
echo=echo
if touch -am -t 200112312359.59 $$.touch >/dev/null 2>&1 && test ! -f 200112312359.59 -a -f $$.touch; then
shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"'
elif touch -am 123123592001.59 $$.touch >/dev/null 2>&1 && test ! -f 123123592001.59 -a ! -f 123123592001.5 -a -f $$.touch; then
shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"'
elif touch -am 1231235901 $$.touch >/dev/null 2>&1 && test ! -f 1231235901 -a -f $$.touch; then
shar_touch='touch -am $3$4$5$6$2 "$8"'
else
shar_touch=:
echo
$echo 'WARNING: not restoring timestamps. Consider getting and'
$echo "installing GNU \`touch', distributed in GNU File Utilities..."
echo
fi
rm -f 200112312359.59 123123592001.59 123123592001.5 1231235901 $$.touch
#
if mkdir _sh04593; then
$echo 'x -' 'creating lock directory'
else
$echo 'failed to create lock directory'
exit 1
fi
# ============= rdate/Makefile ==============
if test ! -d 'rdate'; then
$echo 'x -' 'creating directory' 'rdate'
mkdir 'rdate'
fi
if test -f 'rdate/Makefile' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'rdate/Makefile' '(file already exists)'
else
$echo 'x -' extracting 'rdate/Makefile' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'rdate/Makefile' &&
# $Id: Makefile,v 1.9 2002/08/14 04:15:55 kabe Exp $
X
PROG= rdate
X
MAN= rdate.8
X
LDLIBS=-lsocket
CCLINK=$(CC)
X
OBJS = rdate.o adjtime.o
X
$(PROG): $(OBJS) $(PROG).use
X $(CCLINK) -o $@ $(OBJS) $(LDLIBS)
X usemsg $@ $(PROG).use
X
$(PROG).use: $(PROG).c
X sed -ne '/#if __USAGE/,/#endif/s/^\/\///p' $(PROG).c > $@
X
clean::
X $(RM) $(PROG)
X $(RM) *.o a.out core *~ #~
X $(RM) $(PROG).use
X $(RM) history.qrs
X
X
BINDIR=/opt/sbin
MANDIR=/opt/man
install: $(PROG)
X mkdir -p $(DESTDIR)$(BINDIR)
X cp -p $(PROG) $(DESTDIR)$(BINDIR)
X MAN8=`expr $(MAN) : '.*\.\([^.]*\)$$'`; \
X mkdir -p $(DESTDIR)$(MANDIR)/man$$MAN8; \
X cp -p $(MAN) $(DESTDIR)$(MANDIR)/man$$MAN8
X
### QNX package thingies
package: $(PROG).qpg
X $(MAKE) CFLAGS="-O2 -Wall"
X $(MAKE) install DESTDIR=./DIST
X packager -d -f . -m $(PROG).qpg DIST
X
clean::
X $(RM) -r ./DIST
SHAR_EOF
(set 20 02 08 14 13 15 55 'rdate/Makefile'; eval "$shar_touch") &&
chmod 0664 'rdate/Makefile' ||
$echo 'restore of' 'rdate/Makefile' 'failed'
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'rdate/Makefile'`"
test 815 -eq "$shar_count" ||
$echo 'rdate/Makefile:' 'original size' '815,' 'current size' "$shar_count!"
fi
# ============= rdate/rdate.8 ==============
if test -f 'rdate/rdate.8' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'rdate/rdate.8' '(file already exists)'
else
$echo 'x -' extracting 'rdate/rdate.8' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'rdate/rdate.8' &&
X.\" $NetBSD: rdate.8,v 1.9 2002/01/19 11:45:00 wiz Exp $
X.\"
X.\" Copyright (c) 1994 Christos Zoulas
X.\" All rights reserved.
X.\"
X.\" Redistribution and use in source and binary forms, with or without
X.\" modification, are permitted provided that the following conditions
X.\" are met:
X.\" 1. Redistributions of source code must retain the above copyright
X.\" notice, this list of conditions and the following disclaimer.
X.\" 2. Redistributions in binary form must reproduce the above copyright
X.\" notice, this list of conditions and the following disclaimer in the
X.\" documentation and/or other materials provided with the distribution.
X.\" 3. All advertising materials mentioning features or use of this software
X.\" must display the following acknowledgement:
X.\" This product includes software developed by Christos Zoulas.
X.\" 4. The name of the author may not be used to endorse or promote products
X.\" derived from this software without specific prior written permission.
X.\"
X.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
X.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
X.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
X.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
X.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
X.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
X.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
X.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
X.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
X.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
X.\"
X.Dd April 30, 1994
X.Dt RDATE 8
X.Os
X.Sh NAME
X.Nm rdate
X.Nd set the system's date from a remote host
X.Sh SYNOPSIS
X.Nm
X.Op Fl psa
X.Ar host
X.Sh DESCRIPTION
X.Nm
displays and sets the local date and time from the
host name or address given as the argument. It uses the RFC868
protocol which is usually implemented as a built-in service of
X.Xr inetd 8 .
X.Pp
Available options:
X.Pp
X.Bl -tag -width indent
X.It Fl p
Do not set, just print the remote time
X.It Fl s
Do not print the time.
X.It Fl a
Use the
X.Xr adjtime 2
call to gradually skew the local time to the
remote time rather than just hopping.
X.El
X.Sh FILES
X.Bl -tag -width /var/log/wtmp -compact
X.It Pa /var/log/wtmp
A record of date resets and time changes.
X.El
X.Sh SEE ALSO
X.Xr adjtime 2 ,
X.Xr gettimeofday 2 ,
X.Xr utmp 5 ,
X.Xr inetd 8
SHAR_EOF
(set 20 02 08 09 22 56 19 'rdate/rdate.8'; eval "$shar_touch") &&
chmod 0664 'rdate/rdate.8' ||
$echo 'restore of' 'rdate/rdate.8' 'failed'
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'rdate/rdate.8'`"
test 2532 -eq "$shar_count" ||
$echo 'rdate/rdate.8:' 'original size' '2532,' 'current size' "$shar_count!"
fi
# ============= rdate/rdate.c ==============
if test -f 'rdate/rdate.c' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'rdate/rdate.c' '(file already exists)'
else
$echo 'x -' extracting 'rdate/rdate.c' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'rdate/rdate.c' &&
/* $Id: rdate.c,v 1.9 2002/08/14 04:27:36 kabe Exp $ */
X
/*
X * Copyright (c) 1994 Christos Zoulas
X * All rights reserved.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X * notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X * notice, this list of conditions and the following disclaimer in the
X * documentation and/or other materials provided with the distribution.
X * 3. All advertising materials mentioning features or use of this software
X * must display the following acknowledgement:
X * This product includes software developed by Christos Zoulas.
X * 4. The name of the author may not be used to endorse or promote products
X * derived from this software without specific prior written permission.
X *
X * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
X * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
X * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
X * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
X * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
X * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
X * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
X * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
X * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
X * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
X */
/* Modified for QNXRTP by kabe */
X
/*
X * rdate.c: Set the date from the specified host
X *
X * Uses the rfc868 time protocol at socket 37.
X * Time is returned as the number of seconds since
X * midnight January 1st 1900.
X */
X
#include <sys/cdefs.h>
#ifndef lint
static const char * const _rcsidNetBSD="$NetBSD: rdate.c,v 1.14 2002/07/14 01:01:10 wiz Exp $";
static const char * const _rcsid = "$Id: rdate.c,v 1.9 2002/08/14 04:27:36 kabe Exp $";
#endif /* lint */
X
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
X
#include <netinet/in.h>
X
#include <ctype.h>
#include <err.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#if __NETBSD
#include <util.h>
#endif
X
/* seconds from midnight Jan 1900 - 1970 */
#define DIFFERENCE 2208988800UL
X
static char *gProgname = "";
X
#if __USAGE
/* use Makefile to extract this ... */
//%C - set system time and date from remote host (time server port 37)
//
//%C [-psa] host
// -p just print, don't set
// -s just set, don't print
// -a use adjtime for gradual change instead of instant change
#endif
X
int
main(int argc, char *argv[])
{
X int pr = 0, silent = 0, s;
X int slidetime = 0;
X int adjustment;
X time_t tim;
X char *hname, *emsg;
X struct addrinfo hints, *res, *res0;
X int c;
X int error;
X
X gProgname=strrchr(argv[0], '/');
X if (NULL == gProgname) {
X gProgname = argv[0];
X } else {
X gProgname++; /* skip '/' */
X }
X
X adjustment = 0;
X while ((c = getopt(argc, argv, "psa")) != -1)
X switch (c) {
X case 'p':
X pr++;
X break;
X
X case 's':
X silent++;
X break;
X
X case 'a':
X slidetime++;
X break;
X
X default:
X return 1;
X }
X
X if (argc - 1 != optind) {
X fprintf(stderr, "Usage: %s [-psa] host\n", gProgname);
X return 1;
X }
X hname = argv[optind];
X
X memset(&hints, 0, sizeof (hints));
X hints.ai_family = PF_UNSPEC;
X hints.ai_socktype = SOCK_STREAM;
X hints.ai_flags = AI_CANONNAME;
X error = getaddrinfo(hname, "time", &hints, &res0);
X if (error)
X errx(1, "%s: %s", gai_strerror(error), hname);
X
X for (res = res0, s = -1; res != NULL; res = res->ai_next) {
X s = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
X if (s < 0) {
X emsg = "socket";
X continue;
X }
X
X if (connect(s, res->ai_addr, res->ai_addrlen)) {
X close(s);
X s = -1;
X emsg = "connect";
X continue;
X }
X
X break;
X }
X if (s < 0)
X err(1, "%s", emsg);
X
X if (read(s, &tim, sizeof(time_t)) != sizeof(time_t))
X err(1, "Could not read data");
X
X (void) close(s);
X tim = ntohl(tim) - DIFFERENCE;
X
X if (!pr) {
X struct timeval tv;
X if (!slidetime) {
X logwtmp("|", "date", "");
X tv.tv_sec = tim;
X tv.tv_usec = 0;
X if (settimeofday(&tv, NULL) == -1)
X err(1, "Could not set time of day");
X logwtmp("{", "date", "");
X } else {
X struct timeval tv_current;
X if (gettimeofday(&tv_current, NULL) == -1)
X err(1, "Could not get local time of day");
X /* XXX typeof(tv.tv_sec)==time_t COULD BE UNSIGNED! */
X adjustment = tv.tv_sec = tim - tv_current.tv_sec;
X tv.tv_usec = 0;
X if (adjtime(&tv, NULL) == -1)
X err(1, "Could not adjust time of day");
X }
X }
X
X if (!silent) {
X (void) fputs(ctime(&tim), stdout);
X if (slidetime)
X (void) fprintf(stdout,
X "%s: adjust local clock by %d seconds\n",
X gProgname, adjustment);
X }
X return 0;
}
X
SHAR_EOF
(set 20 02 08 14 13 27 36 'rdate/rdate.c'; eval "$shar_touch") &&
chmod 0664 'rdate/rdate.c' ||
$echo 'restore of' 'rdate/rdate.c' 'failed'
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'rdate/rdate.c'`"
test 5086 -eq "$shar_count" ||
$echo 'rdate/rdate.c:' 'original size' '5086,' 'current size' "$shar_count!"
fi
# ============= rdate/TODO ==============
if test -f 'rdate/TODO' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'rdate/TODO' '(file already exists)'
else
$echo 'x -' extracting 'rdate/TODO' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'rdate/TODO' &&
#test functions of crafted adjtime()
#don't go backwards (don't set beyond ticksize in ClockAdjust delta)
X
package?
SHAR_EOF
(set 20 02 08 31 02 32 04 'rdate/TODO'; eval "$shar_touch") &&
chmod 0664 'rdate/TODO' ||
$echo 'restore of' 'rdate/TODO' 'failed'
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'rdate/TODO'`"
test 116 -eq "$shar_count" ||
$echo 'rdate/TODO:' 'original size' '116,' 'current size' "$shar_count!"
fi
# ============= rdate/adjtime.c ==============
if test -f 'rdate/adjtime.c' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'rdate/adjtime.c' '(file already exists)'
else
$echo 'x -' extracting 'rdate/adjtime.c' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'rdate/adjtime.c' &&
/*
X * adjtime() for QNXNTO
X *
X */
static const char * const _rcsid="$Id: adjtime.c,v 1.11 2002/08/30 17:15:45 kabe Exp $";
X
#include <stdio.h>
#include <sys/types.h>
#include <sys/time.h>
#include <stdint.h>
X
#if __QNXNTO__
#include <sys/neutrino.h>
#define UNSIGNED_TV_SEC
#endif
X
#if defined(__QNXNTO__) && !defined(HAVE_ADJTIME)
int
adjtime(struct timeval *delta, struct timeval * const olddelta)
{
X int retval = 0;
X struct _clockadjust newadjust;
X struct _clockadjust oldadjust;
X
#ifdef DEBUG
X /* in RTP, time_t (uint32) tv_sec, suseconds_t (int32) tv_usec */
X if (delta) fprintf(stderr,"adjtime: %ld:%ld\n", (long)delta->tv_sec, (long)delta->tv_usec);
#endif
X
X if (delta) {
X int64_t nto_delta; /* nanosecs */
X struct _clockperiod nto_period;
X long tickadj; /*nanosec*/
X
X /* XXX typeof(tv.tv_sec)==time_t COULD BE UNSIGNED! */
X nto_delta =
#ifdef UNSIGNED_TV_SEC
X (int64_t)(signed long)delta->tv_sec * 1000000000LL +
#else
X (int64_t)delta->tv_sec * 1000000000LL +
#endif
X (int64_t)delta->tv_usec * 1000LL;
X
#ifdef DEBUG
X fprintf(stderr,"adjtime: delta=%lldns\n", nto_delta);
#endif
X
X /* get current tick length */
X ClockPeriod(CLOCK_REALTIME, NULL, &nto_period, 0);
X
X /* 10% deviation from standard tick */
X tickadj = nto_period.nsec * 10/*percent*/ / 100;
X if (-tickadj < nto_delta && nto_delta < tickadj) {
X /* lesser than 10% (including zero);
X direct bump by one tick */
X tickadj = nto_delta;
X newadjust.tick_nsec_inc = tickadj;
X newadjust.tick_count = 1;
X } else {
X if (nto_delta<0) tickadj = -tickadj;
X newadjust.tick_nsec_inc = tickadj;
X newadjust.tick_count = nto_delta / tickadj; /* possible roundoff error */
X }
#ifdef DEBUG
X fprintf(stderr, "adjtime: Slewing %ld nsec * %lu ticks (range %ld seconds)\n",
X newadjust.tick_nsec_inc, newadjust.tick_count,
X (long)((uint64_t)newadjust.tick_count*nto_period.nsec/1000000000L));
#endif
X retval = ClockAdjust(CLOCK_REALTIME, &newadjust, &oldadjust);
X }
X
X if (olddelta) {
X int64_t d;
X if (!delta)
X retval = ClockAdjust(CLOCK_REALTIME, NULL, &oldadjust);
X /* XXX overflow warning */
X /* but could not if previous adjtime fitted in nto_delta */
X d = (int64_t)oldadjust.tick_nsec_inc * oldadjust.tick_count;
X d /= 1000; /* nanosec to usec */
X olddelta->tv_sec = d / 1000000; /* usec to sec */
X /* beware for negative d;
X * should -1us be {0,-1} or {-1, 999999}? */
X d -= olddelta->tv_sec * 1000000;
X olddelta->tv_usec = d;
X }
X
X return retval;
}
#endif /* __QNXNTO__ */
SHAR_EOF
(set 20 02 08 31 02 15 45 'rdate/adjtime.c'; eval "$shar_touch") &&
chmod 0664 'rdate/adjtime.c' ||
$echo 'restore of' 'rdate/adjtime.c' 'failed'
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'rdate/adjtime.c'`"
test 2493 -eq "$shar_count" ||
$echo 'rdate/adjtime.c:' 'original size' '2493,' 'current size' "$shar_count!"
fi
# ============= rdate/a.c ==============
if test -f 'rdate/a.c' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'rdate/a.c' '(file already exists)'
else
$echo 'x -' extracting 'rdate/a.c' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'rdate/a.c' &&
#include <stdio.h>
#include <sys/time.h>
X
int
main(int argc, char *argv[])
{
X struct timeval old,new;
X if (argc>1) {
X new.tv_sec=0;
X new.tv_usec = atoi(argv[1]);
X printf("adjust %ld usec\n", new.tv_usec);
X adjtime(&new, NULL);
X }
X adjtime(NULL, &old);
X printf("delta=%ld.%ld\n", (long)old.tv_sec, (long)old.tv_usec);
}
SHAR_EOF
(set 20 02 08 31 02 19 31 'rdate/a.c'; eval "$shar_touch") &&
chmod 0664 'rdate/a.c' ||
$echo 'restore of' 'rdate/a.c' 'failed'
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'rdate/a.c'`"
test 323 -eq "$shar_count" ||
$echo 'rdate/a.c:' 'original size' '323,' 'current size' "$shar_count!"
fi
# ============= rdate/rdate-1.1-x86-public.qpr ==============
if test -f 'rdate/rdate-1.1-x86-public.qpr' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'rdate/rdate-1.1-x86-public.qpr' '(file already exists)'
else
$echo 'x -' extracting 'rdate/rdate-1.1-x86-public.qpr' '(binary)'
sed 's/^X//' << 'SHAR_EOF' | uudecode &&
begin 600 rdate/rdate-1.1-x86-public.qpr
M'XL(`$2J;ST``^Q:>3Q4Z_]7E%!:=&]H<4(DS!AKMI$U9!]<E6C,G.$P,V?,
MG#%DN6DA6BF2%*Y*5$JW$&DCM(E4*EL4RK54DB7E=\:2=73_N-_[_?WQ?5X<
MX_F\/]OS69[G.:]ADHD(J(S#X)09;`\J1,+X,GSX_N&A@E-145=7YU,9&L-_
M<2/_:ZBKJO*I:&FHJ6FI:N!4U%"\JI:6)A^@\D\;,M5@LQ`B$S6%"</(=#@/
MB/YOF/-O#ZF]<_B,TV%]/OXV"1]650[.W?:F1_'A8[)JEU>$%%LCIU?I-#G&
M(K(QZU.E1.6(0CB+#W/*(MLK.3.B8U='^&VSKO$)UXVU(B[Y6K3#I?"]]:WK
M?@UB%E4K;-^%9#^CN2^5^>L)4KW$0$"GQJ;Y[=MWIO([^W__F%?5AGSL_=SS
MX</GUSE5VB9]*04%AY>4]>(:I,(=S:.3U@@U?\+I-(0_3BYE%>0EWMP]H[K"
M1&5%?MU?63J!!MV2':VW&[5#^**B[&P[NIL<BIK;OGAD>BF+;M8[UM;XPEVN
M<E4K7)X=6UR0[\;/IYXZXQ>W.QX1TMNK/S@Z5YQ3*/D09'1=5S6E4M8CV[%D
M9G:H&^FZ6:;A6PSIE5J#>&?"ZON<-FMRX].%0I#MQ7E7E;Z0\ETL.S5,&X/"
MO]E4/?,Z/OO('!W+@J7QGW-7%8'5!*799STZDB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)>72F]J,W
M'PRZ+Y#+7+]:$^6T1X9?<7]GV&/DX1Z1W;LGM4^RKK,3`!3N<V443#FG*KK)
M/\/<WZJN_^>SIO[_X5_8___?ZH#]&_O_;)R\?_[_!R<7!R=T____!%#_Z^_P
MO_XZ1?Y>!XR7@XL-ZH#]1SE@?W%H?C^\O]<%8^?A9.?^7Y#!F"WLG)P-_GQA
MJ!4&M<*@5MA_"BN,];_/?:@9]K=;0LTPJ!GVI^GP?ZT9]D\VUG^$'O;/Y?(_
M5T'%L3^)8R+_?,7U3T50E>QOCO&_#$DG!4MC1R-'#Q$;2V.GWR\54V<6)SL6
MCO\V5/['G']7+Q__71W\OV:T_8W\OPP?$Q='T__I3?,/U=_^\4;:7]/^JRKU
MKSA/?]7"_G4I#"HV08$"!0H4*%"@0($"!0H4*%"@0($"!0H4*%"@0($"!0H4
/*%"@_`/X+QLCY5$`>```
`
end
SHAR_EOF
(set 20 02 08 31 02 24 20 'rdate/rdate-1.1-x86-public.qpr'; eval "$shar_touch") &&
chmod 0666 'rdate/rdate-1.1-x86-public.qpr' ||
$echo 'restore of' 'rdate/rdate-1.1-x86-public.qpr' 'failed'
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'rdate/rdate-1.1-x86-public.qpr'`"
test 12075 -eq "$shar_count" ||
$echo 'rdate/rdate-1.1-x86-public.qpr:' 'original size' '12075,' 'current size' "$shar_count!"
fi
# ============= rdate/rdate.qpg ==============
if test -f 'rdate/rdate.qpg' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'rdate/rdate.qpg' '(file already exists)'
else
$echo 'x -' extracting 'rdate/rdate.qpg' '(binary)'
sed 's/^X//' << 'SHAR_EOF' | uudecode &&
begin 600 rdate/rdate.qpg
M/%%01SI'96YE<F%T:6]N/@H@("`\45!'.D]P=&EO;G,^"B`@("`@(#Q14$<Z
M57-E<B!U;F%T=&5N9&5D/2)N;R(@=F5R8F]S:71Y/2(R(B!L:7-T9FEL97,]
M(GEE<R(O/@H@("`@("`\45!'.D1E9F%U;'1S('1Y<&4](G%N>%]P86-K86=E
M(B\^"B`@("`@(#Q14$<Z4V]U<F-E/CPO45!'.E-O=7)C93X*("`@("`@/%%0
M1SI296QE87-E(&YU;6)E<CTB*R(O/@H@("`@("`\45!'.D)U:6QD/CPO45!'
M.D)U:6QD/@H@("`@("`\45!'.D9I;&53;W)T:6YG('-T<FEP/2)Y97,B+SX*
M("`@("`@/%%01SI086-K86=E('1A<F=E=',](F-O;6)I;F4B+SX*("`@("`@
M/%%01SI297!O<VET;W)Y(&=E;F5R871E/2)N;R(O/@H@("`@("`\45!'.D9I
M;F%L1&ER/CPO45!'.D9I;F%L1&ER/@H@("`@("`\45!'.D-L96%N=7`^/"]1
M4$<Z0VQE86YU<#X*("`@/"]14$<Z3W!T:6]N<SX*"B`@(#Q14$<Z4F5S<&]N
M<VEB;&4^"B`@("`@(#Q14$<Z0V]M<&%N>3X\+U%01SI#;VUP86YY/@H@("`@
M("`\45!'.D1E<&%R=&UE;G0^/"]14$<Z1&5P87)T;65N=#X*("`@("`@/%%0
M1SI'<F]U<#X\+U%01SI'<F]U<#X*("`@("`@/%%01SI496%M/CPO45!'.E1E
M86T^"B`@("`@(#Q14$<Z16UP;&]Y964^/"]14$<Z16UP;&]Y964^"B`@("`@
M(#Q14$<Z16UA:6Q!9&1R97-S/CPO45!'.D5M86EL061D<F5S<SX*("`@/"]1
M4$<Z4F5S<&]N<VEB;&4^"@H@("`\45!'.E9A;'5E<SX*"B`@("`@(#Q14$<Z
M4&%C:V%G949I;'1E<CX*("`@("`@("`@/%%033I086-K86=E36%N:69E<W0^
M"B`@("`@("`@("`@(#Q14$TZ4&%C:V%G941E<V-R:7!T:6]N/@H@("`@("`@
M("`@("`@("`\45!-.E!A8VMA9V54>7!E/D%P<&QI8V%T:6]N/"]14$TZ4&%C
M:V%G951Y<&4^"B`@("`@("`@("`@("`@(#Q14$TZ4&%C:V%G95)E<&]S:71O
M<GD^/"]14$TZ4&%C:V%G95)E<&]S:71O<GD^"B`@("`@("`@("`@("`@(#Q1
M4$TZ1FEL959E<G-I;VX^,2XY/"]14$TZ1FEL959E<G-I;VX^"B`@("`@("`@
M("`@(#PO45!-.E!A8VMA9V5$97-C<FEP=&EO;CX*"B`@("`@("`@("`@(#Q1
M4$TZ4')O9'5C=$1E<V-R:7!T:6]N/@H@("`@("`@("`@("`@("`\45!-.E!R
M;V1U8W1.86UE/G)D871E($1A=&4@4WEN8W)O;FEZ871I;VX@0V]M;6%N9#PO
M45!-.E!R;V1U8W1.86UE/@H@("`@("`@("`@("`@("`\45!-.E!R;V1U8W1)
M9&5N=&EF:65R/G)D871E/"]14$TZ4')O9'5C=$ED96YT:69I97(^"B`@("`@
M("`@("`@("`@(#Q14$TZ4')O9'5C=$5M86EL/CPO45!-.E!R;V1U8W1%;6%I
M;#X*("`@("`@("`@("`@("`@/%%033I696YD;W).86UE/E!U8FQI8SPO45!-
M.E9E;F1O<DYA;64^"B`@("`@("`@("`@("`@(#Q14$TZ5F5N9&]R26YS=&%L
M;$YA;64^<'5B;&EC/"]14$TZ5F5N9&]R26YS=&%L;$YA;64^"B`@("`@("`@
M("`@("`@(#Q14$TZ5F5N9&]R55),/CPO45!-.E9E;F1O<E523#X*("`@("`@
M("`@("`@("`@/%%033I696YD;W)%;6)E9%523#X\+U%033I696YD;W)%;6)E
M9%523#X*("`@("`@("`@("`@("`@/%%033I696YD;W)%;6%I;#YK86)E0'-R
M82UT;VAO:W4N8V\N:G`\+U%033I696YD;W)%;6%I;#X*("`@("`@("`@("`@
M("`@/%%033I!=71H;W).86UE/D-H<FES=&]S(%IO=6QA<R`O($YE=$)31#PO
M45!-.D%U=&AO<DYA;64^"B`@("`@("`@("`@("`@(#Q14$TZ075T:&]R55),
M/CPO45!-.D%U=&AO<E523#X*("`@("`@("`@("`@("`@/%%033I!=71H;W)%
M;6)E9%523#X\+U%033I!=71H;W)%;6)E9%523#X*("`@("`@("`@("`@("`@
M/%%033I!=71H;W)%;6%I;#X\+U%033I!=71H;W)%;6%I;#X*("`@("`@("`@
M("`@("`@/%%033I0<F]D=6-T26-O;E-M86QL/CPO45!-.E!R;V1U8W1)8V]N
M4VUA;&P^"B`@("`@("`@("`@("`@(#Q14$TZ4')O9'5C=$EC;VY,87)G93X\
M+U%033I0<F]D=6-T26-O;DQA<F=E/@H@("`@("`@("`@("`@("`\45!-.E!R
M;V1U8W1$97-C<FEP=&EO;E-H;W)T/F$@8V]M;6%N9"!F;W(@<WEN8W)O;FEZ
M:6YG('1H92!C;&]C:R!T;R!O=&AE<B!M86-H:6YE/"]14$TZ4')O9'5C=$1E
M<V-R:7!T:6]N4VAO<G0^"B`@("`@("`@("`@("`@(#Q14$TZ4')O9'5C=$1E
M<V-R:7!T:6]N3&]N9SYR9&%T92!C;VUM86YD(&-O;G-U;'1S('1H92!T:6UE
M('-E<G9I8V4@*%1#4"!P;W)T(#,W*2!O9B!T:&4@;W1H97(@;6%C:&EN92!A
M;F0@<V5T<R!T:&4@;&]C86P@8VQO8VL@86-C;W)D:6YG;'DL('=I=&AI;B`Q
M('-E8V]N9"!G<F%N=6QA<FET>2X\+U%033I0<F]D=6-T1&5S8W)I<'1I;VY,
M;VYG/@H@("`@("`@("`@("`@("`\45!-.E!R;V1U8W1$97-C<FEP=&EO;E52
M3#X\+U%033I0<F]D=6-T1&5S8W)I<'1I;VY54DP^"B`@("`@("`@("`@("`@
M(#Q14$TZ4')O9'5C=$1E<V-R:7!T:6]N16UB96154DP^/"]14$TZ4')O9'5C
M=$1E<V-R:7!T:6]N16UB96154DP^"B`@("`@("`@("`@(#PO45!-.E!R;V1U
M8W1$97-C<FEP=&EO;CX*"B`@("`@("`@("`@(#Q14$TZ4F5L96%S941E<V-R
M:7!T:6]N/@H@("`@("`@("`@("`@("`\45!-.E)E;&5A<V5697)S:6]N/C$N
M,3PO45!-.E)E;&5A<V5697)S:6]N/@H@("`@("`@("`@("`@("`\45!-.E)E
M;&5A<V55<F=E;F-Y/DAI9V@\+U%033I296QE87-E57)G96YC>3X*("`@("`@
M("`@("`@("`@/%%033I296QE87-E4W1A8FEL:71Y/E-T86)L93PO45!-.E)E
M;&5A<V53=&%B:6QI='D^"B`@("`@("`@("`@("`@(#Q14$TZ4F5L96%S94YO
M=&5-:6YO<CY&:7AE9"!C;W)E9'5M<"]W:6QD(&]F9G-E="!O;B!S;6%L;"!N
M96=A=&EV92!S:V5W:6YG/"]14$TZ4F5L96%S94YO=&5-:6YO<CX*("`@("`@
M("`@("`@("`@/%%033I296QE87-E3F]T94UA:F]R/E1H:7,@8V]M;6%N9"!I
M<R!A(%%.6"!P;W)T(&]F('1H92!.971"4T0@<F1A=&4N"F%D:G1I;64H*2!I
M<R!N;W0@<')O=FED960@:6X@3F5U=')I;F\L('-O(&$@8W5S=&]M(&-O9&4@
M=&\@=')A;G-L871E(&%D:G1I;64H*2!T;R!#;&]C:T%D:G5S="@I('=A<R!A
M9&1E9"X\+U%033I296QE87-E3F]T94UA:F]R/@H@("`@("`@("`@("`@("`\
M45!-.D-O=6YT<GE%>&-L=61E/CPO45!-.D-O=6YT<GE%>&-L=61E/@H@("`@
M("`@("`@("`@("`\45!-.E)E;&5A<V5#;W!Y<FEG:'0^0E-$($QI8V5N<V4\
M+U%033I296QE87-E0V]P>7)I9VAT/@H@("`@("`@("`@("`\+U%033I296QE
M87-E1&5S8W)I<'1I;VX^"@H@("`@("`@("`@("`\45!-.D-O;G1E;G1$97-C
M<FEP=&EO;CX*("`@("`@("`@("`@("`@/%%033I#;VYT96YT5&]P:6,@>&UL
M;75L=&EP;&4](G1R=64B/E-Y<W1E;3PO45!-.D-O;G1E;G14;W!I8SX*("`@
M("`@("`@("`@("`@/%%033I#;VYT96YT2V5Y=V]R9#YR9&%T92QD871E+'1I
M;64@<WEN8W)O;FEZ93PO45!-.D-O;G1E;G1+97EW;W)D/@H@("`@("`@("`@
M("`@("`\45!-.E1A<F=E=$]3/G%N>#8\+U%033I487)G971/4SX*("`@("`@
M("`@("`@("`@/%%033I(;W-T3U,^;F]N93PO45!-.DAO<W1/4SX*("`@("`@
M("`@("`@("`@/%%033I$:7-P;&%Y16YV:7)O;FUE;G0@>&UL;75L=&EP;&4]
M(G1R=64B/D-O;G-O;&4\+U%033I$:7-P;&%Y16YV:7)O;FUE;G0^"B`@("`@
M("`@("`@("`@(#Q14$TZ5&%R9V5T075D:65N8V4@>&UL;75L=&EP;&4](G1R
M=64B/D%D;6EN:7-T<F%T;W(\+U%033I487)G971!=61I96YC93X*("`@("`@
M("`@("`@/"]14$TZ0V]N=&5N=$1E<V-R:7!T:6]N/@H*("`@("`@("`@("`@
M/%%033I,:6-E;G-E57)L/CPO45!-.DQI8V5N<V55<FP^"B`@("`@("`@(#PO
M45!-.E!A8VMA9V5-86YI9F5S=#X*("`@("`@/"]14$<Z4&%C:V%G949I;'1E
G<CX*"B`@(#PO45!'.E9A;'5E<SX*/"]14$<Z1V5N97)A=&EO;CX*
`
end
SHAR_EOF
(set 20 02 08 31 02 21 34 'rdate/rdate.qpg'; eval "$shar_touch") &&
chmod 0664 'rdate/rdate.qpg' ||
$echo 'restore of' 'rdate/rdate.qpg' 'failed'
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'rdate/rdate.qpg'`"
test 3819 -eq "$shar_count" ||
$echo 'rdate/rdate.qpg:' 'original size' '3819,' 'current size' "$shar_count!"
fi
rm -fr _sh04593
exit 0

Jerry Chappell

Re: [source] rdate-1.1

Post by Jerry Chappell » Fri Aug 30, 2002 7:33 pm

Make sure any .qpg file you have is not marked executable.

Jerry Chappell

Guest

Re: [source] rdate-1.1

Post by Guest » Fri Aug 30, 2002 7:50 pm

jchappell@qnx.com sed in <akogv9$7bb$1@nntp.qnx.com>
Make sure any .qpg file you have is not marked executable.
Not.
# 3819 -rw-rw-r-- rdate/rdate.qpg
After reading the source (sharutils-4.2.1/src/shar.c),
it revealed that sharutils treats the file as binary when there's
* MSB-set-char, or
* line longer than MAXIMUM_NON_BINARY_LINE (200),
which latter will trigger in some of the manifest files.
(Description and Release notes are usually crammed into one line)


Wrapping these loong text in the *.qpg by hand also makes
"qnxinstall"'s comment window wrap accordingly;
isn't this violating XML which should treat
linebreaks equivalent to whitespace?
--
kabe

Jerry Chappell

Re: [source] rdate-1.1

Post by Jerry Chappell » Fri Aug 30, 2002 8:57 pm

Unfortunately, Manifests (QPMs) are not 'official' XML. There have been some
tweaks to make them work according to the installers/packagers used at the
time the packages are generated.

<kabe@sra-tohoku.co.jp> wrote in message news:akoi9t$loj$1@inn.qnx.com...
jchappell@qnx.com sed in <akogv9$7bb$1@nntp.qnx.com

Make sure any .qpg file you have is not marked executable.
Not.
# 3819 -rw-rw-r-- rdate/rdate.qpg


After reading the source (sharutils-4.2.1/src/shar.c),
it revealed that sharutils treats the file as binary when there's
* MSB-set-char, or
* line longer than MAXIMUM_NON_BINARY_LINE (200),
which latter will trigger in some of the manifest files.
(Description and Release notes are usually crammed into one line)


Wrapping these loong text in the *.qpg by hand also makes
"qnxinstall"'s comment window wrap accordingly;
isn't this violating XML which should treat
linebreaks equivalent to whitespace?
--
kabe

Jerry Chappell

Re: [source] rdate-1.1

Post by Jerry Chappell » Fri Aug 30, 2002 8:59 pm

If you add files to your package using a <QPG:Add> line, then you can add
proc="none" to force a QPG into the processor-independent package.

<kabe@sra-tohoku.co.jp> wrote in message news:akoi9t$loj$1@inn.qnx.com...
jchappell@qnx.com sed in <akogv9$7bb$1@nntp.qnx.com

Make sure any .qpg file you have is not marked executable.
Not.
# 3819 -rw-rw-r-- rdate/rdate.qpg


After reading the source (sharutils-4.2.1/src/shar.c),
it revealed that sharutils treats the file as binary when there's
* MSB-set-char, or
* line longer than MAXIMUM_NON_BINARY_LINE (200),
which latter will trigger in some of the manifest files.
(Description and Release notes are usually crammed into one line)


Wrapping these loong text in the *.qpg by hand also makes
"qnxinstall"'s comment window wrap accordingly;
isn't this violating XML which should treat
linebreaks equivalent to whitespace?
--
kabe

Guest

Re: [source] rdate-1.1

Post by Guest » Sun Sep 01, 2002 12:02 am

If you add files to your package using a <QPG:Add> line, then you can add
[snip]
Thanks for followups, but I was talking about "shar",
not the QNX "packager". "packager" isn't stupid enough to pack *qpg as binary.
Sorry for the confusion
(And the Subject became too off topic...)
--
kabe

Post Reply

Return to “qdn.public.qnxrtp.porting”