]> git.pld-linux.org Git - packages/at.git/blame - at.patch
- patch adopted from latest Debian source.
[packages/at.git] / at.patch
CommitLineData
c5c90608 1diff -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
4@@ -248,7 +248,11 @@
5 .br
6 .I @ETCDIR@/at.deny
7 .SH SEE ALSO
8-cron(1), nice(1), sh(1), umask(2), atd(8)
9+.BR cron (1),
10+.BR nice (1),
11+.BR sh (1),
12+.BR umask (2),
13+.BR atd (8).
14 .SH BUGS
15 The correct operation of
16 .B batch
17diff -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
20@@ -235,6 +235,7 @@
21 /* Install the signal handler for SIGINT; terminate after removing the
22 * spool file if necessary
23 */
24+ memset(&act, 0, sizeof act);
25 act.sa_handler = sigc;
26 sigemptyset(&(act.sa_mask));
27 act.sa_flags = 0;
28@@ -274,8 +275,8 @@
29 if ((jobno = nextjob()) == EOF)
30 perr("Cannot generate job number");
31
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));
36
37 for (ap = ppos; *ap != '\0'; ap++)
38 if (*ap == ' ')
39@@ -291,7 +292,7 @@
40 * bit. Yes, this is a kluge.
41 */
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);
46
47 if ((fd2 = dup(fd)) < 0)
48@@ -461,14 +462,6 @@
49
50 close(fd2);
51
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. */
57-
58- fprintf(stderr, "warning: commands will be executed using /bin/sh\n");
59-
60 runtime = localtime(&runtimer);
61
62 /* We only use the sick POSIX time format if POSIXLY_CORRECT
63@@ -546,6 +539,7 @@
64 long jobno;
65 time_t runtimer;
66 char timestr[TIMESIZE];
67+ struct passwd *pwd;
68
69 PRIV_START
70
71@@ -581,7 +575,10 @@
72 } else {
73 strftime(timestr, TIMESIZE, TIMEFORMAT_ISO, runtime);
74 }
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);
78+ else
79+ printf("%ld\t%s %c\n", jobno, timestr, queue);
80 }
81 PRIV_END
82 }
83@@ -695,7 +692,7 @@
84 char *pgm;
85
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 */
89 int disp_version = 0;
90 time_t timer;
91 struct passwd *pwe;
92@@ -726,16 +723,20 @@
93 */
94 if (strcmp(pgm, "atq") == 0) {
95 program = ATQ;
96- options = "q:V";
97+ options = "hq:V";
98 } else if (strcmp(pgm, "atrm") == 0) {
99 program = ATRM;
100- options = "V";
101+ options = "hV";
102 }
103 /* process whatever options we can process
104 */
105 opterr = 1;
106 while ((c = getopt(argc, argv, options)) != EOF)
107 switch (c) {
108+ case 'h':
109+ usage();
110+ exit (0);
111+
112 case 'v': /* verify time settings */
113 atverify = 1;
114 break;
115@@ -753,7 +754,7 @@
116 usage();
117
118 atqueue = queue = *optarg;
119- if (!(islower(queue) || isupper(queue)))
120+ if (!(islower(queue) || isupper(queue)) & (queue != '='))
121 usage();
122
123 queue_set = 1;
124@@ -842,6 +843,15 @@
125 struct tm *tm = localtime(&timer);
126 fprintf(stderr, "%s\n", asctime(tm));
127 }
128+
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. */
134+
135+ fprintf(stderr, "warning: commands will be executed using /bin/sh\n");
136+
137 writefile(timer, queue);
138 break;
139
140diff -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
143@@ -1,13 +1,24 @@
144-nobody
145+alias
146+backup
147 bin
148 daemon
149-sys
150+ftp
151+games
152+gnats
153+guest
154+irc
155 lp
156-sync
157 mail
158-news
159-uucp
160-games
161 man
162-guest
163-ftp
164+nobody
165+operator
166+proxy
167+qmaild
168+qmaill
169+qmailp
170+qmailq
171+qmailr
172+qmails
173+sync
174+sys
175+www-data
176diff -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
179@@ -29,4 +29,8 @@
180 .I /etc/at/at.deny
181 is checked.
182 .SH "SEE ALSO"
183-at(1), atrun(1), cron(1), crontab(1), atd(8)
184+.BR at (1),
185+.BR atrun (1),
186+.BR cron (8),
187+.BR crontab (1),
188+.BR atd (8).
189diff -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
192@@ -46,6 +46,11 @@
193 is installed as
194 .B /usr/sbin/atrun
195 for backward compatibility.
196+.SH WARNING
197+.B atd
198+won't work if its spool directory is mounted via NFS even if
199+.I no_root_squash
200+is set.
201 .SH FILES
202 .I @ATJBD@
203 The directory for storing jobs; this should be mode 700, owner
204@@ -61,9 +66,15 @@
205 .B at
206 system.
207 .SH "SEE ALSO"
208-at(1), atrun(1), cron(1), crontab(1), syslog(3), at_deny(5), at_allow(5)
209+.BR at (1),
210+.BR atrun (1),
211+.BR cron (8),
212+.BR crontab (1),
213+.BR syslog (3),
214+.BR at.deny (5),
215+.BR at.allow(5).
216 .SH BUGS
217 The functionality of
218 .B atd
219 should be merged into
220-.BR cron(1) .
221+.BR cron (8) .
222diff -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
225@@ -255,6 +255,13 @@
226
227 fcntl(fd_in, F_SETFD, fflags & ~FD_CLOEXEC);
228
229+ /*
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
235+ */
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",
239diff -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
242@@ -0,0 +1,4 @@
243+#! /bin/sh
244+prefix=/usr
245+exec_prefix=${prefix}
246+exec ${exec_prefix}/bin/at -qb now "$@"
247diff -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
250@@ -1,6 +1,6 @@
251 #! /bin/sh
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.
255 #
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
258@@ -51,35 +51,110 @@
259 # Note: order is significant - the case branches are not exclusive.
260
261 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
262- alpha:OSF1:V*:*)
263- # After 1.2, OSF1 uses "V1.3" for uname -r.
264- echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'`
265- exit 0 ;;
266 alpha:OSF1:*:*)
267+ if test $UNAME_RELEASE = "V4.0"; then
268+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
269+ fi
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}
275- exit 0 ;;
276+ cat <<EOF >dummy.s
277+ .globl main
278+ .ent main
279+main:
280+ .frame \$30,0,\$26,0
281+ .prologue 0
282+ .long 0x47e03d80 # implver $0
283+ lda \$2,259
284+ .long 0x47e20c21 # amask $2,$1
285+ srl \$1,8,\$2
286+ sll \$2,2,\$2
287+ sll \$0,3,\$0
288+ addl \$1,\$0,\$0
289+ addl \$2,\$0,\$0
290+ ret \$31,(\$26),1
291+ .end main
292+EOF
293+ ${CC-cc} dummy.s -o dummy 2>/dev/null
294+ if test "$?" = 0 ; then
295+ ./dummy
296+ case "$?" in
297+ 7)
298+ UNAME_MACHINE="alpha"
299+ ;;
300+ 15)
301+ UNAME_MACHINE="alphaev5"
302+ ;;
303+ 14)
304+ UNAME_MACHINE="alphaev56"
305+ ;;
306+ 10)
307+ UNAME_MACHINE="alphapca56"
308+ ;;
309+ 16)
310+ UNAME_MACHINE="alphaev6"
311+ ;;
312+ esac
313+ fi
314+ rm -f dummy.s dummy
315+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
316+ exit 0 ;;
317 21064:Windows_NT:50:3)
318 echo alpha-dec-winnt3.5
319 exit 0 ;;
320+ Amiga*:UNIX_System_V:4.0:*)
321+ echo m68k-cbm-sysv4
322+ exit 0;;
323 amiga:NetBSD:*:*)
324 echo m68k-cbm-netbsd${UNAME_RELEASE}
325 exit 0 ;;
326+ amiga:OpenBSD:*:*)
327+ echo m68k-unknown-openbsd${UNAME_RELEASE}
328+ exit 0 ;;
329+ arc64:OpenBSD:*:*)
330+ echo mips64el-unknown-openbsd${UNAME_RELEASE}
331+ exit 0 ;;
332+ arc:OpenBSD:*:*)
333+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
334+ exit 0 ;;
335+ hkmips:OpenBSD:*:*)
336+ echo mips-unknown-openbsd${UNAME_RELEASE}
337+ exit 0 ;;
338+ pmax:OpenBSD:*:*)
339+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
340+ exit 0 ;;
341+ sgi:OpenBSD:*:*)
342+ echo mips-unknown-openbsd${UNAME_RELEASE}
343+ exit 0 ;;
344+ wgrisc:OpenBSD:*:*)
345+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
346+ exit 0 ;;
347 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
348 echo arm-acorn-riscix${UNAME_RELEASE}
349 exit 0;;
350- Pyramid*:OSx*:*:*)
351+ arm32:NetBSD:*:*)
352+ echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
353+ exit 0 ;;
354+ SR2?01:HI-UX/MPP:*:*)
355+ echo hppa1.1-hitachi-hiuxmpp
356+ exit 0;;
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
361 else
362 echo pyramid-pyramid-bsd
363 fi
364 exit 0 ;;
365- sun4*:SunOS:5.*:*)
366+ NILE:*:*:dcosx)
367+ echo pyramid-pyramid-svr4
368+ exit 0 ;;
369+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
370 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
371 exit 0 ;;
372 i86pc:SunOS:5.*:*)
373- echo i386-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
374+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
375 exit 0 ;;
376 sun4*:SunOS:6*:*)
377 # According to config.sub, this is the proper way to canonicalize
378@@ -99,24 +174,86 @@
379 sun3*:SunOS:*:*)
380 echo m68k-sun-sunos${UNAME_RELEASE}
381 exit 0 ;;
382+ sun*:*:4.2BSD:*)
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
386+ sun3)
387+ echo m68k-sun-sunos${UNAME_RELEASE}
388+ ;;
389+ sun4)
390+ echo sparc-sun-sunos${UNAME_RELEASE}
391+ ;;
392+ esac
393+ exit 0 ;;
394+ aushp:SunOS:*:*)
395+ echo sparc-auspex-sunos${UNAME_RELEASE}
396+ exit 0 ;;
397 atari*:NetBSD:*:*)
398 echo m68k-atari-netbsd${UNAME_RELEASE}
399 exit 0 ;;
400+ atari*:OpenBSD:*:*)
401+ echo m68k-unknown-openbsd${UNAME_RELEASE}
402+ exit 0 ;;
403 sun3*:NetBSD:*:*)
404 echo m68k-sun-netbsd${UNAME_RELEASE}
405 exit 0 ;;
406+ sun3*:OpenBSD:*:*)
407+ echo m68k-unknown-openbsd${UNAME_RELEASE}
408+ exit 0 ;;
409 mac68k:NetBSD:*:*)
410 echo m68k-apple-netbsd${UNAME_RELEASE}
411 exit 0 ;;
412+ mac68k:OpenBSD:*:*)
413+ echo m68k-unknown-openbsd${UNAME_RELEASE}
414+ exit 0 ;;
415+ mvme68k:OpenBSD:*:*)
416+ echo m68k-unknown-openbsd${UNAME_RELEASE}
417+ exit 0 ;;
418+ mvme88k:OpenBSD:*:*)
419+ echo m88k-unknown-openbsd${UNAME_RELEASE}
420+ exit 0 ;;
421+ powerpc:machten:*:*)
422+ echo powerpc-apple-machten${UNAME_RELEASE}
423+ exit 0 ;;
424+ RISC*:Mach:*:*)
425+ echo mips-dec-mach_bsd4.3
426+ exit 0 ;;
427 RISC*:ULTRIX:*:*)
428 echo mips-dec-ultrix${UNAME_RELEASE}
429 exit 0 ;;
430 VAX*:ULTRIX*:*:*)
431 echo vax-dec-ultrix${UNAME_RELEASE}
432 exit 0 ;;
433- mips:*:5*:RISCos)
434+ 2020:CLIX:*:*)
435+ echo clipper-intergraph-clix${UNAME_RELEASE}
436+ exit 0 ;;
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);
443+ #endif
444+ #if defined (SYSTYPE_SVR4)
445+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
446+ #endif
447+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
448+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
449+ #endif
450+ #endif
451+ exit (-1);
452+ }
453+EOF
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}
459 exit 0 ;;
460+ Night_Hawk:Power_UNIX:*:*)
461+ echo powerpc-harris-powerunix
462+ exit 0 ;;
463 m88k:CX/UX:7*:*)
464 echo m88k-harris-cxux7
465 exit 0 ;;
466@@ -127,12 +264,17 @@
467 echo m88k-motorola-sysv3
468 exit 0 ;;
469 AViiON:dgux:*:*)
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}
476 else
477 echo m88k-dg-dguxbcs${UNAME_RELEASE}
478 fi
479+ else echo i586-dg-dgux${UNAME_RELEASE}
480+ fi
481 exit 0 ;;
482 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
483 echo m88k-dolphin-sysv3
484@@ -150,10 +292,10 @@
485 *:IRIX*:*:*)
486 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
487 exit 0 ;;
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 '
492- i[34]86:AIX:*:*)
493+ i?86:AIX:*:*)
494 echo i386-ibm-aix
495 exit 0 ;;
496 *:AIX:2:3)
497@@ -198,7 +340,7 @@
498 echo romp-ibm-bsd4.4
499 exit 0 ;;
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
504 *:BOSX:*:*)
505 echo rs6000-bull-bosx
506@@ -216,7 +358,7 @@
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 ;;
513 esac
514 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
515@@ -264,6 +406,13 @@
516 hp8??:OSF1:*:*)
517 echo hppa1.0-hp-osf
518 exit 0 ;;
519+ i?86:OSF1:*:*)
520+ if [ -x /usr/sbin/sysversion ] ; then
521+ echo ${UNAME_MACHINE}-unknown-osf1mk
522+ else
523+ echo ${UNAME_MACHINE}-unknown-osf1
524+ fi
525+ exit 0 ;;
526 parisc*:Lites*:*:*)
527 echo hppa1.1-hp-lites
528 exit 0 ;;
529@@ -291,17 +440,33 @@
530 CRAY*Y-MP:*:*:*)
531 echo ymp-cray-unicos${UNAME_RELEASE}
532 exit 0 ;;
533- CRAY*C90:*:*:*)
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/
539+ exit 0 ;;
540+ CRAY*TS:*:*:*)
541+ echo t90-cray-unicos${UNAME_RELEASE}
542 exit 0 ;;
543 CRAY-2:*:*:*)
544 echo cray2-cray-unicos
545 exit 0 ;;
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}"
550+ exit 0 ;;
551+ F301:UNIX_System_V:*:*)
552+ echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
553+ exit 0 ;;
554 hp3[0-9][05]:NetBSD:*:*)
555 echo m68k-hp-netbsd${UNAME_RELEASE}
556 exit 0 ;;
557- i[34]86:BSD/386:*:* | *:BSD/OS:*:*)
558- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
559+ hp300:OpenBSD:*:*)
560+ echo m68k-unknown-openbsd${UNAME_RELEASE}
561+ exit 0 ;;
562+ i?86:BSD/386:*:* | *:BSD/OS:*:*)
563+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
564 exit 0 ;;
565 *:FreeBSD:*:*)
566 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
567@@ -309,36 +474,150 @@
568 *:NetBSD:*:*)
569 echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
570 exit 0 ;;
571+ *:OpenBSD:*:*)
572+ echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
573+ exit 0 ;;
574+ i*:CYGWIN*:*)
575+ echo ${UNAME_MACHINE}-pc-cygwin32
576+ exit 0 ;;
577+ i*:MINGW*:*)
578+ echo ${UNAME_MACHINE}-pc-mingw32
579+ exit 0 ;;
580+ p*:CYGWIN*:*)
581+ echo powerpcle-unknown-cygwin32
582+ exit 0 ;;
583+ prep*:SunOS:5.*:*)
584+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
585+ exit 0 ;;
586 *:GNU:*:*)
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,/.*$,,'`
589 exit 0 ;;
590 *:Linux:*:*)
591+ # uname on the ARM produces all sorts of strangeness, and we need to
592+ # filter it out.
593+ case "$UNAME_MACHINE" in
594+ arm* | sa110*) UNAME_MACHINE="arm" ;;
595+ esac
596+
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
608- else
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
615+ s/[ ][ ]*/ /g
616+ s/.*supported emulations: *//
617+ s/ .*//
618+ p'`
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 ;;
626+ esac
627+
628+ if test "${UNAME_MACHINE}" = "alpha" ; then
629+ sed 's/^ //' <<EOF >dummy.s
630+ .globl main
631+ .ent main
632+ main:
633+ .frame \$30,0,\$26,0
634+ .prologue 0
635+ .long 0x47e03d80 # implver $0
636+ lda \$2,259
637+ .long 0x47e20c21 # amask $2,$1
638+ srl \$1,8,\$2
639+ sll \$2,2,\$2
640+ sll \$0,3,\$0
641+ addl \$1,\$0,\$0
642+ addl \$2,\$0,\$0
643+ ret \$31,(\$26),1
644+ .end main
645+EOF
646+ LIBC=""
647+ ${CC-cc} dummy.s -o dummy 2>/dev/null
648+ if test "$?" = 0 ; then
649+ ./dummy
650+ case "$?" in
651+ 7)
652+ UNAME_MACHINE="alpha"
653+ ;;
654+ 15)
655+ UNAME_MACHINE="alphaev5"
656+ ;;
657+ 14)
658+ UNAME_MACHINE="alphaev56"
659+ ;;
660+ 10)
661+ UNAME_MACHINE="alphapca56"
662+ ;;
663+ 16)
664+ UNAME_MACHINE="alphaev6"
665+ ;;
666+ esac
667+
668+ objdump --private-headers dummy | \
669+ grep ld.so.1 > /dev/null
670+ if test "$?" = 0 ; then
671+ LIBC="libc1"
672+ fi
673+ fi
674+ rm -f dummy.s dummy
675+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
676+ elif test "${UNAME_MACHINE}" = "mips" ; then
677+ cat >dummy.c <<EOF
678+main(argc, argv)
679+ int argc;
680+ char *argv[];
681+{
682+#ifdef __MIPSEB__
683+ printf ("%s-unknown-linux-gnu\n", argv[1]);
684+#endif
685+#ifdef __MIPSEL__
686+ printf ("%sel-unknown-linux-gnu\n", argv[1]);
687+#endif
688+ return 0;
689+}
690+EOF
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
693+ else
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
701+
702+ case "${UNAME_MACHINE}" in
703+ i?86)
704+ VENDOR=pc;
705+ ;;
706+ *)
707+ VENDOR=unknown;
708+ ;;
709+ esac
710 # Determine whether the default compiler is a.out or elf
711 cat >dummy.c <<EOF
712+#include <features.h>
713 main(argc, argv)
714-int argc;
715-char *argv[];
716+ int argc;
717+ char *argv[];
718 {
719 #ifdef __ELF__
720- printf ("%s-unknown-linux\n", argv[1]);
721+# ifdef __GLIBC__
722+# if __GLIBC__ >= 2
723+ printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
724+# else
725+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
726+# endif
727+# else
728+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
729+# endif
730 #else
731- printf ("%s-unknown-linuxaout\n", argv[1]);
732+ printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
733 #endif
734 return 0;
735 }
736@@ -348,30 +627,45 @@
737 fi ;;
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
743 exit 0 ;;
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}
752+ exit 0 ;;
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}
756 else
757- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
758+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
759 fi
760 exit 0 ;;
761- i[34]86:*:3.2:*)
762+ i?86:*:3.2:*)
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
774 else
775- echo ${UNAME_MACHINE}-unknown-sysv32
776+ echo ${UNAME_MACHINE}-pc-sysv32
777 fi
778 exit 0 ;;
779+ pc:*:*:*)
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
783+ exit 0 ;;
784 Intel:Mach:3*:*)
785- echo i386-unknown-mach3
786+ echo i386-pc-mach3
787 exit 0 ;;
788 paragon:*:*:*)
789 echo i860-intel-osf1
790@@ -387,30 +681,36 @@
791 # "miniframe"
792 echo m68010-convergent-sysv
793 exit 0 ;;
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 ;;
802+ OS_REL=''
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}
815+ m68*:LynxOS:2.*:*)
816+ echo m68k-unknown-lynxos${UNAME_RELEASE}
817 exit 0 ;;
818 mc68030:UNIX_System_V:4.*:*)
819 echo m68k-atari-sysv4
820 exit 0 ;;
821- i[34]86:LynxOS:2.[23]*:*)
822- echo i386-lynx-lynxos${UNAME_RELEASE}
823+ i?86:LynxOS:2.*:*)
824+ echo i386-unknown-lynxos${UNAME_RELEASE}
825 exit 0 ;;
826- TSUNAMI:LynxOS:2.[23]*:*)
827- echo sparc-lynx-lynxos${UNAME_RELEASE}
828+ TSUNAMI:LynxOS:2.*:*)
829+ echo sparc-unknown-lynxos${UNAME_RELEASE}
830 exit 0 ;;
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}
835+ exit 0 ;;
836+ SM[BE]S:UNIX_SV:*:*)
837+ echo mips-dde-sysv${UNAME_RELEASE}
838 exit 0 ;;
839 RM*:SINIX-*:*:*)
840 echo mips-sni-sysv4
841@@ -423,6 +723,32 @@
842 echo ns32k-sni-sysv
843 fi
844 exit 0 ;;
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
848+ exit 0 ;;
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
853+ exit 0 ;;
854+ *:*:*:FTX*)
855+ # From seanf@swdc.stratus.com.
856+ echo i860-stratus-sysv4
857+ exit 0 ;;
858+ mc68*:A/UX:*:*)
859+ echo m68k-apple-aux${UNAME_RELEASE}
860+ exit 0 ;;
861+ news*:NEWS-OS:*:6*)
862+ echo mips-sony-newsos6
863+ exit 0 ;;
864+ R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
865+ if [ -d /usr/nec ]; then
866+ echo mips-nec-sysv${UNAME_RELEASE}
867+ else
868+ echo mips-unknown-sysv${UNAME_RELEASE}
869+ fi
870+ exit 0 ;;
871 esac
872
873 #echo '(No uname command or uname output not recognized.)' 1>&2
874@@ -452,15 +778,6 @@
875 #endif
876 #endif
877
878-#if defined (host_mips) && defined (MIPSEB)
879-#if defined (SYSTYPE_BSD43)
880- printf ("mips-mips-riscos4bsd\n"); exit (0);
881-#endif
882-#if defined (SYSTYPE_SYSV)
883- printf ("mips-mips-riscos4sysv\n"); exit (0);
884-#endif
885-#endif
886-
887 #if defined (__arm) && defined (__acorn) && defined (__unix)
888 printf ("arm-acorn-riscix"); exit (0);
889 #endif
890@@ -475,7 +792,7 @@
891 #endif
892 int version;
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);
896 exit (0);
897 #endif
898
899@@ -492,7 +809,7 @@
900 #endif
901
902 #if defined (__386BSD__)
903- printf ("i386-unknown-bsd\n"); exit (0);
904+ printf ("i386-pc-bsd\n"); exit (0);
905 #endif
906
907 #if defined (sequent)
908diff -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
911@@ -1,9 +1,9 @@
912 #! /bin/sh
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.
920 #
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
923@@ -41,6 +41,8 @@
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.
930
931 if [ x$1 = x ]
932@@ -62,11 +64,21 @@
933 ;;
934 esac
935
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/.*-/-/'`
940-else os=; fi
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/'`
944+case $maybe_os in
945+ linux-gnu*)
946+ os=-$maybe_os
947+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
948+ ;;
949+ *)
950+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
951+ if [ $basic_machine != $1 ]
952+ then os=`echo $1 | sed 's/.*-/-/'`
953+ else os=; fi
954+ ;;
955+esac
956
957 ### Let's recognize common machines as not being operating systems so
958 ### that things like config.sub decstation-3100 work. We also
959@@ -81,38 +93,43 @@
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 | \
965+ -apple)
966 os=
967 basic_machine=$1
968 ;;
969 -hiux*)
970 os=-hiuxwe2
971 ;;
972+ -sco5)
973+ os=sco3.2v5
974+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
975+ ;;
976 -sco4)
977 os=-sco3.2v4
978- basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
979+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
980 ;;
981 -sco3.2.[4-9]*)
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/'`
985 ;;
986 -sco3.2v[4-9]*)
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/'`
990 ;;
991 -sco*)
992 os=-sco3.2v2
993- basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
994+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
995 ;;
996 -isc)
997 os=-isc2.2
998- basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
999+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1000 ;;
1001 -clix*)
1002 basic_machine=clipper-intergraph
1003 ;;
1004 -isc*)
1005- basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
1006+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1007 ;;
1008 -lynx*)
1009 os=-lynxos
1010@@ -123,35 +140,49 @@
1011 -windowsnt*)
1012 os=`echo $os | sed -e 's/windowsnt/winnt/'`
1013 ;;
1014+ -psos*)
1015+ os=-psos
1016+ ;;
1017 esac
1018
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 \
1029- | sparc)
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
1039 ;;
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.
1043+ i[34567]86)
1044+ basic_machine=$basic_machine-pc
1045+ ;;
1046 # Object if more than one company name word.
1047 *-*-*)
1048 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1049 exit 1
1050 ;;
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-* \
1071+ | f301-*)
1072 ;;
1073 # Recognize the various machine names and aliases which stand
1074 # for a CPU type and a company and sometimes even an OS.
1075@@ -178,9 +209,9 @@
1076 amiga | amiga-*)
1077 basic_machine=m68k-cbm
1078 ;;
1079- amigados)
1080+ amigaos | amigados)
1081 basic_machine=m68k-cbm
1082- os=-amigados
1083+ os=-amigaos
1084 ;;
1085 amigaunix | amix)
1086 basic_machine=m68k-cbm
1087@@ -190,6 +221,10 @@
1088 basic_machine=m68k-apollo
1089 os=-sysv
1090 ;;
1091+ aux)
1092+ basic_machine=m68k-apple
1093+ os=-aux
1094+ ;;
1095 balance)
1096 basic_machine=ns32k-sequent
1097 os=-dynix
1098@@ -222,6 +257,10 @@
1099 basic_machine=cray2-cray
1100 os=-unicos
1101 ;;
1102+ [ctj]90-cray)
1103+ basic_machine=c90-cray
1104+ os=-unicos
1105+ ;;
1106 crds | unos)
1107 basic_machine=m68k-crds
1108 ;;
1109@@ -303,25 +342,28 @@
1110 hp9k8[0-9][0-9] | hp8[0-9][0-9])
1111 basic_machine=hppa1.0-hp
1112 ;;
1113+ hppa-next)
1114+ os=-nextstep3
1115+ ;;
1116 i370-ibm* | ibm*)
1117 basic_machine=i370-ibm
1118 os=-mvs
1119 ;;
1120 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
1121- i[345]86v32)
1122- basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
1123+ i[34567]86v32)
1124+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
1125 os=-sysv32
1126 ;;
1127- i[345]86v4*)
1128- basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
1129+ i[34567]86v4*)
1130+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
1131 os=-sysv4
1132 ;;
1133- i[345]86v)
1134- basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
1135+ i[34567]86v)
1136+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
1137 os=-sysv
1138 ;;
1139- i[345]86sol2)
1140- basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
1141+ i[34567]86sol2)
1142+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
1143 os=-solaris2
1144 ;;
1145 iris | iris4d)
1146@@ -352,6 +394,14 @@
1147 miniframe)
1148 basic_machine=m68000-convergent
1149 ;;
1150+ mipsel*-linux*)
1151+ basic_machine=mipsel-unknown
1152+ os=-linux-gnu
1153+ ;;
1154+ mips*-linux*)
1155+ basic_machine=mips-unknown
1156+ os=-linux-gnu
1157+ ;;
1158 mips3*-*)
1159 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
1160 ;;
1161@@ -419,21 +469,23 @@
1162 pc532 | pc532-*)
1163 basic_machine=ns32k-pc532
1164 ;;
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
1170+ ;;
1171+ pentiumpro | p6 | k6 | 6x86)
1172+ basic_machine=i686-pc
1173+ ;;
1174+ pentiumii | pentium2)
1175+ basic_machine=i786-pc
1176 ;;
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/^[^-]*-//'`
1181 ;;
1182- k5)
1183- # We don't have specific support for AMD's K5 yet, so just call it a Pentium
1184- basic_machine=i586-amd
1185- ;;
1186- nexen)
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/^[^-]*-//'`
1191+ ;;
1192+ pentiumii-* | pentium2-*)
1193+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
1194 ;;
1195 pn)
1196 basic_machine=pn-gould
1197@@ -517,6 +569,12 @@
1198 basic_machine=i386-sequent
1199 os=-dynix
1200 ;;
1201+ tx39)
1202+ basic_machine=mipstx39-unknown
1203+ ;;
1204+ tx39el)
1205+ basic_machine=mipstx39el-unknown
1206+ ;;
1207 tower | tower-32)
1208 basic_machine=m68k-ncr
1209 ;;
1210@@ -536,6 +594,9 @@
1211 basic_machine=vax-dec
1212 os=-vms
1213 ;;
1214+ vpp*|vx|vx-*)
1215+ basic_machine=f301-fujitsu
1216+ ;;
1217 vxworks960)
1218 basic_machine=i960-wrs
1219 os=-vxworks
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.
1223 mips)
1224- basic_machine=mips-mips
1225+ if [ x$os = x-linux-gnu ]; then
1226+ basic_machine=mips-unknown
1227+ else
1228+ basic_machine=mips-mips
1229+ fi
1230 ;;
1231 romp)
1232 basic_machine=romp-ibm
1233@@ -615,6 +680,8 @@
1234 if [ x"$os" != x"" ]
1235 then
1236 case $os in
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 @@
1243 -solaris)
1244 os=-solaris2
1245 ;;
1246- -unixware* | svr4*)
1247+ -svr4*)
1248 os=-sysv4
1249 ;;
1250+ -unixware*)
1251+ os=-sysv4.2uw
1252+ ;;
1253 -gnu/linux*)
1254- os=`echo $os | sed -e 's|gnu/linux|linux|'`
1255+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1256 ;;
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* \
1270+ | -aos* \
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.
1281 ;;
1282+ -linux*)
1283+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
1284+ ;;
1285 -sunos5*)
1286 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1287 ;;
1288@@ -668,6 +744,9 @@
1289 -ctix* | -uts*)
1290 os=-sysv
1291 ;;
1292+ -ns2 )
1293+ os=-nextstep2
1294+ ;;
1295 # Preserve the version number of sinix5.
1296 -sinix5.*)
1297 os=`echo $os | sed -e 's|sinix|sysv|'`
1298@@ -761,7 +840,7 @@
1299 os=-sysv
1300 ;;
1301 *-cbm)
1302- os=-amigados
1303+ os=-amigaos
1304 ;;
1305 *-dg)
1306 os=-dgux
1307@@ -775,6 +854,9 @@
1308 m88k-omron*)
1309 os=-luna
1310 ;;
1311+ *-next )
1312+ os=-nextstep
1313+ ;;
1314 *-sequent)
1315 os=-ptx
1316 ;;
1317@@ -808,6 +890,9 @@
1318 *-masscomp)
1319 os=-rtu
1320 ;;
1321+ f301-fujitsu)
1322+ os=-uxpv
1323+ ;;
1324 *)
1325 os=-none
1326 ;;
1327@@ -826,9 +911,6 @@
1328 -sunos*)
1329 vendor=sun
1330 ;;
1331- -lynxos*)
1332- vendor=lynx
1333- ;;
1334 -aix*)
1335 vendor=ibm
1336 ;;
1337@@ -856,8 +938,11 @@
1338 -ptx*)
1339 vendor=sequent
1340 ;;
1341- -vxworks*)
1342+ -vxsim* | -vxworks*)
1343 vendor=wrs
1344+ ;;
1345+ -aux*)
1346+ vendor=apple
1347 ;;
1348 esac
1349 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1350diff -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
1353@@ -72,7 +72,7 @@
1354 va_list args;
1355
1356 va_start(args, fmt);
1357- vsprintf(buf, fmt, args);
1358+ vsnprintf(buf, sizeof(buf), fmt, args);
1359 va_end(args);
1360
1361 if (daemon_debug) {
1362@@ -90,7 +90,7 @@
1363 va_list args;
1364
1365 va_start(args, fmt);
1366- vsprintf(buf, fmt, args);
1367+ vsnprintf(buf, sizeof(buf), fmt, args);
1368 va_end(args);
1369
1370 if (daemon_debug) {
1371@@ -127,6 +127,7 @@
1372 }
1373 }
1374 old_umask = umask(S_IWGRP | S_IWOTH);
1375+ (void) setsid();
1376
1377 PRIV_START
1378
1379diff -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
1382@@ -1,7 +1,7 @@
1383 /* A lexical scanner generated by flex */
1384
1385 /* Scanner skeleton version:
1386- * $Header$
1387+ * $Header$
1388 */
1389
1390 #define FLEX_SCANNER
1391@@ -126,6 +126,7 @@
1392 { \
1393 /* Undo effects of setting up yytext. */ \
1394 *yy_cp = yy_hold_char; \
1395+ YY_RESTORE_YY_MORE_OFFSET \
1396 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
1397 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
1398 } \
1399@@ -235,7 +236,7 @@
1400 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
1401
1402 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
1403-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str ));
1404+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
1405 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
1406
1407 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
1408@@ -456,6 +457,7 @@
1409 #define REJECT reject_used_but_not_detected
1410 #define yymore() yymore_used_but_not_detected
1411 #define YY_MORE_ADJ 0
1412+#define YY_RESTORE_YY_MORE_OFFSET
1413 char *yytext;
1414 #line 1 "parsetime.l"
1415 #define INITIAL 0
1416@@ -491,7 +493,7 @@
1417 result = 1; \
1418 } \
1419 } while(0)
1420-#line 495 "lex.yy.c"
1421+#line 497 "lex.yy.c"
1422
1423 /* Macros after this point can all be overridden by user definitions in
1424 * section 1.
1425@@ -513,6 +515,10 @@
1426 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
1427 #endif
1428
1429+#ifdef YY_NEED_STRLEN
1430+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
1431+#endif
1432+
1433 #ifndef YY_NO_INPUT
1434 #ifdef __cplusplus
1435 static int yyinput YY_PROTO(( void ));
1436@@ -641,7 +647,7 @@
1437 #line 36 "parsetime.l"
1438
1439
1440-#line 645 "lex.yy.c"
1441+#line 651 "lex.yy.c"
1442
1443 if ( yy_init )
1444 {
1445@@ -919,7 +925,7 @@
1446 #line 77 "parsetime.l"
1447 ECHO;
1448 YY_BREAK
1449-#line 923 "lex.yy.c"
1450+#line 929 "lex.yy.c"
1451 case YY_STATE_EOF(INITIAL):
1452 yyterminate();
1453
1454@@ -930,6 +936,7 @@
1455
1456 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1457 *yy_cp = yy_hold_char;
1458+ YY_RESTORE_YY_MORE_OFFSET
1459
1460 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1461 {
1462@@ -1075,7 +1082,7 @@
1463 { /* Don't try to fill the buffer, so this is an EOF. */
1464 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1465 {
1466- /* We matched a singled characater, the EOB, so
1467+ /* We matched a single character, the EOB, so
1468 * treat this as a final EOF.
1469 */
1470 return EOB_ACT_END_OF_FILE;
1471@@ -1102,7 +1109,7 @@
1472 /* don't do the read, it's not guaranteed to return an EOF,
1473 * just force an EOF
1474 */
1475- yy_n_chars = 0;
1476+ yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1477
1478 else
1479 {
1480@@ -1157,6 +1164,8 @@
1481 /* Read in more data. */
1482 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1483 yy_n_chars, num_to_read );
1484+
1485+ yy_current_buffer->yy_n_chars = yy_n_chars;
1486 }
1487
1488 if ( yy_n_chars == 0 )
1489@@ -1281,7 +1290,8 @@
1490
1491 yy_cp += (int) (dest - source);
1492 yy_bp += (int) (dest - source);
1493- yy_n_chars = yy_current_buffer->yy_buf_size;
1494+ yy_current_buffer->yy_n_chars =
1495+ yy_n_chars = yy_current_buffer->yy_buf_size;
1496
1497 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1498 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1499@@ -1319,19 +1329,31 @@
1500
1501 else
1502 { /* need more input */
1503- yytext_ptr = yy_c_buf_p;
1504+ int offset = yy_c_buf_p - yytext_ptr;
1505 ++yy_c_buf_p;
1506
1507 switch ( yy_get_next_buffer() )
1508 {
1509+ case EOB_ACT_LAST_MATCH:
1510+ /* This happens because yy_g_n_b()
1511+ * sees that we've accumulated a
1512+ * token and flags that we need to
1513+ * try matching the token before
1514+ * proceeding. But for input(),
1515+ * there's no matching to consider.
1516+ * So convert the EOB_ACT_LAST_MATCH
1517+ * to EOB_ACT_END_OF_FILE.
1518+ */
1519+
1520+ /* Reset buffer status. */
1521+ yyrestart( yyin );
1522+
1523+ /* fall through */
1524+
1525 case EOB_ACT_END_OF_FILE:
1526 {
1527 if ( yywrap() )
1528- {
1529- yy_c_buf_p =
1530- yytext_ptr + YY_MORE_ADJ;
1531 return EOF;
1532- }
1533
1534 if ( ! yy_did_buffer_switch_on_eof )
1535 YY_NEW_FILE;
1536@@ -1343,17 +1365,8 @@
1537 }
1538
1539 case EOB_ACT_CONTINUE_SCAN:
1540- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1541+ yy_c_buf_p = yytext_ptr + offset;
1542 break;
1543-
1544- case EOB_ACT_LAST_MATCH:
1545-#ifdef __cplusplus
1546- YY_FATAL_ERROR(
1547- "unexpected last match in yyinput()" );
1548-#else
1549- YY_FATAL_ERROR(
1550- "unexpected last match in input()" );
1551-#endif
1552 }
1553 }
1554 }
1555@@ -1517,6 +1530,9 @@
1556 #endif
1557
1558 {
1559+ if ( ! b )
1560+ return;
1561+
1562 b->yy_n_chars = 0;
1563
1564 /* We always need two end-of-buffer characters. The first causes
1565@@ -1576,17 +1592,17 @@
1566
1567 #ifndef YY_NO_SCAN_STRING
1568 #ifdef YY_USE_PROTOS
1569-YY_BUFFER_STATE yy_scan_string( yyconst char *str )
1570+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1571 #else
1572-YY_BUFFER_STATE yy_scan_string( str )
1573-yyconst char *str;
1574+YY_BUFFER_STATE yy_scan_string( yy_str )
1575+yyconst char *yy_str;
1576 #endif
1577 {
1578 int len;
1579- for ( len = 0; str[len]; ++len )
1580+ for ( len = 0; yy_str[len]; ++len )
1581 ;
1582
1583- return yy_scan_bytes( str, len );
1584+ return yy_scan_bytes( yy_str, len );
1585 }
1586 #endif
1587
1588@@ -1707,7 +1723,7 @@
1589 { \
1590 /* Undo effects of setting up yytext. */ \
1591 yytext[yyleng] = yy_hold_char; \
1592- yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
1593+ yy_c_buf_p = yytext + n; \
1594 yy_hold_char = *yy_c_buf_p; \
1595 *yy_c_buf_p = '\0'; \
1596 yyleng = n; \
1597@@ -1730,6 +1746,22 @@
1598 register int i;
1599 for ( i = 0; i < n; ++i )
1600 s1[i] = s2[i];
1601+ }
1602+#endif
1603+
1604+#ifdef YY_NEED_STRLEN
1605+#ifdef YY_USE_PROTOS
1606+static int yy_flex_strlen( yyconst char *s )
1607+#else
1608+static int yy_flex_strlen( s )
1609+yyconst char *s;
1610+#endif
1611+ {
1612+ register int n;
1613+ for ( n = 0; s[n]; ++n )
1614+ ;
1615+
1616+ return n;
1617 }
1618 #endif
1619
1620diff -Nru at-3.1.8/panic.c at-3.1.8.new/panic.c
1621--- at-3.1.8/panic.c Sun Sep 28 22:00:37 1997
1622+++ at-3.1.8.new/panic.c Sun Mar 28 19:46:41 1999
1623@@ -41,6 +41,7 @@
1624 /* Local headers */
1625
1626 #include "panic.h"
1627+#include "privs.h"
1628 #include "at.h"
1629
1630 /* File scope variables */
1631@@ -72,12 +73,15 @@
1632 va_list args;
1633
1634 va_start(args, fmt);
1635- vsprintf(buf, fmt, args);
1636+ vsnprintf(buf, sizeof(buf), fmt, args);
1637 va_end(args);
1638
1639 perror(buf);
1640- if (fcreated)
1641+ if (fcreated) {
1642+ PRIV_START
1643 unlink(atfile);
1644+ PRIV_END
1645+ }
1646
1647 exit(EXIT_FAILURE);
1648 }
1649@@ -88,7 +92,7 @@
1650 /* Print usage and exit.
1651 */
1652 fprintf(stderr, "Usage: at [-V] [-q x] [-f file] [-m] time\n"
1653- " atq [-V] [-q x] [-v]\n"
1654+ " atq [-V] [-q x]\n"
1655 " atrm [-V] [-q x] job ...\n"
1656 " batch [-V] [-f file] [-m]\n");
1657 exit(EXIT_FAILURE);
1658diff -Nru at-3.1.8/parsetime.y at-3.1.8.new/parsetime.y
1659--- at-3.1.8/parsetime.y Sun Sep 28 20:21:29 1997
1660+++ at-3.1.8.new/parsetime.y Sun Mar 28 19:46:41 1999
1661@@ -11,6 +11,9 @@
1662 static int isgmt;
1663 static int time_only;
1664
1665+extern int yyerror(char *s);
1666+extern int yylex();
1667+
1668 int add_date(int number, int period);
1669 %}
1670
1671@@ -181,6 +184,15 @@
1672 ;
1673
1674 am_pm : AM
1675+ {
1676+ if (exectm.tm_hour > 12) {
1677+ yyerror("Hour too large for AM");
1678+ YYERROR;
1679+ }
1680+ else if (exectm.tm_hour == 12) {
1681+ exectm.tm_hour = 0;
1682+ }
1683+ }
1684 | PM
1685 {
1686 if (exectm.tm_hour > 12) {
1687@@ -258,13 +270,13 @@
1688 ;
1689
1690
1691-day_of_week : SUN { $$ = 0; }
1692- | MON { $$ = 1; }
1693- | TUE { $$ = 2; }
1694- | WED { $$ = 3; }
1695- | THU { $$ = 4; }
1696- | FRI { $$ = 5; }
1697- | SAT { $$ = 6; }
1698+day_of_week : MON { $$ = 0; }
1699+ | TUE { $$ = 1; }
1700+ | WED { $$ = 2; }
1701+ | THU { $$ = 3; }
1702+ | FRI { $$ = 4; }
1703+ | SAT { $$ = 5; }
1704+ | SUN { $$ = 6; }
1705 ;
1706
1707 inc_number : INT
1708diff -Nru at-3.1.8/y.tab.c at-3.1.8.new/y.tab.c
1709--- at-3.1.8/y.tab.c Sun Sep 28 20:21:31 1997
1710+++ at-3.1.8.new/y.tab.c Sun Mar 28 19:46:41 1999
1711@@ -1,5 +1,6 @@
1712
1713-/* A Bison parser, made from parsetime.y with Bison version GNU Bison version 1.22
1714+/* A Bison parser, made from parsetime.y
1715+ by GNU Bison version 1.25
1716 */
1717
1718 #define YYBISON 1 /* Identify Bison output. */
1719@@ -55,30 +56,16 @@
1720 static int isgmt;
1721 static int time_only;
1722
1723+extern int yyerror(char *s);
1724+extern int yylex();
1725+
1726 int add_date(int number, int period);
1727
1728-#line 17 "parsetime.y"
1729+#line 20 "parsetime.y"
1730 typedef union {
1731 char * charval;
1732 int intval;
1733 } YYSTYPE;
1734-
1735-#ifndef YYLTYPE
1736-typedef
1737- struct yyltype
1738- {
1739- int timestamp;
1740- int first_line;
1741- int first_column;
1742- int last_line;
1743- int last_column;
1744- char *text;
1745- }
1746- yyltype;
1747-
1748-#define YYLTYPE yyltype
1749-#endif
1750-
1751 #include <stdio.h>
1752
1753 #ifndef __cplusplus
1754@@ -158,9 +145,9 @@
1755 0, 55, 0, 3, 0, 5, 0, 6, 0, 26,
1756 0, 27, 0, 28, 0, 29, 0, 30, 0, 31,
1757 0, 32, 0, 33, 0, 34, 0, 35, 0, 36,
1758- 0, 37, 0, 3, 0, 3, 0, 3, 0, 10,
1759- 0, 11, 0, 12, 0, 13, 0, 14, 0, 15,
1760- 0, 16, 0, 3, 0, 44, 0, 45, 0, 41,
1761+ 0, 37, 0, 3, 0, 3, 0, 3, 0, 11,
1762+ 0, 12, 0, 13, 0, 14, 0, 15, 0, 16,
1763+ 0, 10, 0, 3, 0, 44, 0, 45, 0, 41,
1764 0, 46, 0, 39, 0
1765 };
1766
1767@@ -168,24 +155,28 @@
1768
1769 #if YYDEBUG != 0
1770 static const short yyrline[] = { 0,
1771- 39, 43, 44, 45, 46, 47, 48, 51, 52, 53,
1772- 56, 59, 60, 61, 62, 63, 64, 65, 66, 67,
1773- 72, 78, 85, 86, 87, 91, 92, 96, 97, 98,
1774- 99, 100, 101, 104, 108, 112, 118, 124, 125, 126,
1775- 127, 128, 129, 132, 157, 170, 173, 183, 184, 197,
1776- 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1777- 208, 211, 225, 238, 261, 262, 263, 264, 265, 266,
1778- 267, 270, 280, 281, 282, 283, 284
1779+ 42, 46, 47, 48, 49, 50, 51, 54, 55, 56,
1780+ 59, 62, 63, 64, 65, 66, 67, 68, 69, 70,
1781+ 75, 81, 88, 89, 90, 94, 95, 99, 100, 101,
1782+ 102, 103, 104, 107, 111, 115, 121, 127, 128, 129,
1783+ 130, 131, 132, 135, 160, 173, 176, 186, 187, 200,
1784+ 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
1785+ 211, 214, 228, 241, 264, 265, 266, 267, 268, 269,
1786+ 270, 273, 283, 284, 285, 286, 287
1787 };
1788+#endif
1789
1790-static const char * const yytname[] = { "$","error","$illegal.","INT","NOW",
1791+
1792+#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
1793+
1794+static const char * const yytname[] = { "$","error","$undefined.","INT","NOW",
1795 "AM","PM","NOON","MIDNIGHT","TEATIME","SUN","MON","TUE","WED","THU","FRI","SAT",
1796 "TODAY","TOMORROW","NEXT","MINUTE","HOUR","DAY","WEEK","MONTH","YEAR","JAN",
1797 "FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC","WORD","','",
1798-"'-'","'.'","'/'","'+'","':'","'\\''","'h'","timespec","nowspec","now","time",
1799+"'-'","'.'","'/'","'+'","':'","'''","'h'","timespec","nowspec","now","time",
1800 "date","increment","decrement","inc_period","hr24clock_hr_min","timezone_name",
1801 "hr24clock_hour","minute","am_pm","month_name","month_number","day_number","year_number",
1802-"day_of_week","inc_number","time_sep",""
1803+"day_of_week","inc_number","time_sep", NULL
1804 };
1805 #endif
1806
1807@@ -213,8 +204,8 @@
1808
1809 static const short yydefact[] = { 0,
1810 44, 11, 20, 21, 22, 7, 8, 1, 12, 0,
1811- 0, 0, 0, 9, 10, 63, 65, 66, 67, 68,
1812- 69, 70, 71, 26, 27, 50, 51, 52, 53, 54,
1813+ 0, 0, 0, 9, 10, 63, 71, 65, 66, 67,
1814+ 68, 69, 70, 26, 27, 50, 51, 52, 53, 54,
1815 55, 56, 57, 58, 59, 60, 61, 2, 3, 5,
1816 0, 0, 0, 0, 25, 45, 13, 48, 49, 77,
1817 75, 73, 74, 76, 16, 0, 38, 39, 40, 41,
1818@@ -283,14 +274,14 @@
1819 -1, 41
1820 };
1821 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
1822-#line 3 "/usr/lib/bison.simple"
1823+#line 3 "/usr/share/misc/bison.simple"
1824
1825 /* Skeleton output parser for bison,
1826- Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman
1827+ Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
1828
1829 This program is free software; you can redistribute it and/or modify
1830 it under the terms of the GNU General Public License as published by
1831- the Free Software Foundation; either version 1, or (at your option)
1832+ the Free Software Foundation; either version 2, or (at your option)
1833 any later version.
1834
1835 This program is distributed in the hope that it will be useful,
1836@@ -300,8 +291,12 @@
1837
1838 You should have received a copy of the GNU General Public License
1839 along with this program; if not, write to the Free Software
1840- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
1841+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
1842
1843+/* As a special exception, when this file is copied by Bison into a
1844+ Bison output file, you may use that output file without restriction.
1845+ This special exception was added by the Free Software Foundation
1846+ in version 1.24 of Bison. */
1847
1848 #ifndef alloca
1849 #ifdef __GNUC__
1850@@ -375,10 +370,18 @@
1851
1852 #ifdef YYPURE
1853 #ifdef YYLSP_NEEDED
1854+#ifdef YYLEX_PARAM
1855+#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
1856+#else
1857 #define YYLEX yylex(&yylval, &yylloc)
1858+#endif
1859+#else /* not YYLSP_NEEDED */
1860+#ifdef YYLEX_PARAM
1861+#define YYLEX yylex(&yylval, YYLEX_PARAM)
1862 #else
1863 #define YYLEX yylex(&yylval)
1864 #endif
1865+#endif /* not YYLSP_NEEDED */
1866 #endif
1867
1868 /* If nonreentrant, generate the variables here */
1869@@ -426,16 +429,16 @@
1870 #endif
1871 \f
1872 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
1873-#define __yy_bcopy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT)
1874+#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
1875 #else /* not GNU C or C++ */
1876 #ifndef __cplusplus
1877
1878 /* This is the most reliable way to avoid incompatibilities
1879 in available built-in functions on various systems. */
1880 static void
1881-__yy_bcopy (from, to, count)
1882- char *from;
1883+__yy_memcpy (to, from, count)
1884 char *to;
1885+ char *from;
1886 int count;
1887 {
1888 register char *f = from;
1889@@ -451,7 +454,7 @@
1890 /* This is the most reliable way to avoid incompatibilities
1891 in available built-in functions on various systems. */
1892 static void
1893-__yy_bcopy (char *from, char *to, int count)
1894+__yy_memcpy (char *to, char *from, int count)
1895 {
1896 register char *f = from;
1897 register char *t = to;
1898@@ -464,9 +467,30 @@
1899 #endif
1900 #endif
1901 \f
1902-#line 184 "/usr/lib/bison.simple"
1903+#line 196 "/usr/share/misc/bison.simple"
1904+
1905+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
1906+ into yyparse. The argument should have type void *.
1907+ It should actually point to an object.
1908+ Grammar actions can access the variable by casting it
1909+ to the proper pointer type. */
1910+
1911+#ifdef YYPARSE_PARAM
1912+#ifdef __cplusplus
1913+#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
1914+#define YYPARSE_PARAM_DECL
1915+#else /* not __cplusplus */
1916+#define YYPARSE_PARAM_ARG YYPARSE_PARAM
1917+#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
1918+#endif /* not __cplusplus */
1919+#else /* not YYPARSE_PARAM */
1920+#define YYPARSE_PARAM_ARG
1921+#define YYPARSE_PARAM_DECL
1922+#endif /* not YYPARSE_PARAM */
1923+
1924 int
1925-yyparse()
1926+yyparse(YYPARSE_PARAM_ARG)
1927+ YYPARSE_PARAM_DECL
1928 {
1929 register int yystate;
1930 register int yyn;
1931@@ -582,12 +606,12 @@
1932 if (yystacksize > YYMAXDEPTH)
1933 yystacksize = YYMAXDEPTH;
1934 yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
1935- __yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
1936+ __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
1937 yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
1938- __yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
1939+ __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
1940 #ifdef YYLSP_NEEDED
1941 yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
1942- __yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
1943+ __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
1944 #endif
1945 #endif /* no yyoverflow */
1946
1947@@ -748,20 +772,20 @@
1948 switch (yyn) {
1949
1950 case 1:
1951-#line 40 "parsetime.y"
1952+#line 43 "parsetime.y"
1953 {
1954 time_only = 1;
1955 ;
1956 break;}
1957 case 20:
1958-#line 68 "parsetime.y"
1959+#line 71 "parsetime.y"
1960 {
1961 exectm.tm_hour = 12;
1962 exectm.tm_min = 0;
1963 ;
1964 break;}
1965 case 21:
1966-#line 73 "parsetime.y"
1967+#line 76 "parsetime.y"
1968 {
1969 exectm.tm_hour = 0;
1970 exectm.tm_min = 0;
1971@@ -769,74 +793,74 @@
1972 ;
1973 break;}
1974 case 22:
1975-#line 79 "parsetime.y"
1976+#line 82 "parsetime.y"
1977 {
1978 exectm.tm_hour = 16;
1979 exectm.tm_min = 0;
1980 ;
1981 break;}
1982 case 25:
1983-#line 88 "parsetime.y"
1984+#line 91 "parsetime.y"
1985 {
1986 add_date ((7 + yyvsp[0].intval - exectm.tm_wday) %7 + 1, DAY);
1987 ;
1988 break;}
1989 case 27:
1990-#line 93 "parsetime.y"
1991+#line 96 "parsetime.y"
1992 {
1993 add_date(1, DAY);
1994 ;
1995 break;}
1996 case 34:
1997-#line 105 "parsetime.y"
1998+#line 108 "parsetime.y"
1999 {
2000 add_date(yyvsp[-1].intval, yyvsp[0].intval);
2001 ;
2002 break;}
2003 case 35:
2004-#line 109 "parsetime.y"
2005+#line 112 "parsetime.y"
2006 {
2007 add_date(1, yyvsp[0].intval);
2008 ;
2009 break;}
2010 case 36:
2011-#line 113 "parsetime.y"
2012+#line 116 "parsetime.y"
2013 {
2014 add_date ((6 + yyvsp[0].intval - exectm.tm_wday) %7 +1, DAY);
2015 ;
2016 break;}
2017 case 37:
2018-#line 119 "parsetime.y"
2019+#line 122 "parsetime.y"
2020 {
2021 add_date(-yyvsp[-1].intval, yyvsp[0].intval);
2022 ;
2023 break;}
2024 case 38:
2025-#line 124 "parsetime.y"
2026+#line 127 "parsetime.y"
2027 { yyval.intval = MINUTE ; ;
2028 break;}
2029 case 39:
2030-#line 125 "parsetime.y"
2031+#line 128 "parsetime.y"
2032 { yyval.intval = HOUR ; ;
2033 break;}
2034 case 40:
2035-#line 126 "parsetime.y"
2036+#line 129 "parsetime.y"
2037 { yyval.intval = DAY ; ;
2038 break;}
2039 case 41:
2040-#line 127 "parsetime.y"
2041+#line 130 "parsetime.y"
2042 { yyval.intval = WEEK ; ;
2043 break;}
2044 case 42:
2045-#line 128 "parsetime.y"
2046+#line 131 "parsetime.y"
2047 { yyval.intval = MONTH ; ;
2048 break;}
2049 case 43:
2050-#line 129 "parsetime.y"
2051+#line 132 "parsetime.y"
2052 { yyval.intval = YEAR ; ;
2053 break;}
2054 case 44:
2055-#line 133 "parsetime.y"
2056+#line 136 "parsetime.y"
2057 {
2058 exectm.tm_min = -1;
2059 exectm.tm_hour = -1;
2060@@ -861,7 +885,7 @@
2061 ;
2062 break;}
2063 case 45:
2064-#line 158 "parsetime.y"
2065+#line 161 "parsetime.y"
2066 {
2067 if (strcasecmp(yyvsp[0].charval,"utc") == 0) {
2068 isgmt = 1;
2069@@ -874,7 +898,7 @@
2070 ;
2071 break;}
2072 case 47:
2073-#line 174 "parsetime.y"
2074+#line 177 "parsetime.y"
2075 {
2076 if (sscanf(yyvsp[0].charval, "%d", &exectm.tm_min) != 1) {
2077 yyerror("Error in minute");
2078@@ -884,7 +908,7 @@
2079 ;
2080 break;}
2081 case 49:
2082-#line 185 "parsetime.y"
2083+#line 188 "parsetime.y"
2084 {
2085 if (exectm.tm_hour > 12) {
2086 yyerror("Hour too large for PM");
2087@@ -896,55 +920,55 @@
2088 ;
2089 break;}
2090 case 50:
2091-#line 197 "parsetime.y"
2092+#line 200 "parsetime.y"
2093 { exectm.tm_mon = 0; ;
2094 break;}
2095 case 51:
2096-#line 198 "parsetime.y"
2097+#line 201 "parsetime.y"
2098 { exectm.tm_mon = 1; ;
2099 break;}
2100 case 52:
2101-#line 199 "parsetime.y"
2102+#line 202 "parsetime.y"
2103 { exectm.tm_mon = 2; ;
2104 break;}
2105 case 53:
2106-#line 200 "parsetime.y"
2107+#line 203 "parsetime.y"
2108 { exectm.tm_mon = 3; ;
2109 break;}
2110 case 54:
2111-#line 201 "parsetime.y"
2112+#line 204 "parsetime.y"
2113 { exectm.tm_mon = 4; ;
2114 break;}
2115 case 55:
2116-#line 202 "parsetime.y"
2117+#line 205 "parsetime.y"
2118 { exectm.tm_mon = 5; ;
2119 break;}
2120 case 56:
2121-#line 203 "parsetime.y"
2122+#line 206 "parsetime.y"
2123 { exectm.tm_mon = 6; ;
2124 break;}
2125 case 57:
2126-#line 204 "parsetime.y"
2127+#line 207 "parsetime.y"
2128 { exectm.tm_mon = 7; ;
2129 break;}
2130 case 58:
2131-#line 205 "parsetime.y"
2132+#line 208 "parsetime.y"
2133 { exectm.tm_mon = 8; ;
2134 break;}
2135 case 59:
2136-#line 206 "parsetime.y"
2137+#line 209 "parsetime.y"
2138 { exectm.tm_mon = 9; ;
2139 break;}
2140 case 60:
2141-#line 207 "parsetime.y"
2142+#line 210 "parsetime.y"
2143 { exectm.tm_mon =10; ;
2144 break;}
2145 case 61:
2146-#line 208 "parsetime.y"
2147+#line 211 "parsetime.y"
2148 { exectm.tm_mon =11; ;
2149 break;}
2150 case 62:
2151-#line 212 "parsetime.y"
2152+#line 215 "parsetime.y"
2153 {
2154 {
2155 int mnum = -1;
2156@@ -960,7 +984,7 @@
2157 ;
2158 break;}
2159 case 63:
2160-#line 226 "parsetime.y"
2161+#line 229 "parsetime.y"
2162 {
2163 exectm.tm_mday = -1;
2164 sscanf(yyvsp[0].charval, "%d", &exectm.tm_mday);
2165@@ -973,7 +997,7 @@
2166 ;
2167 break;}
2168 case 64:
2169-#line 239 "parsetime.y"
2170+#line 242 "parsetime.y"
2171 {
2172 {
2173 int ynum;
2174@@ -995,35 +1019,35 @@
2175 ;
2176 break;}
2177 case 65:
2178-#line 261 "parsetime.y"
2179+#line 264 "parsetime.y"
2180 { yyval.intval = 0; ;
2181 break;}
2182 case 66:
2183-#line 262 "parsetime.y"
2184+#line 265 "parsetime.y"
2185 { yyval.intval = 1; ;
2186 break;}
2187 case 67:
2188-#line 263 "parsetime.y"
2189+#line 266 "parsetime.y"
2190 { yyval.intval = 2; ;
2191 break;}
2192 case 68:
2193-#line 264 "parsetime.y"
2194+#line 267 "parsetime.y"
2195 { yyval.intval = 3; ;
2196 break;}
2197 case 69:
2198-#line 265 "parsetime.y"
2199+#line 268 "parsetime.y"
2200 { yyval.intval = 4; ;
2201 break;}
2202 case 70:
2203-#line 266 "parsetime.y"
2204+#line 269 "parsetime.y"
2205 { yyval.intval = 5; ;
2206 break;}
2207 case 71:
2208-#line 267 "parsetime.y"
2209+#line 270 "parsetime.y"
2210 { yyval.intval = 6; ;
2211 break;}
2212 case 72:
2213-#line 271 "parsetime.y"
2214+#line 274 "parsetime.y"
2215 {
2216 if (sscanf(yyvsp[0].charval, "%d", &yyval.intval) != 1) {
2217 yyerror("Unknown increment");
2218@@ -1034,7 +1058,7 @@
2219 break;}
2220 }
2221 /* the action file gets copied in in place of this dollarsign */
2222-#line 465 "/usr/lib/bison.simple"
2223+#line 498 "/usr/share/misc/bison.simple"
2224 \f
2225 yyvsp -= yylen;
2226 yyssp -= yylen;
2227@@ -1230,7 +1254,7 @@
2228 yystate = yyn;
2229 goto yynewstate;
2230 }
2231-#line 287 "parsetime.y"
2232+#line 290 "parsetime.y"
2233
2234
2235
This page took 0.548259 seconds and 4 git commands to generate.