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
#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";
#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";
#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";
#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";
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;
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;
use_threads=false ;;
*-solaris*)
use_threads=true ;;
-*-ibm-aix*)
- use_threads=true ;;
*-hp-hpux10*)
use_threads=false ;;
*-hp-hpux11*)
*-freebsd*)
use_threads=true ;;
*-linux*)
- use_threads=true ;;
+ use_threads=true ;;
*-darwin[[123456789]].*)
use_threads=false ;;
*-darwin*.*)
then
AC_MSG_RESULT(yes)
else
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT(no)
fi
if $use_threads
# 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"
ISC_PLATFORM_HAVEINADDR6
ISC_PLATFORM_HAVEIPV6
BIND9_CO_RULE
-LIBTOOL_IN_MAIN
LIBTOOL_ALLOW_UNDEFINED
LIBTOOL_MODE_UNINSTALL
LIBTOOL_MODE_LINK
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
LIBTOOL_MODE_LINK=
LIBTOOL_MODE_UNINSTALL=
LIBTOOL_ALLOW_UNDEFINED=
- LIBTOOL_IN_MAIN=
INSTALL_LIBRARY='${INSTALL_DATA}'
;;
esac
-
BIND9_CO_RULE=".c.$O:"
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
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
;;
- powerpc-ibm-aix*)
- compiler=aix
- ;;
esac
fi
case "$compiler" in
osf)
ISC_PLATFORM_USEOSFASM="#define ISC_PLATFORM_USEOSFASM 1"
;;
- aix)
- ;;
mac)
;;
*)
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)
LIBTOOL_MODE_LINK=
LIBTOOL_MODE_UNINSTALL=
LIBTOOL_ALLOW_UNDEFINED=
- LIBTOOL_IN_MAIN=
INSTALL_LIBRARY='${INSTALL_DATA}'
;;
esac
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)
ISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT"
case "$host" in
- *-aix5.[[123]].*)
- hack_shutup_pthreadonceinit=yes
- ;;
[*-solaris2.[89]])
hack_shutup_pthreadonceinit=yes
;;
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
return (0);],
[compiler=osf],)
;;
- powerpc-ibm-aix*)
- compiler=aix
- ;;
esac
fi
case "$compiler" in
osf)
ISC_PLATFORM_USEOSFASM="#define ISC_PLATFORM_USEOSFASM 1"
;;
- aix)
- ;;
mac)
;;
*)
/*
* 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/.
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;
};
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;
char *type;
char *ttlStr;
char *data;
- char host[ISC_DIR_NAMEMAX];
+ char host[NAME_MAX];
char *tmpString;
char *tmpPtr;
int ttl;
{
if ((strlen(host) +
strlen(tmpPtr + 1) + 2)
- > ISC_DIR_NAMEMAX)
+ > NAME_MAX)
continue;
strcat(host, tmpPtr + 1);
strcat(host, ".");
}
if ((strlen(host) +
strlen(tmpString) + 1)
- <= ISC_DIR_NAMEMAX)
+ <= NAME_MAX)
strcat(host, tmpString);
}
strncpy(host,
(char *) &dir->entry.name[6],
sizeof(host) - 1);
- host[255] = '\0';
+ host[NAME_MAX-1] = '\0';
}
foundHost = true;
break;
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 \
: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
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
---------------
3493: Basic Socket Interface Extensions for IPv6
3542: Advanced Sockets Application Program Interface (API) for IPv6
-
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),
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),
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;
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;
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];
{
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;
#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
/*!
* 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;
#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;
}
}
-#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.
*/
strbuf);
}
}
- FIX_IPV6_RECVPKTINFO(sock); /* AIX */
#endif
}
#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;
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 = "";