diff options
author | Jim Meyering <jim@meyering.net> | 1994-02-10 19:14:24 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1994-02-10 19:14:24 +0000 |
commit | 4caa3d07cfffdb530250195f9df116d39b6fbcd0 (patch) | |
tree | 68fb192aa9380b9845c365cf7a65b79da3d29c80 | |
parent | 589f6b1c17d8fe77d001d3ef8a0b40c748073f1a (diff) | |
download | coreutils-4caa3d07cfffdb530250195f9df116d39b6fbcd0.tar.xz |
merge with 1.9.2g
-rw-r--r-- | lib/getdate.y | 32 | ||||
-rw-r--r-- | lib/getopt.c | 12 | ||||
-rw-r--r-- | old/sh-utils/ChangeLog | 42 | ||||
-rw-r--r-- | old/sh-utils/NEWS | 6 |
4 files changed, 70 insertions, 22 deletions
diff --git a/lib/getdate.y b/lib/getdate.y index 35d064f48..63b9e7cfa 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -887,27 +887,25 @@ yylex() #define TM_YEAR_ORIGIN 1900 /* Yield A - B, measured in seconds. */ -static time_t -difftm(a, b) +static long +difftm (a, b) struct tm *a, *b; { int ay = a->tm_year + (TM_YEAR_ORIGIN - 1); int by = b->tm_year + (TM_YEAR_ORIGIN - 1); - return - ( - ( - ( - /* difference in day of year */ - a->tm_yday - b->tm_yday - /* + intervening leap days */ - + ((ay >> 2) - (by >> 2)) - - (ay/100 - by/100) - + ((ay/100 >> 2) - (by/100 >> 2)) - /* + difference in years * 365 */ - + (time_t)(ay-by) * 365 - )*24 + (a->tm_hour - b->tm_hour) - )*60 + (a->tm_min - b->tm_min) - )*60 + (a->tm_sec - b->tm_sec); + int days = ( + /* difference in day of year */ + a->tm_yday - b->tm_yday + /* + intervening leap days */ + + ((ay >> 2) - (by >> 2)) + - (ay/100 - by/100) + + ((ay/100 >> 2) - (by/100 >> 2)) + /* + difference in years * 365 */ + + (long)(ay-by) * 365 + ); + return (60*(60*(24*days + (a->tm_hour - b->tm_hour)) + + (a->tm_min - b->tm_min)) + + (a->tm_sec - b->tm_sec)); } time_t diff --git a/lib/getopt.c b/lib/getopt.c index 2f1e6d8d7..6cdedb019 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -199,15 +199,19 @@ my_index (str, chr) (Supposedly there are some machines where it might get a warning, but changing this conditional to __STDC__ is too risky.) */ #ifdef __GNUC__ +#if ! (defined (emacs) && !defined (__STDC__)) #ifdef IN_GCC #include "gstddef.h" -#else +#else /* not IN_GCC */ +/* Motorola Delta 68k R3V7 comes with GCC but not stddef.h. + Enable Emacs to compile on it. */ #include <stddef.h> -#endif +#endif /* not IN_GCC */ extern size_t strlen (const char *); -#endif +#endif /* ! (defined (emacs) && !defined (__STDC__)) */ +#endif /* __GNUC__ */ -#endif /* GNU C library. */ +#endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ diff --git a/old/sh-utils/ChangeLog b/old/sh-utils/ChangeLog index cebf5f472..27bd14f9d 100644 --- a/old/sh-utils/ChangeLog +++ b/old/sh-utils/ChangeLog @@ -1,4 +1,41 @@ -Mon Jan 24 12:57:18 1994 Jim Meyering (meyering@comco.com) +Thu Feb 10 01:22:37 1994 Jim Meyering (meyering@comco.com) + + * stty.c [CSWTCH] (__sparc__ && __svr4__): Define `swtch' to + _POSIX_VDISABLE by default. Otherwise, the default settings on + SunOS 5.3 (from /usr/include/sys/termios.h) have both `swtch' + and `susp' set to ^Z. Those default settings are not unusual. + What is unusual is that with such settings on SunOS 5.3, the tty + driver doesn't generate a signal for control-Z. Reported by + Brent Wiese <brent@dot.imgen.bcm.tmc.edu>. + + * stty.c (main) [CIBAUD]: Don't report an error on SunOS 4.1.x + systems if the only difference is in this nybble of c_cflag. + See the comments for the gory details. Thanks to + Erez "HWank1" Zadok <ezk@cs.columbia.edu> for reporting this + and helping me reproduce it. + +Tue Feb 01 00:59:56 1994 Jim Meyering (meyering@comco.com) + + * stty.c (main): Call tcsetattr only if we've updated tty modes, + not e.g. if we've changed the window size. + + * Update Copyright dates in src/*. + +Fri Jan 28 11:02:21 1994 Jim Meyering (meyering@comco.com) + + * configure.in: Don't set LDFLAGS since linking now uses both + LDFLAGS and CFLAGS. + +Wed Jan 26 10:54:02 1994 Jim Meyering (meyering@comco.com) + + * stty.c (get_win_size): New function. Try getting size first + for the device on stdout. Try stdin only if that fails. Suggested + by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>. + (set_win_size): Call get_win_size instead of calling ioctl directly. + (display_window_size): Ditto. + (screen_columns): Ditto. + +Mon Jan 24 22:57:18 1994 Jim Meyering (meyering@comco.com) * stty.c (set_window_size): Work around SunOS 4.x kernel bug that makes `stty rows 34 cols 80;stty rows 0;stty cols 0' incorrectly @@ -6,6 +43,9 @@ Mon Jan 24 12:57:18 1994 Jim Meyering (meyering@comco.com) The kernel bug is fixed in Solaris 2. Mostly from Alexander Dupuy <dupuy@cs.columbia.edu>. + * src/Makefile.in: Use both LDFLAGS and CFLAGS when linking. + * man/Makefile.in: Use binprefix as the default manprefix. + Thu Jan 13 17:27:38 1994 Jim Meyering (meyering@comco.com) * src/Makefile.in: Change all link commands to use both $(CFLAGS) diff --git a/old/sh-utils/NEWS b/old/sh-utils/NEWS index bc8bf81c7..c659447d8 100644 --- a/old/sh-utils/NEWS +++ b/old/sh-utils/NEWS @@ -1,4 +1,10 @@ User visible changes in release 1.9.3 +* stty defaults `swtch' to undefined for Solaris so `susp' (^Z) will work. +* stty no longer gives an error message when it finds a spurious difference + (due to buggy tcsetattr/tcsetattr) between requested and current tty + modes under SunOS 4.1.x. +* stty no longer fails if the ioctl to determine the display width fails + when displaying settings. * stty works around SunOS 4.x kernel bug that made `stty rows 0 cols 0' fail. * who and tee no longer fail gratuitously when continued after an interrupted read or write system call. |