]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove legacy support for AIX
authorOndřej Surý <ondrej@sury.org>
Tue, 21 Aug 2018 08:45:29 +0000 (10:45 +0200)
committerOndřej Surý <ondrej@sury.org>
Tue, 28 Aug 2018 08:31:47 +0000 (10:31 +0200)
22 files changed:
README.md
bin/dnssec/dnssec-cds.c
bin/dnssec/dnssec-dsfromkey.c
bin/dnssec/dnssec-importkey.c
bin/dnssec/dnssec-signzone.c
bin/dnssec/dnssectool.c
bin/named/main.c
config.threads.in
configure
configure.in
contrib/dlz/drivers/dlz_filesystem_driver.c
doc/dev/tests
doc/misc/ipv6
lib/dns/dnssec.c
lib/dns/dst_api.c
lib/dns/dst_parse.c
lib/isc/log.c
lib/isc/powerpc/include/isc/atomic.h
lib/isc/unix/include/isc/dir.h
lib/isc/unix/socket.c
lib/isc/win32/include/isc/dir.h
lib/isccfg/parser.c

index e06941f40d6b33b1926752ac127d4e4945375a53..0d9bf0f1d85fcdd969d024e3699baaf8dbbd567b 100644 (file)
--- a/README.md
+++ b/README.md
@@ -147,7 +147,7 @@ Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
 basic POSIX support, and a 64-bit integer type. Successful builds have been
 observed on many versions of Linux and UNIX, including RedHat, Fedora,
 Debian, Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X,
-Solaris, HP-UX, AIX, SCO OpenServer, and OpenWRT.
+Solaris, HP-UX, and OpenWRT.
 
 BIND requires a cryptography provider library such as OpenSSL or a
 hardware service module supporting PKCS#11. On Linux, BIND requires
index 7c8577a45acf4d23b9a75975b365ac43cf251ac4..b1449b6933ba39c96d41a42162aa7be3b430c234 100644 (file)
@@ -62,7 +62,7 @@
 #include "dnssectool.h"
 
 #ifndef PATH_MAX
-#define PATH_MAX 1024   /* AIX, WIN32, and others don't define this. */
+#define PATH_MAX 1024   /* WIN32, and others don't define this. */
 #endif
 
 const char *program = "dnssec-cds";
index af7f3b11a8b045d8ddf75f9104f2b9a1828f357e..49e04f7af01b519d2b70adf42d75d1e74c9b5843 100644 (file)
@@ -50,7 +50,7 @@
 #include "dnssectool.h"
 
 #ifndef PATH_MAX
-#define PATH_MAX 1024   /* AIX, WIN32, and others don't define this. */
+#define PATH_MAX 1024   /* WIN32, and others don't define this. */
 #endif
 
 const char *program = "dnssec-dsfromkey";
index add4289d3133d671557e89a58e0aa39227fcebe3..067aeb81b4667be4e3ad64ece9d8aa3596a2321c 100644 (file)
@@ -49,7 +49,7 @@
 #include "dnssectool.h"
 
 #ifndef PATH_MAX
-#define PATH_MAX 1024   /* AIX, WIN32, and others don't define this. */
+#define PATH_MAX 1024   /* WIN32, and others don't define this. */
 #endif
 
 const char *program = "dnssec-importkey";
index 8e93fa87b59b93adae0e713ce558ba78be51fa94..45dc753c1c8a44c10c1639a7f9642a3430950ebd 100644 (file)
@@ -89,7 +89,7 @@
 #include "dnssectool.h"
 
 #ifndef PATH_MAX
-#define PATH_MAX 1024   /* AIX, WIN32, and others don't define this. */
+#define PATH_MAX 1024   /* WIN32, and others don't define this. */
 #endif
 
 const char *program = "dnssec-signzone";
index 42cd1da2e797a71b4c8893c68d6b67aeb066d010..41da5eb71d7164e1410d9fcc5b83cb83599857f9 100644 (file)
@@ -410,7 +410,7 @@ key_collision(dst_key_t *dstkey, dns_name_t *name, const char *dir,
        uint16_t id, oldid;
        uint32_t rid, roldid;
        dns_secalg_t alg;
-       char filename[ISC_DIR_NAMEMAX];
+       char filename[NAME_MAX];
        isc_buffer_t fileb;
        isc_stdtime_t now;
 
index e193a50e42aa9dffbb11187fc04e252848b8a77d..4cb4846310c7c4c5cba60c7cde1b097f5ededd4c 100644 (file)
@@ -110,8 +110,8 @@ LIBDNS_EXTERNAL_DATA extern unsigned int dns_zone_mkey_day;
 LIBDNS_EXTERNAL_DATA extern unsigned int dns_zone_mkey_month;
 
 static bool    want_stats = false;
-static char            program_name[ISC_DIR_NAMEMAX] = "named";
-static char            absolute_conffile[ISC_DIR_PATHMAX];
+static char            program_name[NAME_MAX] = "named";
+static char            absolute_conffile[PATH_MAX];
 static char            saved_command_line[512];
 static char            version[512];
 static unsigned int    maxsocks = 0;
index a9bcd2023f7c6d2f58fb0ef1f4bbe9c6b9231955..2c007ecaf675cb4e6d6b24b574b27d63c5b81d6f 100644 (file)
@@ -19,8 +19,6 @@ case $host in
        use_threads=false ;;
 *-solaris*)
        use_threads=true ;;
-*-ibm-aix*)
-       use_threads=true ;;
 *-hp-hpux10*)
        use_threads=false ;;
 *-hp-hpux11*)
@@ -51,7 +49,7 @@ case $host in
 *-freebsd*)
        use_threads=true ;;
 *-linux*)
-       use_threads=true ;;     
+       use_threads=true ;;
 *-darwin[[123456789]].*)
        use_threads=false ;;
 *-darwin*.*)
@@ -81,7 +79,7 @@ if $use_threads
 then
        AC_MSG_RESULT(yes)
 else
-       AC_MSG_RESULT(no)       
+       AC_MSG_RESULT(no)
 fi
 
 if $use_threads
@@ -94,7 +92,7 @@ then
                        # We don't want to set -lpthread as that break
                        # the ability to choose threads library at final
                        # link time and is not valid for all architectures.
-                       
+
                        PTHREAD=
                        if test "X$GCC" = "Xyes"; then
                                saved_cc="$CC"
index 27f4eb5c141c180fc2d4b88af1f8e8e5de1c6de4..b3241709a8d680eb4e65085aa7d5f6b073cab047 100755 (executable)
--- a/configure
+++ b/configure
@@ -760,7 +760,6 @@ ISC_PLATFORM_NEEDIN6ADDRANY
 ISC_PLATFORM_HAVEINADDR6
 ISC_PLATFORM_HAVEIPV6
 BIND9_CO_RULE
-LIBTOOL_IN_MAIN
 LIBTOOL_ALLOW_UNDEFINED
 LIBTOOL_MODE_UNINSTALL
 LIBTOOL_MODE_LINK
@@ -15808,10 +15807,6 @@ $as_echo "yes" >&6; }
                case "$host" in
                *) LIBTOOL_ALLOW_UNDEFINED= ;;
                esac
-               case "$host" in
-               *-ibm-aix*) LIBTOOL_IN_MAIN="-Wl,-bI:T_testlist.imp" ;;
-               *) LIBTOOL_IN_MAIN= ;;
-               esac;
                ;;
        *)
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -15826,7 +15821,6 @@ $as_echo "no" >&6; }
                LIBTOOL_MODE_LINK=
                LIBTOOL_MODE_UNINSTALL=
                LIBTOOL_ALLOW_UNDEFINED=
-               LIBTOOL_IN_MAIN=
                INSTALL_LIBRARY='${INSTALL_DATA}'
                ;;
 esac
@@ -17910,7 +17904,6 @@ SA=a
 
 
 
-
 BIND9_CO_RULE=".c.$O:"
 
 
@@ -19339,9 +19332,6 @@ IRS_PLATFORM_USEDECLSPEC="#undef IRS_PLATFORM_USEDECLSPEC"
 ISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT"
 
 case "$host" in
-       *-aix5.[123].*)
-               hack_shutup_pthreadonceinit=yes
-               ;;
        *-solaris2.[89])
                hack_shutup_pthreadonceinit=yes
                ;;
 
 case "$enable_atomic" in
        yes|''|autodetect)
-               case "$host" in
-               powerpc-ibm-aix*)
-                       if test "X$GCC" = "Xyes"; then
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if asm(\"ics\"); works" >&5
-$as_echo_n "checking if asm(\"ics\"); works... " >&6; }
-                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-                               main() { asm("ics"); exit(0); }
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                                use_atomic=yes
-else
-
-                               saved_cflags="$CFLAGS"
-                               CFLAGS="$CFLAGS -Wa,-many"
-                               if test "$cross_compiling" = yes; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross compile, assume yes" >&5
-$as_echo "cross compile, assume yes" >&6; }
-                                CFLAGS="$saved_cflags"
-                                use_atomic=yes
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                               main() { asm("ics"); exit(0); }
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, required -Wa,-many" >&5
-$as_echo "yes, required -Wa,-many" >&6; }
-                                use_atomic=yes
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, use_atomic disabled" >&5
-$as_echo "no, use_atomic disabled" >&6; }
-                                CFLAGS="$saved_cflags"
-                                use_atomic=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-                       else
-                               use_atomic=yes
-                       fi
-                       ;;
-               *)
-                       use_atomic=yes
-                       ;;
-               esac
+               use_atomic=yes
                ;;
        no)
                have_stdatomic=no
@@ -19776,9 +19703,6 @@ if ac_fn_c_try_compile "$LINENO"; then :
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
                ;;
-               powerpc-ibm-aix*)
-                       compiler=aix
-               ;;
                esac
        fi
        case "$compiler" in
@@ -19788,8 +19712,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
        osf)
                ISC_PLATFORM_USEOSFASM="#define ISC_PLATFORM_USEOSFASM 1"
                ;;
-       aix)
-               ;;
        mac)
                ;;
        *)
index 6e5e4cd07f702ce936d2dbd92bbc23e5e4409401..f3e1f521de0be4dd51cfaedc8977d06d7baed2c5 100644 (file)
@@ -956,10 +956,6 @@ case $use_libtool in
                case "$host" in
                *) LIBTOOL_ALLOW_UNDEFINED= ;;
                esac
-               case "$host" in
-               *-ibm-aix*) LIBTOOL_IN_MAIN="-Wl,-bI:T_testlist.imp" ;;
-               *) LIBTOOL_IN_MAIN= ;;
-               esac;
                ;;
        *)
                AC_MSG_RESULT(no)
@@ -973,7 +969,6 @@ case $use_libtool in
                LIBTOOL_MODE_LINK=
                LIBTOOL_MODE_UNINSTALL=
                LIBTOOL_ALLOW_UNDEFINED=
-               LIBTOOL_IN_MAIN=
                INSTALL_LIBRARY='${INSTALL_DATA}'
                ;;
 esac
@@ -1998,7 +1993,6 @@ AC_SUBST(LIBTOOL_MODE_INSTALL)
 AC_SUBST(LIBTOOL_MODE_LINK)
 AC_SUBST(LIBTOOL_MODE_UNINSTALL)
 AC_SUBST(LIBTOOL_ALLOW_UNDEFINED)
-AC_SUBST(LIBTOOL_IN_MAIN)
 
 BIND9_CO_RULE=".c.$O:"
 AC_SUBST(BIND9_CO_RULE)
@@ -2726,9 +2720,6 @@ AC_SUBST(ISC_PLATFORM_BRACEPTHREADONCEINIT)
 ISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT"
 
 case "$host" in
-       *-aix5.[[123]].*)
-               hack_shutup_pthreadonceinit=yes
-               ;;
        [*-solaris2.[89]])
                hack_shutup_pthreadonceinit=yes
                ;;
@@ -2808,39 +2799,7 @@ AC_ARG_ENABLE(atomic,
                        enable_atomic="autodetect")
 case "$enable_atomic" in
        yes|''|autodetect)
-               case "$host" in
-               powerpc-ibm-aix*)
-                       if test "X$GCC" = "Xyes"; then
-                               AC_MSG_CHECKING([if asm("ics"); works])
-                               AC_TRY_COMPILE(,[
-                               main() { asm("ics"); exit(0); }
-                               ],
-                               [AC_MSG_RESULT(yes)
-                                use_atomic=yes],
-                               [
-                               saved_cflags="$CFLAGS"
-                               CFLAGS="$CFLAGS -Wa,-many"
-                               AC_TRY_RUN([
-                               main() { asm("ics"); exit(0); }
-                               ],
-                               [AC_MSG_RESULT([yes, required -Wa,-many])
-                                use_atomic=yes],
-                               [AC_MSG_RESULT([no, use_atomic disabled])
-                                CFLAGS="$saved_cflags"
-                                use_atomic=no],
-                               [AC_MSG_RESULT([cross compile, assume yes])
-                                CFLAGS="$saved_cflags"
-                                use_atomic=yes])
-                               ]
-                               )
-                       else
-                               use_atomic=yes
-                       fi
-                       ;;
-               *)
-                       use_atomic=yes
-                       ;;
-               esac
+               use_atomic=yes
                ;;
        no)
                have_stdatomic=no
@@ -2951,9 +2910,6 @@ if test "yes" = "$have_atomic"; then
                                return (0);],
                                [compiler=osf],)
                ;;
-               powerpc-ibm-aix*)
-                       compiler=aix
-               ;;
                esac
        fi
        case "$compiler" in
@@ -2963,8 +2919,6 @@ if test "yes" = "$have_atomic"; then
        osf)
                ISC_PLATFORM_USEOSFASM="#define ISC_PLATFORM_USEOSFASM 1"
                ;;
-       aix)
-               ;;
        mac)
                ;;
        *)
index 30da06cc11170a57650e899fbf5d828fbed1483e..0b1c4ab07684c7fafb8c5bbd1d3dd4023d21b79d 100644 (file)
@@ -35,7 +35,7 @@
 
 /*
  * Copyright (C) 1999-2001, 2016  Internet Systems Consortium, Inc. ("ISC")
- * 
+ *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
@@ -84,7 +84,7 @@ typedef struct config_data {
 typedef struct dir_entry dir_entry_t;
 
 struct dir_entry {
-       char dirpath[ISC_DIR_PATHMAX];
+       char dirpath[PATH_MAX];
        ISC_LINK(dir_entry_t)   link;
 };
 
@@ -361,7 +361,7 @@ process_dir(isc_dir_t *dir, void *passback, config_data_t *cd,
            dlist_t *dir_list, unsigned int basedirlen)
 {
 
-       char tmp[ISC_DIR_PATHMAX + ISC_DIR_NAMEMAX];
+       char tmp[PATH_MAX + NAME_MAX];
        int astPos;
        struct stat     sb;
        isc_result_t result = ISC_R_FAILURE;
@@ -369,7 +369,7 @@ process_dir(isc_dir_t *dir, void *passback, config_data_t *cd,
        char *type;
        char *ttlStr;
        char *data;
-       char host[ISC_DIR_NAMEMAX];
+       char host[NAME_MAX];
        char *tmpString;
        char *tmpPtr;
        int ttl;
@@ -408,7 +408,7 @@ process_dir(isc_dir_t *dir, void *passback, config_data_t *cd,
                                        {
                                                if ((strlen(host) +
                                                     strlen(tmpPtr + 1) + 2)
-                                                   > ISC_DIR_NAMEMAX)
+                                                   > NAME_MAX)
                                                        continue;
                                                strcat(host, tmpPtr + 1);
                                                strcat(host, ".");
@@ -416,7 +416,7 @@ process_dir(isc_dir_t *dir, void *passback, config_data_t *cd,
                                        }
                                        if ((strlen(host) +
                                             strlen(tmpString) + 1)
-                                           <= ISC_DIR_NAMEMAX)
+                                           <= NAME_MAX)
                                                strcat(host, tmpString);
                                }
 
@@ -443,7 +443,7 @@ process_dir(isc_dir_t *dir, void *passback, config_data_t *cd,
                                                strncpy(host,
                                                   (char *) &dir->entry.name[6],
                                                   sizeof(host) - 1);
-                                               host[255] = '\0';
+                                               host[NAME_MAX-1] = '\0';
                                        }
                                        foundHost = true;
                                        break;
index 5cccc28a8fbe5cbf93731234f1c16c2f694a3aca..50a1ad10e857a0eee9457a2c137eaecaa6d58dbc 100644 (file)
@@ -17,7 +17,7 @@ The sources are checked out, and the web reports are generated,
 on bb, as driven by the following cron jobs:
 
     # Check out the current bind 9 version and make the source tarball.
-    # Argument to maketar.sh should be v9_0 for 9.0 release branch, 
+    # Argument to maketar.sh should be v9_0 for 9.0 release branch,
     # HEAD for mainline.
     35 2-22 * * * PLATFORM=BSD-3.1 && . $HOME/b9t/hosts/$PLATFORM/env && \
        nice sh $HOME/b9t/bin/maketar.sh HEAD \
@@ -57,7 +57,6 @@ The current test schedule is as follows:
   :00             Most tests begin
   :45             Status report generator runs (was :30)
 
-  aix:            I can't seem to access that machine; it appears to be down.
   bb:             Build starts at top of hour, 0300 to 2200
   durango:        Build starts at top of hour, 0300 to 2200
   trantor:        Build starts at top of hour, 0300 to 2100, odd-numbered hours
index 02cd19a2e10777bbcd75a1fb781e11070d826054..95cf9bb4e30529eb066eaa6c69bff5c42ad117d9 100644 (file)
@@ -17,11 +17,6 @@ socket API to be usable.  The systems which do not follow this will
 currently not get any warnings or errors, but ipv6 will simply not
 function on them.
 
-These systems currently include, but are not limited to:
-
-       AIX 3.4 (with ipv6 patches)
-
-
 RUN-TIME ISSUES
 ---------------
 
@@ -108,4 +103,3 @@ RELEVANT RFCs
 3493:  Basic Socket Interface Extensions for IPv6
 
 3542:  Advanced Sockets Application Program Interface (API) for IPv6
-
index 7a3b59f32d3d6258183c5b889a8d428a86997777..ff7396f3c911c83bc31d09503d3fdc4fb42e7b0a 100644 (file)
@@ -784,7 +784,7 @@ dns_dnssec_findzonekeys(dns_db_t *db, dns_dbversion_t *ver,
                        isc_result_t result2;
                        isc_buffer_t buf;
 
-                       isc_buffer_init(&buf, filename, ISC_DIR_NAMEMAX);
+                       isc_buffer_init(&buf, filename, NAME_MAX);
                        result2 = dst_key_getfilename(dst_key_name(pubkey),
                                                      dst_key_id(pubkey),
                                                      dst_key_alg(pubkey),
@@ -1676,7 +1676,7 @@ dns_dnssec_keylistfromrdataset(const dns_name_t *origin,
                        isc_result_t result2;
                        isc_buffer_t buf;
 
-                       isc_buffer_init(&buf, filename, ISC_DIR_NAMEMAX);
+                       isc_buffer_init(&buf, filename, NAME_MAX);
                        result2 = dst_key_getfilename(dst_key_name(pubkey),
                                                      dst_key_id(pubkey),
                                                      dst_key_alg(pubkey),
index 583be7aee12976d7e801f4eeba4fc4a71258d77e..7207d0cf537c7859d07dec61c80e87aaf1e263d3 100644 (file)
@@ -484,7 +484,7 @@ dst_key_fromfile(dns_name_t *name, dns_keytag_t id,
                 isc_mem_t *mctx, dst_key_t **keyp)
 {
        isc_result_t result;
-       char filename[ISC_DIR_NAMEMAX];
+       char filename[NAME_MAX];
        isc_buffer_t buf;
        dst_key_t *key;
 
@@ -498,7 +498,7 @@ dst_key_fromfile(dns_name_t *name, dns_keytag_t id,
 
        key = NULL;
 
-       isc_buffer_init(&buf, filename, ISC_DIR_NAMEMAX);
+       isc_buffer_init(&buf, filename, NAME_MAX);
        result = dst_key_getfilename(name, id, alg, type, NULL, mctx, &buf);
        if (result != ISC_R_SUCCESS)
                goto out;
@@ -1605,7 +1605,7 @@ write_public_key(const dst_key_t *key, int type, const char *directory) {
        FILE *fp;
        isc_buffer_t keyb, textb, fileb, classb;
        isc_region_t r;
-       char filename[ISC_DIR_NAMEMAX];
+       char filename[NAME_MAX];
        unsigned char key_array[DST_KEY_MAXSIZE];
        char text_array[DST_KEY_MAXTEXTSIZE];
        char class_array[10];
index 25314840a5e37232478ee52cd8bd51ef04446325..105a7df6d02c64d3d639e043b4d0e91eb9692d80 100644 (file)
@@ -624,7 +624,7 @@ dst__privstruct_writefile(const dst_key_t *key, const dst_private_t *priv,
 {
        FILE *fp;
        isc_result_t result;
-       char filename[ISC_DIR_NAMEMAX];
+       char filename[NAME_MAX];
        char buffer[MAXFIELDSIZE * 2];
        isc_fsaccess_t access;
        isc_stdtime_t when;
index 44fff8f8371017aa400ed7330744e515f1e9d2e3..e34ab1b7320d1401c2fbc95acd4f29e7a96b82c2 100644 (file)
@@ -47,7 +47,7 @@
 #define LOG_BUFFER_SIZE        (8 * 1024)
 
 #ifndef PATH_MAX
-#define PATH_MAX 1024  /* AIX and others don't define this. */
+#define PATH_MAX 1024  /* WIN32 and others don't define this. */
 #endif
 
 /*!
index 9899934a75aa1041bc38d36cfe799e23e0012cb0..66913d31b4f7f9e93199a980c9952774bb5cefb2 100644 (file)
  * case.
  */
 
-#if defined(_AIX)
-
-#include <sys/atomic_op.h>
-
-#define isc_atomic_store(p, v) _clear_lock(p, v)
-
-#ifdef __GNUC__
-static inline int32_t
-#else
-static int32_t
-#endif
-isc_atomic_xadd(int32_t *p, int32_t val) {
-       int ret;
-
-#ifdef __GNUC__
-       asm("ics");
-#else
-        __isync();
-#endif
-
-       ret = fetch_and_add((atomic_p)p, (int)val);
-
-#ifdef __GNUC__
-       asm("ics");
-#else
-        __isync();
-#endif
-
-        return (ret);
-}
-
-#ifdef __GNUC__
-static inline int
-#else
-static int
-#endif
-isc_atomic_cmpxchg(atomic_p p, int old, int replacement) {
-       int orig = old;
-
-#ifdef __GNUC__
-       asm("ics");
-#else
-        __isync();
-#endif
-       if (compare_and_swap(p, &orig, replacement))
-               orig = old;
-
-#ifdef __GNUC__
-       asm("ics");
-#else
-        __isync();
-#endif
-
-       return (orig);
-}
-
-#elif defined(ISC_PLATFORM_USEGCCASM) || defined(ISC_PLATFORM_USEMACASM)
+#if defined(ISC_PLATFORM_USEGCCASM) || defined(ISC_PLATFORM_USEMACASM)
 static inline int32_t
 isc_atomic_xadd(int32_t *p, int32_t val) {
        int32_t orig;
index 36d0aad28989d1aeba6aa7fdb926866a1b63bf36..5a147b89f3a37f5cfef3f534b42bf992d395bff5 100644 (file)
 #include <isc/lang.h>
 #include <isc/result.h>
 
-#define ISC_DIR_NAMEMAX 256
-#define ISC_DIR_PATHMAX 1024
+#ifndef NAME_MAX
+#define NAME_MAX 256
+#endif
+
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
 
 /*% Directory Entry */
 typedef struct isc_direntry {
-       /*!
-        * Ideally, this should be NAME_MAX, but AIX does not define it by
-        * default and dynamically allocating the space based on pathconf()
-        * complicates things undesirably, as does adding special conditionals
-        * just for AIX.  So a comfortably sized buffer is chosen instead.
-        */
-       char            name[ISC_DIR_NAMEMAX];
+       char            name[NAME_MAX];
        unsigned int    length;
 } isc_direntry_t;
 
 /*% Directory */
 typedef struct isc_dir {
        unsigned int    magic;
-       /*!
-        * As with isc_direntry_t->name, making this "right" for all systems
-        * is slightly problematic because AIX does not define PATH_MAX.
-        */
-       char            dirname[ISC_DIR_PATHMAX];
+       char            dirname[PATH_MAX];
        isc_direntry_t  entry;
        DIR *           handle;
 } isc_dir_t;
index efb4c13c0cee981c3b10edb83002067f0bf6c3a8..b28b8ef1cc7249f07fbee78bb3d7cde9bac151b8 100644 (file)
@@ -823,39 +823,6 @@ socket_log(isc__socket_t *sock, const isc_sockaddr_t *address,
        }
 }
 
-#if defined(_AIX) && defined(ISC_NET_BSD44MSGHDR) && \
-    defined(USE_CMSG) && defined(IPV6_RECVPKTINFO)
-/*
- * AIX has a kernel bug where IPV6_RECVPKTINFO gets cleared by
- * setting IPV6_V6ONLY.
- */
-static void
-FIX_IPV6_RECVPKTINFO(isc__socket_t *sock)
-{
-       char strbuf[ISC_STRERRORSIZE];
-       int on = 1;
-
-       if (sock->pf != AF_INET6 || sock->type != isc_sockettype_udp)
-               return;
-
-       if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVPKTINFO,
-                      (void *)&on, sizeof(on)) < 0) {
-
-               isc__strerror(errno, strbuf, sizeof(strbuf));
-               UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "setsockopt(%d, IPV6_RECVPKTINFO) "
-                                "%s: %s", sock->fd,
-                                isc_msgcat_get(isc_msgcat,
-                                               ISC_MSGSET_GENERAL,
-                                               ISC_MSG_FAILED,
-                                               "failed"),
-                                strbuf);
-       }
-}
-#else
-#define FIX_IPV6_RECVPKTINFO(sock) (void)0
-#endif
-
 /*%
  * Increment socket-related statistics counters.
  */
@@ -6168,7 +6135,6 @@ isc__socket_ipv6only(isc_socket_t *sock0, bool yes) {
                                         strbuf);
                }
        }
-       FIX_IPV6_RECVPKTINFO(sock);     /* AIX */
 #endif
 }
 
index 7370fa6e180960b02e73e239fe532251662eba83..7ec8e0c1e96c245d592e13275c2e168ffba1e11d 100644 (file)
 #include <isc/lang.h>
 #include <isc/result.h>
 
-#define ISC_DIR_NAMEMAX _MAX_FNAME
-#define ISC_DIR_PATHMAX _MAX_PATH
+#ifndef NAME_MAX
+#define NAME_MAX _MAX_FNAME
+#endif
+
+#ifndef PATH_MAX
+#define PATH_MAX _MAX_PATH
+#endif
 
 typedef struct {
-       char            name[ISC_DIR_NAMEMAX];
+       char            name[NAME_MAX];
        unsigned int    length;
        WIN32_FIND_DATA find_data;
 } isc_direntry_t;
 
 typedef struct {
        unsigned int    magic;
-       char            dirname[ISC_DIR_PATHMAX];
+       char            dirname[PATH_MAX];
        isc_direntry_t  entry;
        bool    entry_filled;
        HANDLE          search_handle;
index af7755c40ad41aeb82608c59f4330dda9be05e9d..dc46bdb8cd436bf74c34ffeb5d738792b2e0028a 100644 (file)
@@ -2965,7 +2965,7 @@ parser_complain(cfg_parser_t *pctx, bool is_warning,
                va_list args)
 {
        char tokenbuf[MAX_LOG_TOKEN + 10];
-       static char where[ISC_DIR_PATHMAX + 100];
+       static char where[PATH_MAX + 100];
        static char message[2048];
        int level = ISC_LOG_ERROR;
        const char *prep = "";