summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-07-30 14:30:56 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2020-07-30 14:34:07 -0700
commit5c631309686ae6c04e89a3aeb3a0273cdcf57057 (patch)
tree3cd576f608953dff89fb439e6824f0b6063fb94f /lib
parent5d89a9c2846d32b4726faaf5c8652f3f23dc7d73 (diff)
downloademacs-5c631309686ae6c04e89a3aeb3a0273cdcf57057.tar.gz
; Remove */localtime-buffer.* (omitted from previous commit by accident).
Diffstat (limited to 'lib')
-rw-r--r--lib/localtime-buffer.c60
-rw-r--r--lib/localtime-buffer.h27
2 files changed, 0 insertions, 87 deletions
diff --git a/lib/localtime-buffer.c b/lib/localtime-buffer.c
deleted file mode 100644
index 141849c5461..00000000000
--- a/lib/localtime-buffer.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Provide access to the last buffer returned by localtime() or gmtime().
-
- Copyright (C) 2001-2003, 2005-2007, 2009-2020 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 program 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.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <https://www.gnu.org/licenses/>. */
-
-/* written by Jim Meyering */
-
-#include <config.h>
-
-/* Specification. */
-#include "localtime-buffer.h"
-
-#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
-
-static struct tm tm_zero_buffer;
-struct tm *localtime_buffer_addr = &tm_zero_buffer;
-
-/* This is a wrapper for localtime.
-
- On the first call, record the address of the static buffer that
- localtime uses for its result. */
-
-struct tm *
-rpl_localtime (time_t const *timep)
-#undef localtime
-{
- struct tm *tm = localtime (timep);
-
- if (localtime_buffer_addr == &tm_zero_buffer)
- localtime_buffer_addr = tm;
-
- return tm;
-}
-
-/* Same as above, since gmtime and localtime use the same buffer. */
-struct tm *
-rpl_gmtime (time_t const *timep)
-#undef gmtime
-{
- struct tm *tm = gmtime (timep);
-
- if (localtime_buffer_addr == &tm_zero_buffer)
- localtime_buffer_addr = tm;
-
- return tm;
-}
-
-#endif
diff --git a/lib/localtime-buffer.h b/lib/localtime-buffer.h
deleted file mode 100644
index 3801742f7ba..00000000000
--- a/lib/localtime-buffer.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Provide access to the last buffer returned by localtime() or gmtime().
-
- Copyright (C) 2001-2003, 2005-2007, 2009-2020 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 program 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.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <https://www.gnu.org/licenses/>. */
-
-/* written by Jim Meyering */
-
-#include <time.h>
-
-#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
-
-/* The address of the last buffer returned by localtime() or gmtime(). */
-extern struct tm *localtime_buffer_addr;
-
-#endif