]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Cleanup the last Windows / MSC ifdefs and comments
authorOndřej Surý <ondrej@isc.org>
Thu, 30 Mar 2023 15:35:00 +0000 (17:35 +0200)
committerOndřej Surý <ondrej@isc.org>
Mon, 3 Apr 2023 09:06:20 +0000 (09:06 +0000)
Cleanup the remnants of MS Compiler bits from <isc/refcount.h>, printing
the information in named/main.c, and cleanup some comments about Windows
that no longer apply.

The bits in picohttpparser.{h,c} were left out, because it's not our
code.

bin/named/main.c
bin/tests/system/runtime/tests.sh
bin/tests/system/shutdown/tests_shutdown.py
doc/dnssec-guide/validation.rst
fuzz/dns_message_checksig.c
lib/dns/include/dns/name.h
lib/dns/zone.c
lib/isc/include/isc/backtrace.h
lib/isc/include/isc/refcount.h
lib/isc/netmgr/socket.c

index 7f8fbd76c8059cf900a942180574596793c49853..6d73b338bc439eb925940492a31369461db6f46a 100644 (file)
@@ -571,9 +571,6 @@ printversion(bool verbose) {
 #endif /* ifdef __GNUC__ */
 #endif /* if defined(__ICC) || defined(__INTEL_COMPILER) */
 #endif /* ifdef __clang__ */
-#ifdef _MSC_VER
-       printf("compiled by MSVC %d\n", _MSC_VER);
-#endif /* ifdef _MSC_VER */
 #ifdef __SUNPRO_C
        printf("compiled by Solaris Studio %x\n", __SUNPRO_C);
 #endif /* ifdef __SUNPRO_C */
@@ -1139,11 +1136,6 @@ setup(void) {
 #endif /* ifdef __GNUC__ */
 #endif /* if defined(__ICC) || defined(__INTEL_COMPILER) */
 #endif /* ifdef __clang__ */
-#ifdef _MSC_VER
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "compiled by MSVC %d", _MSC_VER);
-#endif /* ifdef _MSC_VER */
 #ifdef __SUNPRO_C
        isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
                      NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
index ac29ee38699714ab079495c2e6922101ee37f2b0..0920b56342b69cb3d099f5c16a3b94aeff921cab 100644 (file)
@@ -245,7 +245,7 @@ if [ "$(id -u)" -eq 0 ]; then
     if [ $ret -ne 0 ]; then echo_i "failed"; fi
     status=$((status+ret))
 else
-    echo_i "skipped, not running as root or running on Windows"
+    echo_i "skipped, not running as root"
 fi
 
 echo_i "exit status: $status"
index 46c2d509b183fd08842fa435b1c470c2f1317d44..bcda274cd3a1ff89c3e469ec0a902c09e5a568f4 100755 (executable)
@@ -40,7 +40,7 @@ def do_work(named_proc, resolver, rndc_cmd, kill_method, n_workers, n_queries):
     if kill_method=="rndc" named will be asked to shutdown by
     means of rndc stop.
     if kill_method=="sigterm" named will be killed by SIGTERM on
-    POSIX systems or by TerminateProcess() on Windows systems.
+    POSIX systems.
 
     :param named_proc: named process instance
     :type named_proc: subprocess.Popen
index 93021e5cc8aa0d62ad468a476ecc882ba406b9ae..a499587983386e554f8c1fd0868b799a15b81552 100644 (file)
@@ -128,8 +128,7 @@ While :iscman:`nslookup` is popular, partly because it comes pre-installed on
 most systems, it is not DNSSEC-aware. :iscman:`dig`, on the other hand, fully
 supports the DNSSEC standard and comes as a part of BIND. If you do not
 have :iscman:`dig` already installed on your system, install it by downloading
-it from ISC's `website <https://www.isc.org/download>`__. ISC provides pre-compiled
-Windows versions on its website.
+it from ISC's `website <https://www.isc.org/download>`__.
 
 :iscman:`dig` is a flexible tool for interrogating DNS name servers. It
 performs DNS lookups and displays the answers that are returned from the
index b21665c4bf834266b0e7a2f657ee0d6ffbcfae9b..6679df60bd3ccafba9feebc4abe777e78a410e87 100644 (file)
@@ -160,9 +160,8 @@ cleanup(void) {
                /*
                 * Restore working directory if possible before cleaning
                 * up the key directory.  This will help with any other
-                * cleanup routines and if this code is ever run under
-                * Windows as the directory should not be in use when
-                * rmdir() is called.
+                * cleanup routines as the directory should not be in use
+                * when rmdir() is called.
                 */
                if (pwd != NULL && chdir(pwd) != 0) {
                        fprintf(stderr, "can't restore working directory: %s\n",
index e079a59a1e1dbf82cf1afc1d3cfe8470037ee54f..f525c4349586737bdc430659b83e570e8913201e 100644 (file)
@@ -1192,10 +1192,8 @@ dns_name_settotextfilter(dns_name_totextfilter_t *proc);
  * Set / clear a thread specific function 'proc' to be called at the
  * end of dns_name_totext().
  *
- * Note: Under Windows you need to call "dns_name_settotextfilter(NULL);"
- * prior to exiting the thread otherwise memory will be leaked.
- * For other platforms, which are pthreads based, this is still a good
- * idea but not required.
+ * Note: It's a good practice to call "dns_name_settotextfilter(NULL);"
+ * prior to exiting the thread.
  *
  * Returns
  *\li  #ISC_R_SUCCESS
index 5a8ce4f12966996256eddac3b729176b874a7eec..450af4b6793639293b269bdbc904aab647e03e68 100644 (file)
@@ -540,11 +540,6 @@ typedef enum {
                                                      * notify due to the zone
                                                      * just being loaded for
                                                      * the first time. */
-       /*
-        * DO NOT add any new zone flags here until all platforms
-        * support 64-bit enum values. Currently they fail on
-        * Windows.
-        */
        DNS_ZONEFLG___MAX = UINT64_MAX, /* trick to make the ENUM 64-bit wide */
 } dns_zoneflg_t;
 
index c8fa3242b00efd524425562765ce9bb7549734f1..7605b6f967ef2da84990d363fb68488df43f6339 100644 (file)
@@ -79,7 +79,6 @@ isc_backtrace_symbols(void *const *buffer, int size);
  *
  * Notes:
  *
- *\li  On Windows, this is shim implementation using SymFromAddr()
  *\li  On systems with backtrace_symbols(), it's just a thin wrapper
  *\li  Otherwise, it returns NULL
  *\li  See platform NOTES for backtrace_symbols
index 752f3e426f02031db30c4804a53540855a08e4c2..823123307245acfc1c448c01500f6bd9314ffa35 100644 (file)
@@ -48,12 +48,9 @@ typedef atomic_uint_fast32_t isc_refcount_t;
  *  \brief Returns current number of references.
  *  \param[in] ref pointer to reference counter.
  *  \returns current value of reference counter.
- *
- *   Undo implicit promotion to 64 bits in our Windows implementation of
- *   atomic_load_explicit() by casting to uint_fast32_t.
  */
 
-#define isc_refcount_current(target) (uint_fast32_t) atomic_load_acquire(target)
+#define isc_refcount_current(target) atomic_load_acquire(target)
 
 /** \def isc_refcount_destroy(ref)
  *  \brief a destructor that makes sure that all references were cleared.
@@ -68,15 +65,6 @@ typedef atomic_uint_fast32_t isc_refcount_t;
  *  \param[in] ref pointer to reference counter.
  *  \returns previous value of reference counter.
  */
-#if _MSC_VER
-static inline uint_fast32_t
-isc_refcount_increment0(isc_refcount_t *target) {
-       uint_fast32_t __v;
-       __v = (uint_fast32_t)atomic_fetch_add_relaxed(target, 1);
-       INSIST(__v < UINT32_MAX);
-       return (__v);
-}
-#else /* _MSC_VER */
 #define isc_refcount_increment0(target)                    \
        ({                                                 \
                uint_fast32_t __v;                         \
@@ -84,22 +72,12 @@ isc_refcount_increment0(isc_refcount_t *target) {
                INSIST(__v < UINT32_MAX);                  \
                __v;                                       \
        })
-#endif /* _MSC_VER */
 
 /** \def isc_refcount_increment(ref)
  *  \brief increases reference counter by 1.
  *  \param[in] ref pointer to reference counter.
  *  \returns previous value of reference counter.
  */
-#if _MSC_VER
-static inline uint_fast32_t
-isc_refcount_increment(isc_refcount_t *target) {
-       uint_fast32_t __v;
-       __v = (uint_fast32_t)atomic_fetch_add_relaxed(target, 1);
-       INSIST(__v > 0 && __v < UINT32_MAX);
-       return (__v);
-}
-#else /* _MSC_VER */
 #define isc_refcount_increment(target)                     \
        ({                                                 \
                uint_fast32_t __v;                         \
@@ -107,22 +85,12 @@ isc_refcount_increment(isc_refcount_t *target) {
                INSIST(__v > 0 && __v < UINT32_MAX);       \
                __v;                                       \
        })
-#endif /* _MSC_VER */
 
 /** \def isc_refcount_decrement(ref)
  *  \brief decreases reference counter by 1.
  *  \param[in] ref pointer to reference counter.
  *  \returns previous value of reference counter.
  */
-#if _MSC_VER
-static inline uint_fast32_t
-isc_refcount_decrement(isc_refcount_t *target) {
-       uint_fast32_t __v;
-       __v = (uint_fast32_t)atomic_fetch_sub_acq_rel(target, 1);
-       INSIST(__v > 0);
-       return (__v);
-}
-#else /* _MSC_VER */
 #define isc_refcount_decrement(target)                     \
        ({                                                 \
                uint_fast32_t __v;                         \
@@ -130,7 +98,6 @@ isc_refcount_decrement(isc_refcount_t *target) {
                INSIST(__v > 0);                           \
                __v;                                       \
        })
-#endif /* _MSC_VER */
 
 #define isc_refcount_decrementz(target)                               \
        do {                                                          \
index fc9b3ce880ac626404cabb40873c994d73602a95..2b1e0e652e1a956ecc14e3b94ddafc74f467505c 100644 (file)
@@ -170,9 +170,6 @@ isc__nm_socket_reuse(uv_os_sock_t fd) {
         * On Linux, SO_REUSEPORT has different semantics: it _shares_ the port
         * rather than steal it from the current listener, so we don't use it
         * here, but rather in isc__nm_socket_reuse_lb().
-        *
-        * On Windows, it also allows a socket to forcibly bind to a port in use
-        * by another socket.
         */
 
 #if defined(SO_REUSEPORT) && !defined(__linux__)