From 84b0115f0dc9483dbc7f064b46afaddc4d94db92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= Date: Thu, 14 May 2020 12:18:54 -0700 Subject: compat: remove gmtime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ccd469450a (date.c: switch to reentrant {gm,local}time_r, 2019-11-28) removes the only gmtime() call we had and moves to gmtime_r() which doesn't have the same portability problems. Remove the compat gmtime code since it is no longer needed, and confirm by successfull running t4212 in FreeBSD 9.3 amd64 (the oldest I could get a hold off). Further work might be needed to ensure 32bit time_t systems (like FreeBSD i386) will handle correctly the overflows tested in t4212, but that is orthogonal to this change, and it doesn't change the current behaviour as neither gmtime() or gmtime_r() will ever return NULL on those systems because time_t is unsigned. Signed-off-by: Carlo Marcelo Arenas Belón Signed-off-by: Junio C Hamano --- Makefile | 8 -------- 1 file changed, 8 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 9cd9826800..5e2f8b30c3 100644 --- a/Makefile +++ b/Makefile @@ -405,9 +405,6 @@ all:: # with a different indexfile format version. If it isn't set the index # file format used is index-v[23]. # -# Define GMTIME_UNRELIABLE_ERRORS if your gmtime() function does not -# return NULL when it receives a bogus time_t. -# # Define HAVE_CLOCK_GETTIME if your platform has clock_gettime. # # Define HAVE_CLOCK_MONOTONIC if your platform has CLOCK_MONOTONIC. @@ -1801,11 +1798,6 @@ ifndef NO_MSGFMT_EXTENDED_OPTIONS MSGFMT += --check --statistics endif -ifdef GMTIME_UNRELIABLE_ERRORS - COMPAT_OBJS += compat/gmtime.o - BASIC_CFLAGS += -DGMTIME_UNRELIABLE_ERRORS -endif - ifdef HAVE_CLOCK_GETTIME BASIC_CFLAGS += -DHAVE_CLOCK_GETTIME endif -- cgit v1.2.3