Source-Changes-HG archive

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

[src/trunk]: src/external/mpl/bind/dist/lib/dns Pointless to force use of 64 ...



details:   https://anonhg.NetBSD.org/src/rev/3b1600824740
branches:  trunk
changeset: 972399:3b1600824740
user:      christos <christos%NetBSD.org@localhost>
date:      Mon May 25 15:14:04 2020 +0000

description:
Pointless to force use of 64 bit atomics on flags fields that fit in 32 bits.

diffstat:

 external/mpl/bind/dist/lib/dns/include/dns/zone.h |   6 +++++-
 external/mpl/bind/dist/lib/dns/zone.c             |  13 ++++++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)

diffs (74 lines):

diff -r 3680792af13f -r 3b1600824740 external/mpl/bind/dist/lib/dns/include/dns/zone.h
--- a/external/mpl/bind/dist/lib/dns/include/dns/zone.h Mon May 25 15:13:25 2020 +0000
+++ b/external/mpl/bind/dist/lib/dns/include/dns/zone.h Mon May 25 15:14:04 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zone.h,v 1.5 2020/05/24 19:46:23 christos Exp $        */
+/*     $NetBSD: zone.h,v 1.6 2020/05/25 15:14:04 christos Exp $        */
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -89,7 +89,9 @@
        DNS_ZONEOPT_CHECKSPF = 1 << 27,         /*%< check SPF records */
        DNS_ZONEOPT_CHECKTTL = 1 << 28,         /*%< check max-zone-ttl */
        DNS_ZONEOPT_AUTOEMPTY = 1 << 29,        /*%< automatic empty zone */
+#ifndef __NetBSD__
        DNS_ZONEOPT___MAX = UINT64_MAX, /* trick to make the ENUM 64-bit wide */
+#endif
 } dns_zoneopt_t;
 
 /*
@@ -101,7 +103,9 @@
        DNS_ZONEKEY_CREATE = 0x00000004U,   /*%< make keys when needed */
        DNS_ZONEKEY_FULLSIGN = 0x00000008U, /*%< roll to new keys immediately */
        DNS_ZONEKEY_NORESIGN = 0x00000010U, /*%< no automatic resigning */
+#ifndef __NetBSD__
        DNS_ZONEKEY___MAX = UINT64_MAX, /* trick to make the ENUM 64-bit wide */
+#endif
 } dns_zonekey_t;
 
 #ifndef DNS_ZONE_MINREFRESH
diff -r 3680792af13f -r 3b1600824740 external/mpl/bind/dist/lib/dns/zone.c
--- a/external/mpl/bind/dist/lib/dns/zone.c     Mon May 25 15:13:25 2020 +0000
+++ b/external/mpl/bind/dist/lib/dns/zone.c     Mon May 25 15:14:04 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zone.c,v 1.9 2020/05/24 19:46:23 christos Exp $        */
+/*     $NetBSD: zone.c,v 1.10 2020/05/25 15:14:04 christos Exp $       */
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -226,8 +226,13 @@
        int32_t journalsize;
        dns_rdataclass_t rdclass;
        dns_zonetype_t type;
+#ifdef __NetBSD__
+       atomic_uint_fast32_t flags;
+       atomic_uint_fast32_t options;
+#else
        atomic_uint_fast64_t flags;
        atomic_uint_fast64_t options;
+#endif
        unsigned int db_argc;
        char **db_argv;
        isc_time_t expiretime;
@@ -372,7 +377,11 @@
        /*%
         * Autosigning/key-maintenance options
         */
+#ifdef __NetBSD__
+       atomic_uint_fast32_t keyopts;
+#else
        atomic_uint_fast64_t keyopts;
+#endif
 
        /*%
         * True if added by "rndc addzone"
@@ -501,7 +510,9 @@
                                                      * notify due to the zone
                                                      * just being loaded for
                                                      * the first time.  */
+#ifndef __NetBSD__
        DNS_ZONEFLG___MAX = UINT64_MAX, /* trick to make the ENUM 64-bit wide */
+#endif
 } dns_zoneflg_t;
 
 #define DNS_ZONE_OPTION(z, o)   ((atomic_load_relaxed(&(z)->options) & (o)) != 0)



Home | Main Index | Thread Index | Old Index