summaryrefslogtreecommitdiff
path: root/gl/lib/gettimeofday.c
diff options
context:
space:
mode:
Diffstat (limited to 'gl/lib/gettimeofday.c')
-rw-r--r--gl/lib/gettimeofday.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/gl/lib/gettimeofday.c b/gl/lib/gettimeofday.c
index 057cebdb..36c7920a 100644
--- a/gl/lib/gettimeofday.c
+++ b/gl/lib/gettimeofday.c
@@ -1,19 +1,19 @@
/* Provide gettimeofday for systems that don't have it or for which it's broken.
- Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2007, 2009-2022 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
+ This file is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful,
+ This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <https://www.gnu.org/licenses/>. */
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* written by Jim Meyering */
@@ -29,8 +29,6 @@
# include <windows.h>
#endif
-#include "localtime-buffer.h"
-
#ifdef WINDOWS_NATIVE
/* Don't assume that UNICODE is not defined. */
@@ -123,11 +121,6 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
#else
# if HAVE_GETTIMEOFDAY
-# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
- /* Save and restore the contents of the buffer used for localtime's
- result around the call to gettimeofday. */
- struct tm save = *localtime_buffer_addr;
-# endif
# if defined timeval /* 'struct timeval' overridden by gnulib? */
# undef timeval
@@ -142,10 +135,6 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
int result = gettimeofday (tv, (struct timezone *) tz);
# endif
-# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
- *localtime_buffer_addr = save;
-# endif
-
return result;
# else