From 5c631309686ae6c04e89a3aeb3a0273cdcf57057 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 30 Jul 2020 14:30:56 -0700 Subject: [PATCH] ; Remove */localtime-buffer.* (omitted from previous commit by accident). --- lib/localtime-buffer.c | 60 ------------------------------------------ lib/localtime-buffer.h | 27 ------------------- m4/localtime-buffer.m4 | 21 --------------- 3 files changed, 108 deletions(-) delete mode 100644 lib/localtime-buffer.c delete mode 100644 lib/localtime-buffer.h delete mode 100644 m4/localtime-buffer.m4 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 . */ - -/* written by Jim Meyering */ - -#include - -/* 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 . */ - -/* written by Jim Meyering */ - -#include - -#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 diff --git a/m4/localtime-buffer.m4 b/m4/localtime-buffer.m4 deleted file mode 100644 index 09df3c97f25..00000000000 --- a/m4/localtime-buffer.m4 +++ /dev/null @@ -1,21 +0,0 @@ -# localtime-buffer.m4 serial 1 -dnl Copyright (C) 2017-2020 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_LOCALTIME_BUFFER_DEFAULTS], -[ - NEED_LOCALTIME_BUFFER=0 -]) - -dnl Macro invoked from other modules, to signal that the compilation of -dnl module 'localtime-buffer' is needed. -AC_DEFUN([gl_LOCALTIME_BUFFER_NEEDED], -[ - AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS]) - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) - NEED_LOCALTIME_BUFFER=1 - REPLACE_GMTIME=1 - REPLACE_LOCALTIME=1 -]) -- 2.39.2