mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-29 00:19:51 +02:00
fixes for glibc time/gettimeofday issue; fix issue with history file containing one line too few if saving timestamps; fix for signal arriving while displaying readline completions
This commit is contained in:
@@ -52,6 +52,15 @@ struct timeval
|
||||
extern int gettimeofday (struct timeval * restrict, void * restrict);
|
||||
#endif
|
||||
|
||||
/* consistently use gettimeofday for time information */
|
||||
static inline time_t
|
||||
getnow(void)
|
||||
{
|
||||
struct timeval now;
|
||||
gettimeofday (&now, 0);
|
||||
return now.tv_sec;
|
||||
}
|
||||
|
||||
/* These exist on BSD systems, at least. */
|
||||
#if !defined (timerclear)
|
||||
# define timerclear(tvp) do { (tvp)->tv_sec = 0; (tvp)->tv_usec = 0; } while (0)
|
||||
|
||||
Reference in New Issue
Block a user