emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 5c63130: ; Remove */localtime-buffer.* (omitted from previous com


From: Paul Eggert
Subject: master 5c63130: ; Remove */localtime-buffer.* (omitted from previous commit by accident).
Date: Thu, 30 Jul 2020 17:34:13 -0400 (EDT)

branch: master
commit 5c631309686ae6c04e89a3aeb3a0273cdcf57057
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>

    ; 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(-)

diff --git a/lib/localtime-buffer.c b/lib/localtime-buffer.c
deleted file mode 100644
index 141849c..0000000
--- 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 3801742..0000000
--- 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
diff --git a/m4/localtime-buffer.m4 b/m4/localtime-buffer.m4
deleted file mode 100644
index 09df3c9..0000000
--- 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
-])



reply via email to

[Prev in Thread] Current Thread [Next in Thread]