1 diff -Nru at-3.1.8/at.1.in at-3.1.8.new/at.1.in
2 --- at-3.1.8/at.1.in Sun Mar 28 19:48:00 1999
3 +++ at-3.1.8.new/at.1.in Sun Mar 28 19:46:41 1999
8 -cron(1), nice(1), sh(1), umask(2), atd(8)
15 The correct operation of
17 diff -Nru at-3.1.8/at.c at-3.1.8.new/at.c
18 --- at-3.1.8/at.c Sun Mar 28 19:48:00 1999
19 +++ at-3.1.8.new/at.c Sun Mar 28 19:46:41 1999
21 /* Install the signal handler for SIGINT; terminate after removing the
22 * spool file if necessary
24 + memset(&act, 0, sizeof act);
25 act.sa_handler = sigc;
26 sigemptyset(&(act.sa_mask));
29 if ((jobno = nextjob()) == EOF)
30 perr("Cannot generate job number");
32 - sprintf(ppos, "%c%5lx%8lx", queue,
33 - jobno, (unsigned long) (runtimer / 60));
34 + (void)snprintf(ppos, sizeof(atfile) - (ppos - atfile),
35 + "%c%5lx%8lx", queue, jobno, (unsigned long) (runtimer / 60));
37 for (ap = ppos; *ap != '\0'; ap++)
40 * bit. Yes, this is a kluge.
42 cmask = umask(S_IRUSR | S_IWUSR | S_IXUSR);
43 - if ((fd = creat(atfile, O_WRONLY)) == -1)
44 + if ((fd = open(atfile, O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR)) == -1)
45 perr("Cannot create atjob file %.500s", atfile);
47 if ((fd2 = dup(fd)) < 0)
52 - /* POSIX.2 allows the shell specified by the user's SHELL environment
53 - variable, the login shell from the user's password database entry,
54 - or /bin/sh to be the command interpreter that processes the at-job.
55 - It also alows a warning diagnostic to be printed. Because of the
56 - possible variance, we always output the diagnostic. */
58 - fprintf(stderr, "warning: commands will be executed using /bin/sh\n");
60 runtime = localtime(&runtimer);
62 /* We only use the sick POSIX time format if POSIXLY_CORRECT
66 char timestr[TIMESIZE];
73 strftime(timestr, TIMESIZE, TIMEFORMAT_ISO, runtime);
75 - printf("%ld\t%s %c\n", jobno, timestr, queue);
76 + if ((pwd = getpwuid(buf.st_uid)))
77 + printf("%ld\t%s %c %s\n", jobno, timestr, queue, pwd->pw_name);
79 + printf("%ld\t%s %c\n", jobno, timestr, queue);
86 int program = AT; /* our default program */
87 - char *options = "q:f:mvldVc"; /* default options for at */
88 + char *options = "q:f:mvldhVc"; /* default options for at */
94 if (strcmp(pgm, "atq") == 0) {
98 } else if (strcmp(pgm, "atrm") == 0) {
103 /* process whatever options we can process
106 while ((c = getopt(argc, argv, options)) != EOF)
112 case 'v': /* verify time settings */
118 atqueue = queue = *optarg;
119 - if (!(islower(queue) || isupper(queue)))
120 + if (!(islower(queue) || isupper(queue)) & (queue != '='))
125 struct tm *tm = localtime(&timer);
126 fprintf(stderr, "%s\n", asctime(tm));
129 + /* POSIX.2 allows the shell specified by the user's SHELL environment
130 + variable, the login shell from the user's password database entry,
131 + or /bin/sh to be the command interpreter that processes the at-job.
132 + It also alows a warning diagnostic to be printed. Because of the
133 + possible variance, we always output the diagnostic. */
135 + fprintf(stderr, "warning: commands will be executed using /bin/sh\n");
137 writefile(timer, queue);
140 diff -Nru at-3.1.8/at.deny at-3.1.8.new/at.deny
141 --- at-3.1.8/at.deny Sun Feb 23 21:24:34 1997
142 +++ at-3.1.8.new/at.deny Sun Mar 28 19:46:41 1999
176 diff -Nru at-3.1.8/at_allow.5 at-3.1.8.new/at_allow.5
177 --- at-3.1.8/at_allow.5 Sun Mar 28 19:48:00 1999
178 +++ at-3.1.8.new/at_allow.5 Sun Mar 28 19:46:41 1999
183 -at(1), atrun(1), cron(1), crontab(1), atd(8)
189 diff -Nru at-3.1.8/atd.8.in at-3.1.8.new/atd.8.in
190 --- at-3.1.8/atd.8.in Sun Mar 28 19:48:00 1999
191 +++ at-3.1.8.new/atd.8.in Sun Mar 28 19:46:41 1999
195 for backward compatibility.
198 +won't work if its spool directory is mounted via NFS even if
203 The directory for storing jobs; this should be mode 700, owner
208 -at(1), atrun(1), cron(1), crontab(1), syslog(3), at_deny(5), at_allow(5)
219 should be merged into
222 diff -Nru at-3.1.8/atd.c at-3.1.8.new/atd.c
223 --- at-3.1.8/atd.c Sun Sep 28 22:00:37 1997
224 +++ at-3.1.8.new/atd.c Sun Mar 28 19:46:41 1999
227 fcntl(fd_in, F_SETFD, fflags & ~FD_CLOEXEC);
230 + * If the spool directory is mounted via NFS `atd' isn't able to
231 + * read from the job file and will bump out here. The file is
232 + * opened as "root" but it is read as "daemon" which fails over
233 + * NFS and works with local file systems. It's not clear where
234 + * the bug is located. -Joey
236 if (fscanf(stream, "#!/bin/sh\n# atrun uid=%d gid=%d\n# mail %8s %d",
237 &nuid, &ngid, mailbuf, &send_mail) != 4)
238 pabort("File %.500s is in wrong format - aborting",
239 diff -Nru at-3.1.8/batch at-3.1.8.new/batch
240 --- at-3.1.8/batch Thu Jan 1 01:00:00 1970
241 +++ at-3.1.8.new/batch Sun Mar 28 19:46:41 1999
245 +exec_prefix=${prefix}
246 +exec ${exec_prefix}/bin/at -qb now "$@"
247 diff -Nru at-3.1.8/config.guess at-3.1.8.new/config.guess
248 --- at-3.1.8/config.guess Sun Feb 23 21:24:34 1997
249 +++ at-3.1.8.new/config.guess Sun Mar 28 19:46:41 1999
252 # Attempt to guess a canonical system name.
253 -# Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
254 +# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
256 # This file is free software; you can redistribute it and/or modify it
257 # under the terms of the GNU General Public License as published by
259 # Note: order is significant - the case branches are not exclusive.
261 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
263 - # After 1.2, OSF1 uses "V1.3" for uname -r.
264 - echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'`
267 + if test $UNAME_RELEASE = "V4.0"; then
268 + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
270 + # A Vn.n version is a released version.
271 + # A Tn.n version is a released field test version.
272 + # A Xn.n version is an unreleased experimental baselevel.
273 # 1.2 uses "1.2" for uname -r.
274 - echo alpha-dec-osf${UNAME_RELEASE}
280 + .frame \$30,0,\$26,0
282 + .long 0x47e03d80 # implver $0
284 + .long 0x47e20c21 # amask $2,$1
293 + ${CC-cc} dummy.s -o dummy 2>/dev/null
294 + if test "$?" = 0 ; then
298 + UNAME_MACHINE="alpha"
301 + UNAME_MACHINE="alphaev5"
304 + UNAME_MACHINE="alphaev56"
307 + UNAME_MACHINE="alphapca56"
310 + UNAME_MACHINE="alphaev6"
314 + rm -f dummy.s dummy
315 + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
317 21064:Windows_NT:50:3)
318 echo alpha-dec-winnt3.5
320 + Amiga*:UNIX_System_V:4.0:*)
321 + echo m68k-cbm-sysv4
324 echo m68k-cbm-netbsd${UNAME_RELEASE}
327 + echo m68k-unknown-openbsd${UNAME_RELEASE}
330 + echo mips64el-unknown-openbsd${UNAME_RELEASE}
333 + echo mipsel-unknown-openbsd${UNAME_RELEASE}
335 + hkmips:OpenBSD:*:*)
336 + echo mips-unknown-openbsd${UNAME_RELEASE}
339 + echo mipsel-unknown-openbsd${UNAME_RELEASE}
342 + echo mips-unknown-openbsd${UNAME_RELEASE}
344 + wgrisc:OpenBSD:*:*)
345 + echo mipsel-unknown-openbsd${UNAME_RELEASE}
347 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
348 echo arm-acorn-riscix${UNAME_RELEASE}
352 + echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
354 + SR2?01:HI-UX/MPP:*:*)
355 + echo hppa1.1-hitachi-hiuxmpp
357 + Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
358 + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
359 if test "`(/bin/universe) 2>/dev/null`" = att ; then
360 echo pyramid-pyramid-sysv3
362 echo pyramid-pyramid-bsd
367 + echo pyramid-pyramid-svr4
369 + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
370 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
373 - echo i386-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
374 + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
377 # According to config.sub, this is the proper way to canonicalize
380 echo m68k-sun-sunos${UNAME_RELEASE}
383 + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
384 + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
385 + case "`/bin/arch`" in
387 + echo m68k-sun-sunos${UNAME_RELEASE}
390 + echo sparc-sun-sunos${UNAME_RELEASE}
395 + echo sparc-auspex-sunos${UNAME_RELEASE}
398 echo m68k-atari-netbsd${UNAME_RELEASE}
400 + atari*:OpenBSD:*:*)
401 + echo m68k-unknown-openbsd${UNAME_RELEASE}
404 echo m68k-sun-netbsd${UNAME_RELEASE}
407 + echo m68k-unknown-openbsd${UNAME_RELEASE}
410 echo m68k-apple-netbsd${UNAME_RELEASE}
412 + mac68k:OpenBSD:*:*)
413 + echo m68k-unknown-openbsd${UNAME_RELEASE}
415 + mvme68k:OpenBSD:*:*)
416 + echo m68k-unknown-openbsd${UNAME_RELEASE}
418 + mvme88k:OpenBSD:*:*)
419 + echo m88k-unknown-openbsd${UNAME_RELEASE}
421 + powerpc:machten:*:*)
422 + echo powerpc-apple-machten${UNAME_RELEASE}
425 + echo mips-dec-mach_bsd4.3
428 echo mips-dec-ultrix${UNAME_RELEASE}
431 echo vax-dec-ultrix${UNAME_RELEASE}
435 + echo clipper-intergraph-clix${UNAME_RELEASE}
437 + mips:*:*:UMIPS | mips:*:*:RISCos)
438 + sed 's/^ //' << EOF >dummy.c
439 + int main (argc, argv) int argc; char **argv; {
440 + #if defined (host_mips) && defined (MIPSEB)
441 + #if defined (SYSTYPE_SYSV)
442 + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
444 + #if defined (SYSTYPE_SVR4)
445 + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
447 + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
448 + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
454 + ${CC-cc} dummy.c -o dummy \
455 + && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
456 + && rm dummy.c dummy && exit 0
457 + rm -f dummy.c dummy
458 echo mips-mips-riscos${UNAME_RELEASE}
460 + Night_Hawk:Power_UNIX:*:*)
461 + echo powerpc-harris-powerunix
464 echo m88k-harris-cxux7
466 @@ -127,12 +264,17 @@
467 echo m88k-motorola-sysv3
470 + # DG/UX returns AViiON for all architectures
471 + UNAME_PROCESSOR=`/usr/bin/uname -p`
472 + if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
473 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
474 -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
475 echo m88k-dg-dgux${UNAME_RELEASE}
477 echo m88k-dg-dguxbcs${UNAME_RELEASE}
479 + else echo i586-dg-dgux${UNAME_RELEASE}
482 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
483 echo m88k-dolphin-sysv3
484 @@ -150,10 +292,10 @@
486 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
488 - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
489 + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
490 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
491 exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
500 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
501 - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
502 + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
503 exit 0 ;; # report: romp-ibm BSD 4.3
505 echo rs6000-bull-bosx
507 case "${UNAME_MACHINE}" in
508 9000/31? ) HP_ARCH=m68000 ;;
509 9000/[34]?? ) HP_ARCH=m68k ;;
510 - 9000/7?? | 9000/8?[79] ) HP_ARCH=hppa1.1 ;;
511 + 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
512 9000/8?? ) HP_ARCH=hppa1.0 ;;
514 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
520 + if [ -x /usr/sbin/sysversion ] ; then
521 + echo ${UNAME_MACHINE}-unknown-osf1mk
523 + echo ${UNAME_MACHINE}-unknown-osf1
527 echo hppa1.1-hp-lites
529 @@ -291,17 +440,33 @@
531 echo ymp-cray-unicos${UNAME_RELEASE}
534 - echo c90-cray-unicos${UNAME_RELEASE}
535 + CRAY*[A-Z]90:*:*:*)
536 + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
537 + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
538 + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
541 + echo t90-cray-unicos${UNAME_RELEASE}
544 echo cray2-cray-unicos
546 + F300:UNIX_System_V:*:*)
547 + FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
548 + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
549 + echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
551 + F301:UNIX_System_V:*:*)
552 + echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
554 hp3[0-9][05]:NetBSD:*:*)
555 echo m68k-hp-netbsd${UNAME_RELEASE}
557 - i[34]86:BSD/386:*:* | *:BSD/OS:*:*)
558 - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
560 + echo m68k-unknown-openbsd${UNAME_RELEASE}
562 + i?86:BSD/386:*:* | *:BSD/OS:*:*)
563 + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
566 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
567 @@ -309,36 +474,150 @@
569 echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
572 + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
575 + echo ${UNAME_MACHINE}-pc-cygwin32
578 + echo ${UNAME_MACHINE}-pc-mingw32
581 + echo powerpcle-unknown-cygwin32
584 + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
587 - echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
588 + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
591 + # uname on the ARM produces all sorts of strangeness, and we need to
593 + case "$UNAME_MACHINE" in
594 + arm* | sa110*) UNAME_MACHINE="arm" ;;
597 # The BFD linker knows what the default object file format is, so
598 # first see if it will tell us.
599 ld_help_string=`ld --help 2>&1`
600 - if echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: elf_i[345]86"; then
601 - echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
602 - elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i[345]86linux"; then
603 - echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
604 - elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i[345]86coff"; then
605 - echo "${UNAME_MACHINE}-unknown-linuxcoff" ; exit 0
606 - elif test "${UNAME_MACHINE}" = "alpha" ; then
607 - echo alpha-unknown-linux ; exit 0
609 - # Either a pre-BFD a.out linker (linuxoldld) or one that does not give us
610 - # useful --help. Gcc wants to distinguish between linuxoldld and linuxaout.
611 - test ! -d /usr/lib/ldscripts/. \
612 - && echo "${UNAME_MACHINE}-unknown-linuxoldld" && exit 0
613 + ld_supported_emulations=`echo $ld_help_string \
614 + | sed -ne '/supported emulations:/!d
616 + s/.*supported emulations: *//
619 + case "$ld_supported_emulations" in
620 + i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
621 + i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
622 + sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
623 + armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
624 + m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
625 + elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
628 + if test "${UNAME_MACHINE}" = "alpha" ; then
629 + sed 's/^ //' <<EOF >dummy.s
633 + .frame \$30,0,\$26,0
635 + .long 0x47e03d80 # implver $0
637 + .long 0x47e20c21 # amask $2,$1
647 + ${CC-cc} dummy.s -o dummy 2>/dev/null
648 + if test "$?" = 0 ; then
652 + UNAME_MACHINE="alpha"
655 + UNAME_MACHINE="alphaev5"
658 + UNAME_MACHINE="alphaev56"
661 + UNAME_MACHINE="alphapca56"
664 + UNAME_MACHINE="alphaev6"
668 + objdump --private-headers dummy | \
669 + grep ld.so.1 > /dev/null
670 + if test "$?" = 0 ; then
674 + rm -f dummy.s dummy
675 + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
676 + elif test "${UNAME_MACHINE}" = "mips" ; then
683 + printf ("%s-unknown-linux-gnu\n", argv[1]);
686 + printf ("%sel-unknown-linux-gnu\n", argv[1]);
691 + ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
692 + rm -f dummy.c dummy
694 + # Either a pre-BFD a.out linker (linux-gnuoldld)
695 + # or one that does not give us useful --help.
696 + # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
697 + # If ld does not provide *any* "supported emulations:"
698 + # that means it is gnuoldld.
699 + echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
700 + test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
702 + case "${UNAME_MACHINE}" in
710 # Determine whether the default compiler is a.out or elf
712 +#include <features.h>
720 - printf ("%s-unknown-linux\n", argv[1]);
723 + printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
725 + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
728 + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
731 - printf ("%s-unknown-linuxaout\n", argv[1]);
732 + printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
736 @@ -348,30 +627,45 @@
738 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
739 # are messed up and put the nodename in both sysname and nodename.
740 - i[34]86:DYNIX/ptx:4*:*)
741 + i?86:DYNIX/ptx:4*:*)
742 echo i386-sequent-sysv4
744 - i[34]86:*:4.*:* | i[34]86:SYSTEM_V:4.*:*)
745 + i?86:UNIX_SV:4.2MP:2.*)
746 + # Unixware is an offshoot of SVR4, but it has its own version
747 + # number series starting with 2...
748 + # I am not positive that other SVR4 systems won't match this,
749 + # I just have to hope. -- rms.
750 + # Use sysv4.2uw... so that sysv4* matches it.
751 + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
753 + i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
754 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
755 echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
757 - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
758 + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
763 if test -f /usr/options/cb.name; then
764 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
765 - echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL
766 + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
767 elif /bin/uname -X 2>/dev/null >/dev/null ; then
768 UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
769 (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
770 - echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL
771 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
772 + && UNAME_MACHINE=i586
773 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
775 - echo ${UNAME_MACHINE}-unknown-sysv32
776 + echo ${UNAME_MACHINE}-pc-sysv32
780 + # uname -m prints for DJGPP always 'pc', but it prints nothing about
781 + # the processor, so we play safe by assuming i386.
782 + echo i386-pc-msdosdjgpp
785 - echo i386-unknown-mach3
790 @@ -387,30 +681,36 @@
792 echo m68010-convergent-sysv
794 - M680[234]0:*:R3V[567]*:*)
795 + M68*:*:R3V[567]*:*)
796 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
797 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
798 - uname -p 2>/dev/null | grep 86 >/dev/null \
799 - && echo i486-ncr-sysv4.3 && exit 0
800 - uname -p 2>/dev/null | /bin/grep entium >/dev/null \
801 - && echo i586-ncr-sysv4.3 && exit 0 ;;
803 + test -r /etc/.relid \
804 + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
805 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
806 + && echo i486-ncr-sysv4.3${OS_REL} && exit 0
807 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
808 + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
809 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
810 - uname -p 2>/dev/null | grep 86 >/dev/null \
811 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
812 && echo i486-ncr-sysv4 && exit 0 ;;
813 - m680[234]0:LynxOS:2.[23]*:*)
814 - echo m68k-lynx-lynxos${UNAME_RELEASE}
816 + echo m68k-unknown-lynxos${UNAME_RELEASE}
818 mc68030:UNIX_System_V:4.*:*)
819 echo m68k-atari-sysv4
821 - i[34]86:LynxOS:2.[23]*:*)
822 - echo i386-lynx-lynxos${UNAME_RELEASE}
824 + echo i386-unknown-lynxos${UNAME_RELEASE}
826 - TSUNAMI:LynxOS:2.[23]*:*)
827 - echo sparc-lynx-lynxos${UNAME_RELEASE}
828 + TSUNAMI:LynxOS:2.*:*)
829 + echo sparc-unknown-lynxos${UNAME_RELEASE}
831 - rs6000:LynxOS:2.[23]*:*)
832 - echo rs6000-lynx-lynxos${UNAME_RELEASE}
833 + rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
834 + echo rs6000-unknown-lynxos${UNAME_RELEASE}
836 + SM[BE]S:UNIX_SV:*:*)
837 + echo mips-dde-sysv${UNAME_RELEASE}
845 + PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
846 + # says <Richard.M.Bartel@ccMail.Census.GOV>
847 + echo i586-unisys-sysv4
849 + *:UNIX_System_V:4*:FTX*)
850 + # From Gerald Hewes <hewes@openmarket.com>.
851 + # How about differentiating between stratus architectures? -djm
852 + echo hppa1.1-stratus-sysv4
855 + # From seanf@swdc.stratus.com.
856 + echo i860-stratus-sysv4
859 + echo m68k-apple-aux${UNAME_RELEASE}
861 + news*:NEWS-OS:*:6*)
862 + echo mips-sony-newsos6
864 + R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
865 + if [ -d /usr/nec ]; then
866 + echo mips-nec-sysv${UNAME_RELEASE}
868 + echo mips-unknown-sysv${UNAME_RELEASE}
873 #echo '(No uname command or uname output not recognized.)' 1>&2
878 -#if defined (host_mips) && defined (MIPSEB)
879 -#if defined (SYSTYPE_BSD43)
880 - printf ("mips-mips-riscos4bsd\n"); exit (0);
882 -#if defined (SYSTYPE_SYSV)
883 - printf ("mips-mips-riscos4sysv\n"); exit (0);
887 #if defined (__arm) && defined (__acorn) && defined (__unix)
888 printf ("arm-acorn-riscix"); exit (0);
893 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
894 - printf ("%s-next-nextstep%s\n", __ARCHITECTURE__, version==2 ? "2" : "3");
895 + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
902 #if defined (__386BSD__)
903 - printf ("i386-unknown-bsd\n"); exit (0);
904 + printf ("i386-pc-bsd\n"); exit (0);
907 #if defined (sequent)
908 diff -Nru at-3.1.8/config.sub at-3.1.8.new/config.sub
909 --- at-3.1.8/config.sub Sun Feb 23 21:24:35 1997
910 +++ at-3.1.8.new/config.sub Sun Mar 28 19:46:41 1999
913 # Configuration validation subroutine script, version 1.1.
914 -# Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
915 +# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
916 # This file is (in principle) common to ALL GNU software.
917 # The presence of a machine in this file suggests that SOME GNU software
918 -# can handle that machine. It does not imply ALL GNU software can.
919 +# can handle that machine. It does not imply ALL GNU software can.
921 # This file is free software; you can redistribute it and/or modify
922 # it under the terms of the GNU General Public License as published by
924 # The goal of this file is to map all the various variations of a given
925 # machine specification into a single specification in the form:
926 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
927 +# or in some cases, the newer four-part form:
928 +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
929 # It is wrong to echo any other type of specification.
936 -# Separate what the user gave into CPU-COMPANY and OS (if any).
937 -basic_machine=`echo $1 | sed 's/-[^-]*$//'`
938 -if [ $basic_machine != $1 ]
939 -then os=`echo $1 | sed 's/.*-/-/'`
941 +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
942 +# Here we must recognize all the valid KERNEL-OS combinations.
943 +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
947 + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
950 + basic_machine=`echo $1 | sed 's/-[^-]*$//'`
951 + if [ $basic_machine != $1 ]
952 + then os=`echo $1 | sed 's/.*-/-/'`
957 ### Let's recognize common machines as not being operating systems so
958 ### that things like config.sub decstation-3100 work. We also
960 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
961 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
962 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
963 - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp )
964 + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
974 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
978 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
979 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
982 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
983 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
984 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
987 # Don't forget version if it is 3.2v4 or newer.
988 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
989 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
993 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
994 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
998 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
999 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1002 basic_machine=clipper-intergraph
1005 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
1006 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1010 @@ -123,35 +140,49 @@
1012 os=`echo $os | sed -e 's/windowsnt/winnt/'`
1019 # Decode aliases for certain CPU-COMPANY combinations.
1020 case $basic_machine in
1021 # Recognize the basic CPU types without company name.
1022 # Some are omitted here because they have special meanings below.
1023 - tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm \
1024 - | arme[lb] | pyramid \
1025 - | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
1026 - | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \
1027 - | powerpc | powerpcle | sparc64 | 1750a | dsp16xx | mips64 | mipsel \
1028 - | pdp11 | mips64el | mips64orion | mips64orionel \
1030 + tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
1031 + | arme[lb] | pyramid | mn10200 | mn10300 \
1032 + | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
1033 + | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
1034 + | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
1035 + | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
1036 + | mipstx39 | mipstx39el \
1037 + | sparc | sparclet | sparclite | sparc64 | v850)
1038 basic_machine=$basic_machine-unknown
1040 + # We use `pc' rather than `unknown'
1041 + # because (1) that's what they normally are, and
1042 + # (2) the word "unknown" tends to confuse beginning users.
1044 + basic_machine=$basic_machine-pc
1046 # Object if more than one company name word.
1048 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1051 # Recognize the basic CPU types with company name.
1052 - vax-* | tahoe-* | i[345]86-* | i860-* | m68k-* | m68000-* | m88k-* \
1053 - | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
1054 - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
1055 - | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
1056 - | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
1057 - | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
1058 - | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \
1059 - | mips64el-* | mips64orion-* | mips64orionel-*)
1060 + vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
1061 + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
1062 + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
1063 + | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
1064 + | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
1065 + | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
1066 + | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
1067 + | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
1068 + | sparc64-* | mips64-* | mipsel-* \
1069 + | mips64el-* | mips64orion-* | mips64orionel-* \
1070 + | mipstx39-* | mipstx39el-* \
1073 # Recognize the various machine names and aliases which stand
1074 # for a CPU type and a company and sometimes even an OS.
1077 basic_machine=m68k-cbm
1080 + amigaos | amigados)
1081 basic_machine=m68k-cbm
1086 basic_machine=m68k-cbm
1087 @@ -190,6 +221,10 @@
1088 basic_machine=m68k-apollo
1092 + basic_machine=m68k-apple
1096 basic_machine=ns32k-sequent
1098 @@ -222,6 +257,10 @@
1099 basic_machine=cray2-cray
1103 + basic_machine=c90-cray
1107 basic_machine=m68k-crds
1109 @@ -303,25 +342,28 @@
1110 hp9k8[0-9][0-9] | hp8[0-9][0-9])
1111 basic_machine=hppa1.0-hp
1117 basic_machine=i370-ibm
1120 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
1122 - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
1124 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
1128 - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
1130 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
1134 - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
1136 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
1140 - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
1142 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
1146 @@ -352,6 +394,14 @@
1148 basic_machine=m68000-convergent
1151 + basic_machine=mipsel-unknown
1155 + basic_machine=mips-unknown
1159 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
1161 @@ -419,21 +469,23 @@
1163 basic_machine=ns32k-pc532
1165 - pentium | p5 | p6)
1166 - # We don't have specific support for the Intel Pentium (p6) followon yet, so just call it a Pentium
1167 - basic_machine=i586-intel
1168 + pentium | p5 | k5 | nexen)
1169 + basic_machine=i586-pc
1171 + pentiumpro | p6 | k6 | 6x86)
1172 + basic_machine=i686-pc
1174 + pentiumii | pentium2)
1175 + basic_machine=i786-pc
1177 - pentium-* | p5-* | p6-*)
1178 - # We don't have specific support for the Intel Pentium (p6) followon yet, so just call it a Pentium
1179 + pentium-* | p5-* | k5-* | nexen-*)
1180 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
1183 - # We don't have specific support for AMD's K5 yet, so just call it a Pentium
1184 - basic_machine=i586-amd
1187 - # We don't have specific support for Nexgen yet, so just call it a Pentium
1188 - basic_machine=i586-nexgen
1189 + pentiumpro-* | p6-* | k6-* | 6x86-*)
1190 + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1192 + pentiumii-* | pentium2-*)
1193 + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
1196 basic_machine=pn-gould
1197 @@ -517,6 +569,12 @@
1198 basic_machine=i386-sequent
1202 + basic_machine=mipstx39-unknown
1205 + basic_machine=mipstx39el-unknown
1208 basic_machine=m68k-ncr
1211 basic_machine=vax-dec
1215 + basic_machine=f301-fujitsu
1218 basic_machine=i960-wrs
1220 @@ -563,7 +624,11 @@
1221 # Here we handle the default manufacturer of certain CPU types. It is in
1222 # some cases the only manufacturer, in others, it is the most popular.
1224 - basic_machine=mips-mips
1225 + if [ x$os = x-linux-gnu ]; then
1226 + basic_machine=mips-unknown
1228 + basic_machine=mips-mips
1232 basic_machine=romp-ibm
1234 if [ x"$os" != x"" ]
1237 + # First match some system type aliases
1238 + # that might get confused with valid system types.
1239 # -solaris* is a basic system type, with this one exception.
1240 -solaris1 | -solaris1.*)
1241 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1242 @@ -622,28 +689,37 @@
1246 - -unixware* | svr4*)
1254 - os=`echo $os | sed -e 's|gnu/linux|linux|'`
1255 + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1257 # First accept the basic system types.
1258 # The portable systems comes first.
1259 # Each alternative MUST END IN A *, to match a version number.
1260 # -sysv* is not here because it comes later, after sysvr4.
1261 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1262 - | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[345]* \
1263 + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1264 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1265 - | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \
1266 - | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
1267 - | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
1268 - | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
1269 + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1271 + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1272 + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1273 + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
1274 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
1275 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1276 - | -udi* | -eabi* | -lites* )
1277 + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1278 + | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1279 + | -mingw32* | -linux-gnu* | -uxpv*)
1280 # Remember, each alternative MUST END IN *, to match a version number.
1283 + os=`echo $os | sed -e 's|linux|linux-gnu|'`
1286 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1295 # Preserve the version number of sinix5.
1297 os=`echo $os | sed -e 's|sinix|sysv|'`
1337 @@ -856,8 +938,11 @@
1342 + -vxsim* | -vxworks*)
1349 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1350 diff -Nru at-3.1.8/daemon.c at-3.1.8.new/daemon.c
1351 --- at-3.1.8/daemon.c Wed Mar 12 20:34:41 1997
1352 +++ at-3.1.8.new/daemon.c Sun Mar 28 19:46:41 1999
1356 va_start(args, fmt);
1357 - vsprintf(buf, fmt, args);
1358 + vsnprintf(buf, sizeof(buf), fmt, args);
1365 va_start(args, fmt);
1366 - vsprintf(buf, fmt, args);
1367 + vsnprintf(buf, sizeof(buf), fmt, args);
1374 old_umask = umask(S_IWGRP | S_IWOTH);
1379 diff -Nru at-3.1.8/lex.yy.c at-3.1.8.new/lex.yy.c
1380 --- at-3.1.8/lex.yy.c Sun Sep 28 22:00:37 1997
1381 +++ at-3.1.8.new/lex.yy.c Sun Mar 28 19:46:41 1999
1384 /* Undo effects of setting up yytext. */ \
1385 *yy_cp = yy_hold_char; \
1386 + YY_RESTORE_YY_MORE_OFFSET \
1387 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
1388 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
1391 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
1393 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
1394 -YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str ));
1395 +YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
1396 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
1398 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
1400 #define REJECT reject_used_but_not_detected
1401 #define yymore() yymore_used_but_not_detected
1402 #define YY_MORE_ADJ 0
1403 +#define YY_RESTORE_YY_MORE_OFFSET
1405 #line 1 "parsetime.l"
1411 -#line 495 "lex.yy.c"
1412 +#line 497 "lex.yy.c"
1414 /* Macros after this point can all be overridden by user definitions in
1416 @@ -513,6 +515,10 @@
1417 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
1420 +#ifdef YY_NEED_STRLEN
1421 +static int yy_flex_strlen YY_PROTO(( yyconst char * ));
1426 static int yyinput YY_PROTO(( void ));
1428 #line 36 "parsetime.l"
1431 -#line 645 "lex.yy.c"
1432 +#line 651 "lex.yy.c"
1437 #line 77 "parsetime.l"
1440 -#line 923 "lex.yy.c"
1441 +#line 929 "lex.yy.c"
1442 case YY_STATE_EOF(INITIAL):
1447 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1448 *yy_cp = yy_hold_char;
1449 + YY_RESTORE_YY_MORE_OFFSET
1451 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1453 @@ -1075,7 +1082,7 @@
1454 { /* Don't try to fill the buffer, so this is an EOF. */
1455 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1457 - /* We matched a singled characater, the EOB, so
1458 + /* We matched a single character, the EOB, so
1459 * treat this as a final EOF.
1461 return EOB_ACT_END_OF_FILE;
1462 @@ -1102,7 +1109,7 @@
1463 /* don't do the read, it's not guaranteed to return an EOF,
1467 + yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1471 @@ -1157,6 +1164,8 @@
1472 /* Read in more data. */
1473 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1474 yy_n_chars, num_to_read );
1476 + yy_current_buffer->yy_n_chars = yy_n_chars;
1479 if ( yy_n_chars == 0 )
1480 @@ -1281,7 +1290,8 @@
1482 yy_cp += (int) (dest - source);
1483 yy_bp += (int) (dest - source);
1484 - yy_n_chars = yy_current_buffer->yy_buf_size;
1485 + yy_current_buffer->yy_n_chars =
1486 + yy_n_chars = yy_current_buffer->yy_buf_size;
1488 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1489 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1490 @@ -1319,19 +1329,31 @@
1493 { /* need more input */
1494 - yytext_ptr = yy_c_buf_p;
1495 + int offset = yy_c_buf_p - yytext_ptr;
1498 switch ( yy_get_next_buffer() )
1500 + case EOB_ACT_LAST_MATCH:
1501 + /* This happens because yy_g_n_b()
1502 + * sees that we've accumulated a
1503 + * token and flags that we need to
1504 + * try matching the token before
1505 + * proceeding. But for input(),
1506 + * there's no matching to consider.
1507 + * So convert the EOB_ACT_LAST_MATCH
1508 + * to EOB_ACT_END_OF_FILE.
1511 + /* Reset buffer status. */
1512 + yyrestart( yyin );
1514 + /* fall through */
1516 case EOB_ACT_END_OF_FILE:
1521 - yytext_ptr + YY_MORE_ADJ;
1525 if ( ! yy_did_buffer_switch_on_eof )
1527 @@ -1343,17 +1365,8 @@
1530 case EOB_ACT_CONTINUE_SCAN:
1531 - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1532 + yy_c_buf_p = yytext_ptr + offset;
1535 - case EOB_ACT_LAST_MATCH:
1538 - "unexpected last match in yyinput()" );
1541 - "unexpected last match in input()" );
1546 @@ -1517,6 +1530,9 @@
1555 /* We always need two end-of-buffer characters. The first causes
1556 @@ -1576,17 +1592,17 @@
1558 #ifndef YY_NO_SCAN_STRING
1559 #ifdef YY_USE_PROTOS
1560 -YY_BUFFER_STATE yy_scan_string( yyconst char *str )
1561 +YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1563 -YY_BUFFER_STATE yy_scan_string( str )
1565 +YY_BUFFER_STATE yy_scan_string( yy_str )
1566 +yyconst char *yy_str;
1570 - for ( len = 0; str[len]; ++len )
1571 + for ( len = 0; yy_str[len]; ++len )
1574 - return yy_scan_bytes( str, len );
1575 + return yy_scan_bytes( yy_str, len );
1579 @@ -1707,7 +1723,7 @@
1581 /* Undo effects of setting up yytext. */ \
1582 yytext[yyleng] = yy_hold_char; \
1583 - yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
1584 + yy_c_buf_p = yytext + n; \
1585 yy_hold_char = *yy_c_buf_p; \
1586 *yy_c_buf_p = '\0'; \
1588 @@ -1730,6 +1746,22 @@
1590 for ( i = 0; i < n; ++i )
1595 +#ifdef YY_NEED_STRLEN
1596 +#ifdef YY_USE_PROTOS
1597 +static int yy_flex_strlen( yyconst char *s )
1599 +static int yy_flex_strlen( s )
1604 + for ( n = 0; s[n]; ++n )
1611 diff -Nru at-3.1.8/panic.c at-3.1.8.new/panic.c
1612 --- at-3.1.8/panic.c Sun Sep 28 22:00:37 1997
1613 +++ at-3.1.8.new/panic.c Sun Mar 28 19:46:41 1999
1621 /* File scope variables */
1625 va_start(args, fmt);
1626 - vsprintf(buf, fmt, args);
1627 + vsnprintf(buf, sizeof(buf), fmt, args);
1641 /* Print usage and exit.
1643 fprintf(stderr, "Usage: at [-V] [-q x] [-f file] [-m] time\n"
1644 - " atq [-V] [-q x] [-v]\n"
1645 + " atq [-V] [-q x]\n"
1646 " atrm [-V] [-q x] job ...\n"
1647 " batch [-V] [-f file] [-m]\n");
1649 diff -Nru at-3.1.8/parsetime.y at-3.1.8.new/parsetime.y
1650 --- at-3.1.8/parsetime.y Sun Sep 28 20:21:29 1997
1651 +++ at-3.1.8.new/parsetime.y Sun Mar 28 19:46:41 1999
1654 static int time_only;
1656 +extern int yyerror(char *s);
1657 +extern int yylex();
1659 int add_date(int number, int period);
1662 @@ -181,6 +184,15 @@
1667 + if (exectm.tm_hour > 12) {
1668 + yyerror("Hour too large for AM");
1671 + else if (exectm.tm_hour == 12) {
1672 + exectm.tm_hour = 0;
1677 if (exectm.tm_hour > 12) {
1678 @@ -258,13 +270,13 @@
1682 -day_of_week : SUN { $$ = 0; }
1689 +day_of_week : MON { $$ = 0; }
1699 diff -Nru at-3.1.8/y.tab.c at-3.1.8.new/y.tab.c
1700 --- at-3.1.8/y.tab.c Sun Sep 28 20:21:31 1997
1701 +++ at-3.1.8.new/y.tab.c Sun Mar 28 19:46:41 1999
1704 -/* A Bison parser, made from parsetime.y with Bison version GNU Bison version 1.22
1705 +/* A Bison parser, made from parsetime.y
1706 + by GNU Bison version 1.25
1709 #define YYBISON 1 /* Identify Bison output. */
1712 static int time_only;
1714 +extern int yyerror(char *s);
1715 +extern int yylex();
1717 int add_date(int number, int period);
1719 -#line 17 "parsetime.y"
1720 +#line 20 "parsetime.y"
1739 -#define YYLTYPE yyltype
1746 0, 55, 0, 3, 0, 5, 0, 6, 0, 26,
1747 0, 27, 0, 28, 0, 29, 0, 30, 0, 31,
1748 0, 32, 0, 33, 0, 34, 0, 35, 0, 36,
1749 - 0, 37, 0, 3, 0, 3, 0, 3, 0, 10,
1750 - 0, 11, 0, 12, 0, 13, 0, 14, 0, 15,
1751 - 0, 16, 0, 3, 0, 44, 0, 45, 0, 41,
1752 + 0, 37, 0, 3, 0, 3, 0, 3, 0, 11,
1753 + 0, 12, 0, 13, 0, 14, 0, 15, 0, 16,
1754 + 0, 10, 0, 3, 0, 44, 0, 45, 0, 41,
1758 @@ -168,24 +155,28 @@
1761 static const short yyrline[] = { 0,
1762 - 39, 43, 44, 45, 46, 47, 48, 51, 52, 53,
1763 - 56, 59, 60, 61, 62, 63, 64, 65, 66, 67,
1764 - 72, 78, 85, 86, 87, 91, 92, 96, 97, 98,
1765 - 99, 100, 101, 104, 108, 112, 118, 124, 125, 126,
1766 - 127, 128, 129, 132, 157, 170, 173, 183, 184, 197,
1767 - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1768 - 208, 211, 225, 238, 261, 262, 263, 264, 265, 266,
1769 - 267, 270, 280, 281, 282, 283, 284
1770 + 42, 46, 47, 48, 49, 50, 51, 54, 55, 56,
1771 + 59, 62, 63, 64, 65, 66, 67, 68, 69, 70,
1772 + 75, 81, 88, 89, 90, 94, 95, 99, 100, 101,
1773 + 102, 103, 104, 107, 111, 115, 121, 127, 128, 129,
1774 + 130, 131, 132, 135, 160, 173, 176, 186, 187, 200,
1775 + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
1776 + 211, 214, 228, 241, 264, 265, 266, 267, 268, 269,
1777 + 270, 273, 283, 284, 285, 286, 287
1781 -static const char * const yytname[] = { "$","error","$illegal.","INT","NOW",
1783 +#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
1785 +static const char * const yytname[] = { "$","error","$undefined.","INT","NOW",
1786 "AM","PM","NOON","MIDNIGHT","TEATIME","SUN","MON","TUE","WED","THU","FRI","SAT",
1787 "TODAY","TOMORROW","NEXT","MINUTE","HOUR","DAY","WEEK","MONTH","YEAR","JAN",
1788 "FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC","WORD","','",
1789 -"'-'","'.'","'/'","'+'","':'","'\\''","'h'","timespec","nowspec","now","time",
1790 +"'-'","'.'","'/'","'+'","':'","'''","'h'","timespec","nowspec","now","time",
1791 "date","increment","decrement","inc_period","hr24clock_hr_min","timezone_name",
1792 "hr24clock_hour","minute","am_pm","month_name","month_number","day_number","year_number",
1793 -"day_of_week","inc_number","time_sep",""
1794 +"day_of_week","inc_number","time_sep", NULL
1800 static const short yydefact[] = { 0,
1801 44, 11, 20, 21, 22, 7, 8, 1, 12, 0,
1802 - 0, 0, 0, 9, 10, 63, 65, 66, 67, 68,
1803 - 69, 70, 71, 26, 27, 50, 51, 52, 53, 54,
1804 + 0, 0, 0, 9, 10, 63, 71, 65, 66, 67,
1805 + 68, 69, 70, 26, 27, 50, 51, 52, 53, 54,
1806 55, 56, 57, 58, 59, 60, 61, 2, 3, 5,
1807 0, 0, 0, 0, 25, 45, 13, 48, 49, 77,
1808 75, 73, 74, 76, 16, 0, 38, 39, 40, 41,
1809 @@ -283,14 +274,14 @@
1812 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
1813 -#line 3 "/usr/lib/bison.simple"
1814 +#line 3 "/usr/share/misc/bison.simple"
1816 /* Skeleton output parser for bison,
1817 - Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman
1818 + Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
1820 This program is free software; you can redistribute it and/or modify
1821 it under the terms of the GNU General Public License as published by
1822 - the Free Software Foundation; either version 1, or (at your option)
1823 + the Free Software Foundation; either version 2, or (at your option)
1826 This program is distributed in the hope that it will be useful,
1827 @@ -300,8 +291,12 @@
1829 You should have received a copy of the GNU General Public License
1830 along with this program; if not, write to the Free Software
1831 - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
1832 + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
1834 +/* As a special exception, when this file is copied by Bison into a
1835 + Bison output file, you may use that output file without restriction.
1836 + This special exception was added by the Free Software Foundation
1837 + in version 1.24 of Bison. */
1841 @@ -375,10 +370,18 @@
1846 +#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
1848 #define YYLEX yylex(&yylval, &yylloc)
1850 +#else /* not YYLSP_NEEDED */
1852 +#define YYLEX yylex(&yylval, YYLEX_PARAM)
1854 #define YYLEX yylex(&yylval)
1856 +#endif /* not YYLSP_NEEDED */
1859 /* If nonreentrant, generate the variables here */
1860 @@ -426,16 +429,16 @@
1863 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
1864 -#define __yy_bcopy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT)
1865 +#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
1866 #else /* not GNU C or C++ */
1869 /* This is the most reliable way to avoid incompatibilities
1870 in available built-in functions on various systems. */
1872 -__yy_bcopy (from, to, count)
1874 +__yy_memcpy (to, from, count)
1879 register char *f = from;
1881 /* This is the most reliable way to avoid incompatibilities
1882 in available built-in functions on various systems. */
1884 -__yy_bcopy (char *from, char *to, int count)
1885 +__yy_memcpy (char *to, char *from, int count)
1887 register char *f = from;
1888 register char *t = to;
1889 @@ -464,9 +467,30 @@
1893 -#line 184 "/usr/lib/bison.simple"
1894 +#line 196 "/usr/share/misc/bison.simple"
1896 +/* The user can define YYPARSE_PARAM as the name of an argument to be passed
1897 + into yyparse. The argument should have type void *.
1898 + It should actually point to an object.
1899 + Grammar actions can access the variable by casting it
1900 + to the proper pointer type. */
1902 +#ifdef YYPARSE_PARAM
1904 +#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
1905 +#define YYPARSE_PARAM_DECL
1906 +#else /* not __cplusplus */
1907 +#define YYPARSE_PARAM_ARG YYPARSE_PARAM
1908 +#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
1909 +#endif /* not __cplusplus */
1910 +#else /* not YYPARSE_PARAM */
1911 +#define YYPARSE_PARAM_ARG
1912 +#define YYPARSE_PARAM_DECL
1913 +#endif /* not YYPARSE_PARAM */
1917 +yyparse(YYPARSE_PARAM_ARG)
1918 + YYPARSE_PARAM_DECL
1920 register int yystate;
1922 @@ -582,12 +606,12 @@
1923 if (yystacksize > YYMAXDEPTH)
1924 yystacksize = YYMAXDEPTH;
1925 yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
1926 - __yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
1927 + __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
1928 yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
1929 - __yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
1930 + __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
1932 yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
1933 - __yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
1934 + __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
1936 #endif /* no yyoverflow */
1938 @@ -748,20 +772,20 @@
1942 -#line 40 "parsetime.y"
1943 +#line 43 "parsetime.y"
1949 -#line 68 "parsetime.y"
1950 +#line 71 "parsetime.y"
1952 exectm.tm_hour = 12;
1957 -#line 73 "parsetime.y"
1958 +#line 76 "parsetime.y"
1962 @@ -769,74 +793,74 @@
1966 -#line 79 "parsetime.y"
1967 +#line 82 "parsetime.y"
1969 exectm.tm_hour = 16;
1974 -#line 88 "parsetime.y"
1975 +#line 91 "parsetime.y"
1977 add_date ((7 + yyvsp[0].intval - exectm.tm_wday) %7 + 1, DAY);
1981 -#line 93 "parsetime.y"
1982 +#line 96 "parsetime.y"
1988 -#line 105 "parsetime.y"
1989 +#line 108 "parsetime.y"
1991 add_date(yyvsp[-1].intval, yyvsp[0].intval);
1995 -#line 109 "parsetime.y"
1996 +#line 112 "parsetime.y"
1998 add_date(1, yyvsp[0].intval);
2002 -#line 113 "parsetime.y"
2003 +#line 116 "parsetime.y"
2005 add_date ((6 + yyvsp[0].intval - exectm.tm_wday) %7 +1, DAY);
2009 -#line 119 "parsetime.y"
2010 +#line 122 "parsetime.y"
2012 add_date(-yyvsp[-1].intval, yyvsp[0].intval);
2016 -#line 124 "parsetime.y"
2017 +#line 127 "parsetime.y"
2018 { yyval.intval = MINUTE ; ;
2021 -#line 125 "parsetime.y"
2022 +#line 128 "parsetime.y"
2023 { yyval.intval = HOUR ; ;
2026 -#line 126 "parsetime.y"
2027 +#line 129 "parsetime.y"
2028 { yyval.intval = DAY ; ;
2031 -#line 127 "parsetime.y"
2032 +#line 130 "parsetime.y"
2033 { yyval.intval = WEEK ; ;
2036 -#line 128 "parsetime.y"
2037 +#line 131 "parsetime.y"
2038 { yyval.intval = MONTH ; ;
2041 -#line 129 "parsetime.y"
2042 +#line 132 "parsetime.y"
2043 { yyval.intval = YEAR ; ;
2046 -#line 133 "parsetime.y"
2047 +#line 136 "parsetime.y"
2050 exectm.tm_hour = -1;
2055 -#line 158 "parsetime.y"
2056 +#line 161 "parsetime.y"
2058 if (strcasecmp(yyvsp[0].charval,"utc") == 0) {
2064 -#line 174 "parsetime.y"
2065 +#line 177 "parsetime.y"
2067 if (sscanf(yyvsp[0].charval, "%d", &exectm.tm_min) != 1) {
2068 yyerror("Error in minute");
2073 -#line 185 "parsetime.y"
2074 +#line 188 "parsetime.y"
2076 if (exectm.tm_hour > 12) {
2077 yyerror("Hour too large for PM");
2078 @@ -896,55 +920,55 @@
2082 -#line 197 "parsetime.y"
2083 +#line 200 "parsetime.y"
2084 { exectm.tm_mon = 0; ;
2087 -#line 198 "parsetime.y"
2088 +#line 201 "parsetime.y"
2089 { exectm.tm_mon = 1; ;
2092 -#line 199 "parsetime.y"
2093 +#line 202 "parsetime.y"
2094 { exectm.tm_mon = 2; ;
2097 -#line 200 "parsetime.y"
2098 +#line 203 "parsetime.y"
2099 { exectm.tm_mon = 3; ;
2102 -#line 201 "parsetime.y"
2103 +#line 204 "parsetime.y"
2104 { exectm.tm_mon = 4; ;
2107 -#line 202 "parsetime.y"
2108 +#line 205 "parsetime.y"
2109 { exectm.tm_mon = 5; ;
2112 -#line 203 "parsetime.y"
2113 +#line 206 "parsetime.y"
2114 { exectm.tm_mon = 6; ;
2117 -#line 204 "parsetime.y"
2118 +#line 207 "parsetime.y"
2119 { exectm.tm_mon = 7; ;
2122 -#line 205 "parsetime.y"
2123 +#line 208 "parsetime.y"
2124 { exectm.tm_mon = 8; ;
2127 -#line 206 "parsetime.y"
2128 +#line 209 "parsetime.y"
2129 { exectm.tm_mon = 9; ;
2132 -#line 207 "parsetime.y"
2133 +#line 210 "parsetime.y"
2134 { exectm.tm_mon =10; ;
2137 -#line 208 "parsetime.y"
2138 +#line 211 "parsetime.y"
2139 { exectm.tm_mon =11; ;
2142 -#line 212 "parsetime.y"
2143 +#line 215 "parsetime.y"
2151 -#line 226 "parsetime.y"
2152 +#line 229 "parsetime.y"
2154 exectm.tm_mday = -1;
2155 sscanf(yyvsp[0].charval, "%d", &exectm.tm_mday);
2160 -#line 239 "parsetime.y"
2161 +#line 242 "parsetime.y"
2165 @@ -995,35 +1019,35 @@
2169 -#line 261 "parsetime.y"
2170 +#line 264 "parsetime.y"
2171 { yyval.intval = 0; ;
2174 -#line 262 "parsetime.y"
2175 +#line 265 "parsetime.y"
2176 { yyval.intval = 1; ;
2179 -#line 263 "parsetime.y"
2180 +#line 266 "parsetime.y"
2181 { yyval.intval = 2; ;
2184 -#line 264 "parsetime.y"
2185 +#line 267 "parsetime.y"
2186 { yyval.intval = 3; ;
2189 -#line 265 "parsetime.y"
2190 +#line 268 "parsetime.y"
2191 { yyval.intval = 4; ;
2194 -#line 266 "parsetime.y"
2195 +#line 269 "parsetime.y"
2196 { yyval.intval = 5; ;
2199 -#line 267 "parsetime.y"
2200 +#line 270 "parsetime.y"
2201 { yyval.intval = 6; ;
2204 -#line 271 "parsetime.y"
2205 +#line 274 "parsetime.y"
2207 if (sscanf(yyvsp[0].charval, "%d", &yyval.intval) != 1) {
2208 yyerror("Unknown increment");
2209 @@ -1034,7 +1058,7 @@
2212 /* the action file gets copied in in place of this dollarsign */
2213 -#line 465 "/usr/lib/bison.simple"
2214 +#line 498 "/usr/share/misc/bison.simple"
2218 @@ -1230,7 +1254,7 @@
2222 -#line 287 "parsetime.y"
2223 +#line 290 "parsetime.y"