From: Jim Meyering Date: Thu, 10 Feb 1994 19:14:24 +0000 (+0000) Subject: merge with 1.9.2g X-Git-Tag: textutils-1_12_1~757 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4caa3d07cfffdb530250195f9df116d39b6fbcd0;p=platform%2Fupstream%2Fcoreutils.git merge with 1.9.2g --- diff --git a/lib/getdate.y b/lib/getdate.y index 35d064f..63b9e7c 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 2f1e6d8..6cdedb0 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 -#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 cebf5f4..27bd14f 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 . + + * 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 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 . + (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 . + * 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 bc8bf81..c659447 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.