It has not been used for some time.  It stopped working in 2025a, and
anyway was superseded in 2013d by the check_time_t_alternatives rule.
* Makefile (TYPECHECK_CFLAGS, typecheck, long-long.ck, unsigned.ck):
Remove.  All uses removed.
* zdump.c (mktime_z) [TYPECHECK]: Remove.
(my_localtime_rz): Remove.  All callers now use localtime_rz.
---
 Makefile | 19 ----------------
 NEWS     |  9 ++++++++
 zdump.c  | 66 +++++++++-----------------------------------------------
 3 files changed, 19 insertions(+), 75 deletions(-)

diff --git a/Makefile b/Makefile
index 98c19b93..7edb657a 100644
--- a/Makefile
+++ b/Makefile
@@ -1406,24 +1406,6 @@ $(ALL_ASC):
                $(SET_TIMESTAMP) $(@:.t=) $(?:.t=)
                touch $@
 
-TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T
-typecheck: long-long.ck unsigned.ck
-long-long.ck unsigned.ck: $(VERSION_DEPS)
-               rm -fr $@d
-               mkdir $@d
-               ln $(VERSION_DEPS) $@d
-               cd $@d && \
-                 case $@ in \
-                   long-long.*) i="long long";; \
-                   unsigned.* ) i="unsigned" ;; \
-                 esac && \
-                 $(MAKE) \
-                   CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \
-                   TOPDIR="$$PWD" \
-                   install
-               $@d/zdump -i -c 1970,1971 Europe/Rome
-               touch $@
-
 zonenames:     tzdata.zi
                @$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi
 
@@ -1449,6 +1431,5 @@ zic.o:            private.h tzdir.h tzfile.h version.h
 .PHONY: traditional_signatures traditional_signatures_version
 .PHONY: traditional_tarballs traditional_tarballs_version
 .PHONY: tailored_tarballs tailored_tarballs_version
-.PHONY: typecheck
 .PHONY: zonenames zones
 .PHONY: $(ZDS)
diff --git a/NEWS b/NEWS
index fb1ced71..78e35a7b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,14 @@
 News for the tz database
 
+Unreleased, experimental changes
+
+  Changes to build procedure
+
+    The undocumented ‘typecheck’ Makefile check rule has been removed.
+    It stopped working in 2025a and evidently nobody noticed.
+    The rule was superseded by ‘check_time_t_alternatives’ in 2013d.
+
+
 Release 2026b - 2026-04-22 23:06:43 -0700
 
   Briefly:
diff --git a/zdump.c b/zdump.c
index c7812eae..54ef63c0 100644
--- a/zdump.c
+++ b/zdump.c
@@ -212,16 +212,6 @@ localtime_rz(ATTRIBUTE_MAYBE_UNUSED timezone_t rz, time_t 
*tp, struct tm *tmp)
   return localtime_r(tp, tmp);
 }
 
-# ifdef TYPECHECK
-#  undef mktime_z
-#  define mktime_z zdump_mktime_z
-static time_t
-mktime_z(timezone_t tz, struct tm *tmp)
-{
-  return mktime(tmp);
-}
-# endif
-
 # undef tzalloc
 # undef tzfree
 # define tzalloc zdump_tzalloc
@@ -330,42 +320,6 @@ my_gmtime_r(time_t *tp, struct tm *tmp)
   return USE_LOCALTIME_RZ ? localtime_rz(gmtz, tp, tmp) : gmtime_r(tp, tmp);
 }
 
-#ifndef TYPECHECK
-# define my_localtime_rz localtime_rz
-#else /* !defined TYPECHECK */
-
-static struct tm *
-my_localtime_rz(timezone_t tz, time_t *tp, struct tm *tmp)
-{
-       tmp = localtime_rz(tz, tp, tmp);
-       if (tmp) {
-               struct tm       tm;
-               register time_t t;
-
-               tm = *tmp;
-               t = mktime_z(tz, &tm);
-               if (t != *tp) {
-                       fflush(stdout);
-                       fprintf(stderr, "\n%s: ", progname);
-                       fprintf(stderr, tformat(), *tp);
-                       fprintf(stderr, " ->");
-                       fprintf(stderr, " year=%d", tmp->tm_year);
-                       fprintf(stderr, " mon=%d", tmp->tm_mon);
-                       fprintf(stderr, " mday=%d", tmp->tm_mday);
-                       fprintf(stderr, " hour=%d", tmp->tm_hour);
-                       fprintf(stderr, " min=%d", tmp->tm_min);
-                       fprintf(stderr, " sec=%d", tmp->tm_sec);
-                       fprintf(stderr, " isdst=%d", tmp->tm_isdst);
-                       fprintf(stderr, " -> ");
-                       fprintf(stderr, tformat(), t);
-                       fprintf(stderr, "\n");
-                       errout = true;
-               }
-       }
-       return tmp;
-}
-#endif /* !defined TYPECHECK */
-
 static void
 abbrok(const char *const abbrp, const char *const zone)
 {
@@ -600,16 +554,16 @@ main(int argc, char *argv[])
                t = absolute_min_time;
                if (! (iflag | Vflag)) {
                        show(tz, argv[i], t, true);
-                       if (my_localtime_rz(tz, &t, &tm) == NULL
+                       if (localtime_rz(tz, &t, &tm) == NULL
                            && t < cutlotime) {
                                time_t newt = cutlotime;
-                               if (my_localtime_rz(tz, &newt, &newtm) != NULL)
+                               if (localtime_rz(tz, &newt, &newtm) != NULL)
                                  showextrema(tz, argv[i], t, NULL, newt);
                        }
                }
                if (t + 1 < cutlotime)
                  t = cutlotime - 1;
-               tm_ok = my_localtime_rz(tz, &t, &tm) != NULL;
+               tm_ok = localtime_rz(tz, &t, &tm) != NULL;
                if (tm_ok) {
                  ab = saveabbr(&abbrev, &abbrevsize, &tm);
                  if (iflag) {
@@ -651,9 +605,9 @@ main(int argc, char *argv[])
                        time_t newt = absolute_max_time;
                        t = cuthitime;
                        if (t < newt) {
-                         struct tm *tmp = my_localtime_rz(tz, &t, &tm);
+                         struct tm *tmp = localtime_rz(tz, &t, &tm);
                          if (tmp != NULL
-                             && my_localtime_rz(tz, &newt, &newtm) == NULL)
+                             && localtime_rz(tz, &newt, &newtm) == NULL)
                            showextrema(tz, argv[i], t, tmp, newt);
                        }
                        show(tz, argv[i], absolute_max_time, true);
@@ -728,7 +682,7 @@ hunt(timezone_t tz, time_t lot, time_t hit, bool only_ok)
           caller already did that.  On platforms without TM_ZONE,
           tzname may have been altered since our caller broke down
           LOT, and tzname needs to be changed back.  */
-       bool lotm_ok = my_localtime_rz(tz, &lot, &lotm) != NULL;
+       bool lotm_ok = localtime_rz(tz, &lot, &lotm) != NULL;
        bool tm_ok;
        char const *ab = lotm_ok ? saveabbr(&loab, &loabsize, &lotm) : NULL;
 
@@ -739,7 +693,7 @@ hunt(timezone_t tz, time_t lot, time_t hit, bool only_ok)
                time_t t = (rem_sum == 2) - (rem_sum < 0) + lot / 2 + hit / 2;
                if (t == lot)
                        break;
-               tm_ok = my_localtime_rz(tz, &t, &tm) != NULL;
+               tm_ok = localtime_rz(tz, &t, &tm) != NULL;
                if (lotm_ok == tm_ok
                    && (only_ok
                        || (ab && tm.tm_isdst == lotm.tm_isdst
@@ -847,7 +801,7 @@ show(timezone_t tz, char *zone, time_t t, bool v)
                }
                printf(" = ");
        }
-       tmp = my_localtime_rz(tz, &t, &tm);
+       tmp = localtime_rz(tz, &t, &tm);
        if (tmp == NULL) {
                printf(tformat(), t);
                printf(_(" (localtime failed)"));
@@ -884,7 +838,7 @@ showextrema(timezone_t tz, char *zone, time_t lo, struct tm 
*lotmp, time_t hi)
        : hi + (hi < TIME_T_MAX));
   if (SECSPERDAY < boundary - lo) {
     lo = boundary - SECSPERDAY;
-    lotmp = my_localtime_rz(tz, &lo, &localtm[old]);
+    lotmp = localtime_rz(tz, &lo, &localtm[old]);
   }
   if (lotmp)
     localtm[old] = *lotmp;
@@ -899,7 +853,7 @@ showextrema(timezone_t tz, char *zone, time_t lo, struct tm 
*lotmp, time_t hi)
      worth the trouble.  */
   for (t = lo + 1; t < hi; t++) {
     bool new = !old;
-    if (! my_localtime_rz(tz, &t, &localtm[new]))
+    if (! localtime_rz(tz, &t, &localtm[new]))
       localtm[new].tm_sec = -1;
     if (! my_gmtime_r(&t, &gmtm[new]))
       gmtm[new].tm_sec = -1;
-- 
2.54.0

Reply via email to