1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-26 02:30:35 +02:00

merge with 1.9.2g

This commit is contained in:
Jim Meyering
1994-02-10 19:14:24 +00:00
parent 589f6b1c17
commit 4caa3d07cf
4 changed files with 70 additions and 22 deletions
+15 -17
View File
@@ -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
+8 -4
View File
@@ -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. */
+41 -1
View File
@@ -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)
+6
View File
@@ -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.