]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
isc_stdtime_t is always 32-bit now, so remove the always true macro STDTIME_ON_32BITS
authorOndřej Surý <ondrej@sury.org>
Thu, 8 Nov 2018 18:05:51 +0000 (01:05 +0700)
committerOndřej Surý <ondrej@sury.org>
Thu, 8 Nov 2018 19:27:06 +0000 (02:27 +0700)
lib/dns/masterdump.c
lib/dns/zone.c
lib/isc/unix/include/isc/stdtime.h
lib/isc/win32/include/isc/stdtime.h

index df779c6a432d7837ac1ce8c5313bca269acd8777..e870d58703bdf8e4afd6df26dce1ea87b533d423 100644 (file)
@@ -1591,24 +1591,7 @@ writeheader(dns_dumpctx_t *dctx) {
                r.base = (unsigned char *)&rawheader;
                r.length = sizeof(rawheader);
                isc_buffer_region(&buffer, &r);
-#if !defined(STDTIME_ON_32BITS) || (STDTIME_ON_32BITS + 0) != 1
-               /*
-                * We assume isc_stdtime_t is a 32-bit integer,
-                * which should be the case on most platforms.
-                * If it turns out to be uncommon, we'll need
-                * to bump the version number and revise the
-                * header format.
-                */
-               isc_log_write(dns_lctx,
-                             ISC_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTERDUMP,
-                             ISC_LOG_INFO,
-                             "dumping master file in raw "
-                             "format: stdtime is not 32bits");
-               now32 = 0;
-#else
                now32 = dctx->now;
-#endif
                rawversion = 1;
                if ((dctx->header.flags & DNS_MASTERRAW_COMPAT) != 0)
                        rawversion = 0;
index 3f27bfd97a4775bfad903f29263d4ee20e0e5373..dbea5994e6ce505a918307f024300300e2572ca0 100644 (file)
@@ -6346,17 +6346,14 @@ del_sigs(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
        if (result == ISC_R_NOMORE)
                result = ISC_R_SUCCESS;
        if (timewarn > 0) {
-#if defined(STDTIME_ON_32BITS)
                isc_stdtime_t stdwarn = (isc_stdtime_t)timewarn;
-               if (timewarn == stdwarn)
-#endif
+               if (timewarn == stdwarn) {
                        set_key_expiry_warning(zone, (isc_stdtime_t)timewarn,
                                               now);
-#if defined(STDTIME_ON_32BITS)
-               else
+               } else {
                        dns_zone_log(zone, ISC_LOG_ERROR,
                                     "key expiry warning time out of range");
-#endif
+               }
        }
  failure:
        if (node != NULL)
index 1a3da825c54fd338aa5063799067b533e1249b6e..cffe39a1a8df39e33ec3b7313eee7106f442a422 100644 (file)
  */
 typedef uint32_t isc_stdtime_t;
 
-/* but this flag helps... */
-#define STDTIME_ON_32BITS      1
-
-/*
- * isc_stdtime32_t is a 32-bit version of isc_stdtime_t.  A variable of this
- * type should only be used as an opaque integer (e.g.,) to compare two
- * time values.
- */
-typedef uint32_t isc_stdtime32_t;
-
 ISC_LANG_BEGINDECLS
 /* */
 void
index e11647f3c7ea2520894562c5d887a53d9520b7a5..9ad2e99de9c3b191625f13cd1dbd16f19f8fc254 100644 (file)
  */
 typedef uint32_t isc_stdtime_t;
 
-/* but this flag helps... */
-#define STDTIME_ON_32BITS      1
-
-/*
- * isc_stdtime32_t is a 32-bit version of isc_stdtime_t.  A variable of this
- * type should only be used as an opaque integer (e.g.,) to compare two
- * time values.
- */
-typedef uint32_t isc_stdtime32_t;
-
 ISC_LANG_BEGINDECLS
 
 void