mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-13 17:40:00 -04:00
isc_stdtime_t is always 32-bit now, so remove the always true macro STDTIME_ON_32BITS
(cherry picked from commit 6f5fe11f5a)
This commit is contained in:
parent
ecc40b18e6
commit
ba263b5b7e
5 changed files with 7 additions and 47 deletions
|
|
@ -255,7 +255,7 @@ struct dns_acacheentry {
|
|||
#ifdef ACACHE_HAVESTDATOMIC
|
||||
atomic_uint_fast32_t lastused;
|
||||
#else
|
||||
isc_stdtime32_t lastused;
|
||||
isc_stdtime_t lastused;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
@ -776,7 +776,7 @@ acache_cleaning_timer_action(isc_task_t *task, isc_event_t *event) {
|
|||
/* The caller must hold entry lock. */
|
||||
static inline bool
|
||||
entry_stale(acache_cleaner_t *cleaner, dns_acacheentry_t *entry,
|
||||
isc_stdtime32_t now32, unsigned int interval)
|
||||
isc_stdtime_t now32, unsigned int interval)
|
||||
{
|
||||
/*
|
||||
* If the callback has been canceled, we definitely do not need the
|
||||
|
|
@ -825,7 +825,7 @@ acache_incremental_cleaning_action(isc_task_t *task, isc_event_t *event) {
|
|||
dns_acache_t *acache = cleaner->acache;
|
||||
dns_acacheentry_t *entry, *next = NULL;
|
||||
int n_entries;
|
||||
isc_stdtime32_t now32, last32;
|
||||
isc_stdtime_t now32, last32;
|
||||
isc_stdtime_t now;
|
||||
unsigned int interval;
|
||||
|
||||
|
|
@ -1470,7 +1470,7 @@ dns_acache_getentry(dns_acacheentry_t *entry, dns_zone_t **zonep,
|
|||
{
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
dns_rdataset_t *erdataset;
|
||||
isc_stdtime32_t now32;
|
||||
isc_stdtime_t now32;
|
||||
dns_acache_t *acache;
|
||||
int locknum;
|
||||
|
||||
|
|
|
|||
|
|
@ -1575,24 +1575,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;
|
||||
|
|
|
|||
|
|
@ -6376,17 +6376,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)
|
||||
|
|
|
|||
|
|
@ -25,16 +25,6 @@
|
|||
*/
|
||||
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
|
||||
|
|
|
|||
|
|
@ -23,16 +23,6 @@
|
|||
*/
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue