diff options
Diffstat (limited to 'usr.sbin/bind/lib/isc')
25 files changed, 58 insertions, 206 deletions
diff --git a/usr.sbin/bind/lib/isc/aes.c b/usr.sbin/bind/lib/isc/aes.c index 44bc6eabb1d..c8a0b8c0bb6 100644 --- a/usr.sbin/bind/lib/isc/aes.c +++ b/usr.sbin/bind/lib/isc/aes.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: aes.c,v 1.3 2020/01/09 13:52:23 florian Exp $ */ +/* $Id: aes.c,v 1.4 2020/01/09 14:18:30 florian Exp $ */ /*! \file isc/aes.c */ @@ -27,7 +27,6 @@ #include <isc/types.h> #include <isc/util.h> -#ifdef ISC_PLATFORM_WANTAES #if HAVE_OPENSSL_EVP_AES #include <openssl/opensslv.h> @@ -133,4 +132,3 @@ isc_aes256_crypt(const unsigned char *key, const unsigned char *in, } #endif -#endif /* ISC_PLATFORM_WANTAES */ diff --git a/usr.sbin/bind/lib/isc/bind9.c b/usr.sbin/bind/lib/isc/bind9.c index c08b3b8571a..e96b6e5ea73 100644 --- a/usr.sbin/bind/lib/isc/bind9.c +++ b/usr.sbin/bind/lib/isc/bind9.c @@ -27,4 +27,4 @@ * clients will run isc_lib_register(), which sets it to ISC_FALSE, * overriding certain BIND9 behaviors. */ -LIBISC_EXTERNAL_DATA isc_boolean_t isc_bind9 = ISC_TRUE; +isc_boolean_t isc_bind9 = ISC_TRUE; diff --git a/usr.sbin/bind/lib/isc/commandline.c b/usr.sbin/bind/lib/isc/commandline.c index 3c20a222f0f..9e6a18d6bec 100644 --- a/usr.sbin/bind/lib/isc/commandline.c +++ b/usr.sbin/bind/lib/isc/commandline.c @@ -43,7 +43,7 @@ * SUCH DAMAGE. */ -/* $Id: commandline.c,v 1.8 2020/01/09 13:47:13 florian Exp $ */ +/* $Id: commandline.c,v 1.9 2020/01/09 14:18:30 florian Exp $ */ /*! \file * This file was adapted from the NetBSD project's source tree, RCS ID: @@ -69,17 +69,17 @@ #include <isc/util.h> /*% Index into parent argv vector. */ -LIBISC_EXTERNAL_DATA int isc_commandline_index = 1; +int isc_commandline_index = 1; /*% Character checked for validity. */ -LIBISC_EXTERNAL_DATA int isc_commandline_option; +int isc_commandline_option; /*% Argument associated with option. */ -LIBISC_EXTERNAL_DATA char *isc_commandline_argument; +char *isc_commandline_argument; /*% For printing error messages. */ -LIBISC_EXTERNAL_DATA char *isc_commandline_progname; +char *isc_commandline_progname; /*% Print error messages. */ -LIBISC_EXTERNAL_DATA isc_boolean_t isc_commandline_errprint = ISC_TRUE; +isc_boolean_t isc_commandline_errprint = ISC_TRUE; /*% Reset processing. */ -LIBISC_EXTERNAL_DATA isc_boolean_t isc_commandline_reset = ISC_TRUE; +isc_boolean_t isc_commandline_reset = ISC_TRUE; static char endopt = '\0'; diff --git a/usr.sbin/bind/lib/isc/include/isc/aes.h b/usr.sbin/bind/lib/isc/include/isc/aes.h index 90948353410..6151c842693 100644 --- a/usr.sbin/bind/lib/isc/include/isc/aes.h +++ b/usr.sbin/bind/lib/isc/include/isc/aes.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: aes.h,v 1.2 2019/12/17 01:46:35 sthen Exp $ */ +/* $Id: aes.h,v 1.3 2020/01/09 14:18:30 florian Exp $ */ /*! \file isc/aes.h */ @@ -30,8 +30,6 @@ #define ISC_AES256_KEYLENGTH 32U #define ISC_AES_BLOCK_LENGTH 16U -#ifdef ISC_PLATFORM_WANTAES - ISC_LANG_BEGINDECLS void @@ -48,6 +46,4 @@ isc_aes256_crypt(const unsigned char *key, const unsigned char *in, ISC_LANG_ENDDECLS -#endif /* ISC_PLATFORM_WANTAES */ - #endif /* ISC_AES_H */ diff --git a/usr.sbin/bind/lib/isc/include/isc/bind9.h b/usr.sbin/bind/lib/isc/include/isc/bind9.h index 35e6a6c83ef..00766cf59b8 100644 --- a/usr.sbin/bind/lib/isc/include/isc/bind9.h +++ b/usr.sbin/bind/lib/isc/include/isc/bind9.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: bind9.h,v 1.2 2019/12/17 01:46:35 sthen Exp $ */ +/* $Id: bind9.h,v 1.3 2020/01/09 14:18:30 florian Exp $ */ #ifndef ISC_BIND9_H #define ISC_BIND9_H 1 @@ -28,6 +28,6 @@ * tools) it must be set to ISC_TRUE at runtime. Export library clients * will call isc_lib_register(), which will set it to ISC_FALSE. */ -LIBISC_EXTERNAL_DATA extern isc_boolean_t isc_bind9; +extern isc_boolean_t isc_bind9; #endif /* ISC_BIND9_H */ diff --git a/usr.sbin/bind/lib/isc/include/isc/commandline.h b/usr.sbin/bind/lib/isc/include/isc/commandline.h index 6e3b35d068a..b07431beb49 100644 --- a/usr.sbin/bind/lib/isc/include/isc/commandline.h +++ b/usr.sbin/bind/lib/isc/include/isc/commandline.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: commandline.h,v 1.3 2019/12/17 01:46:35 sthen Exp $ */ +/* $Id: commandline.h,v 1.4 2020/01/09 14:18:30 florian Exp $ */ #ifndef ISC_COMMANDLINE_H #define ISC_COMMANDLINE_H 1 @@ -26,17 +26,17 @@ #include <isc/platform.h> /*% Index into parent argv vector. */ -LIBISC_EXTERNAL_DATA extern int isc_commandline_index; +extern int isc_commandline_index; /*% Character checked for validity. */ -LIBISC_EXTERNAL_DATA extern int isc_commandline_option; +extern int isc_commandline_option; /*% Argument associated with option. */ -LIBISC_EXTERNAL_DATA extern char *isc_commandline_argument; +extern char *isc_commandline_argument; /*% For printing error messages. */ -LIBISC_EXTERNAL_DATA extern char *isc_commandline_progname; +extern char *isc_commandline_progname; /*% Print error message. */ -LIBISC_EXTERNAL_DATA extern isc_boolean_t isc_commandline_errprint; +extern isc_boolean_t isc_commandline_errprint; /*% Reset getopt. */ -LIBISC_EXTERNAL_DATA extern isc_boolean_t isc_commandline_reset; +extern isc_boolean_t isc_commandline_reset; ISC_LANG_BEGINDECLS diff --git a/usr.sbin/bind/lib/isc/include/isc/ipv6.h b/usr.sbin/bind/lib/isc/include/isc/ipv6.h index 86626e7890a..5e2560ec6b5 100644 --- a/usr.sbin/bind/lib/isc/include/isc/ipv6.h +++ b/usr.sbin/bind/lib/isc/include/isc/ipv6.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: ipv6.h,v 1.4 2020/01/09 13:45:33 florian Exp $ */ +/* $Id: ipv6.h,v 1.5 2020/01/09 14:18:30 florian Exp $ */ #ifndef ISC_IPV6_H #define ISC_IPV6_H 1 @@ -74,8 +74,8 @@ struct in6_addr { #define IN6ADDR_ANY_INIT {{{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }}} #define IN6ADDR_LOOPBACK_INIT {{{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }}} -LIBISC_EXTERNAL_DATA extern const struct in6_addr in6addr_any; -LIBISC_EXTERNAL_DATA extern const struct in6_addr in6addr_loopback; +extern const struct in6_addr in6addr_any; +extern const struct in6_addr in6addr_loopback; struct sockaddr_in6 { isc_uint8_t sin6_len; diff --git a/usr.sbin/bind/lib/isc/include/isc/lib.h b/usr.sbin/bind/lib/isc/include/isc/lib.h index 9404324624a..30f4469d856 100644 --- a/usr.sbin/bind/lib/isc/include/isc/lib.h +++ b/usr.sbin/bind/lib/isc/include/isc/lib.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: lib.h,v 1.3 2019/12/17 01:46:35 sthen Exp $ */ +/* $Id: lib.h,v 1.4 2020/01/09 14:18:30 florian Exp $ */ #ifndef ISC_LIB_H #define ISC_LIB_H 1 @@ -26,7 +26,7 @@ ISC_LANG_BEGINDECLS -LIBISC_EXTERNAL_DATA extern isc_msgcat_t *isc_msgcat; +extern isc_msgcat_t *isc_msgcat; void isc_lib_initmsgcat(void); diff --git a/usr.sbin/bind/lib/isc/include/isc/log.h b/usr.sbin/bind/lib/isc/include/isc/log.h index f0ba04dc2ad..7b148212da4 100644 --- a/usr.sbin/bind/lib/isc/include/isc/log.h +++ b/usr.sbin/bind/lib/isc/include/isc/log.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: log.h,v 1.6 2019/12/17 01:46:35 sthen Exp $ */ +/* $Id: log.h,v 1.7 2020/01/09 14:18:30 florian Exp $ */ #ifndef ISC_LOG_H #define ISC_LOG_H 1 @@ -148,9 +148,9 @@ typedef union isc_logdestination { * definitions with indexes into its isc_logcategory structure corresponding to * the order of the names. */ -LIBISC_EXTERNAL_DATA extern isc_logcategory_t isc_categories[]; -LIBISC_EXTERNAL_DATA extern isc_log_t *isc_lctx; -LIBISC_EXTERNAL_DATA extern isc_logmodule_t isc_modules[]; +extern isc_logcategory_t isc_categories[]; +extern isc_log_t *isc_lctx; +extern isc_logmodule_t isc_modules[]; /*@}*/ /*@{*/ diff --git a/usr.sbin/bind/lib/isc/include/isc/mem.h b/usr.sbin/bind/lib/isc/include/isc/mem.h index bf790265204..9a017059ba3 100644 --- a/usr.sbin/bind/lib/isc/include/isc/mem.h +++ b/usr.sbin/bind/lib/isc/include/isc/mem.h @@ -86,8 +86,8 @@ typedef void (*isc_memfree_t)(void *, void *); #define ISC_MEMPOOL_NAMES 1 #endif -LIBISC_EXTERNAL_DATA extern unsigned int isc_mem_debugging; -LIBISC_EXTERNAL_DATA extern unsigned int isc_mem_defaultflags; +extern unsigned int isc_mem_debugging; +extern unsigned int isc_mem_defaultflags; /*@{*/ #define ISC_MEM_DEBUGTRACE 0x00000001U diff --git a/usr.sbin/bind/lib/isc/include/isc/netaddr.h b/usr.sbin/bind/lib/isc/include/isc/netaddr.h index 94e8b76f01b..993e576a3b8 100644 --- a/usr.sbin/bind/lib/isc/include/isc/netaddr.h +++ b/usr.sbin/bind/lib/isc/include/isc/netaddr.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: netaddr.h,v 1.3 2019/12/17 01:46:35 sthen Exp $ */ +/* $Id: netaddr.h,v 1.4 2020/01/09 14:18:30 florian Exp $ */ #ifndef ISC_NETADDR_H #define ISC_NETADDR_H 1 @@ -25,10 +25,8 @@ #include <isc/net.h> #include <isc/types.h> -#ifdef ISC_PLATFORM_HAVESYSUNH #include <sys/types.h> #include <sys/un.h> -#endif ISC_LANG_BEGINDECLS @@ -37,9 +35,7 @@ struct isc_netaddr { union { struct in_addr in; struct in6_addr in6; -#ifdef ISC_PLATFORM_HAVESYSUNH char un[sizeof(((struct sockaddr_un *)0)->sun_path)]; -#endif } type; isc_uint32_t zone; }; diff --git a/usr.sbin/bind/lib/isc/include/isc/platform.h.in b/usr.sbin/bind/lib/isc/include/isc/platform.h.in index be1acbad39a..4430aabeb7f 100644 --- a/usr.sbin/bind/lib/isc/include/isc/platform.h.in +++ b/usr.sbin/bind/lib/isc/include/isc/platform.h.in @@ -28,42 +28,6 @@ ***/ /* - * Defined if unistd.h does not cause fd_set to be delared. - */ -@ISC_PLATFORM_NEEDSYSSELECTH@ - -/* - * Define if the system has nanosecond-level accuracy in file stats. - */ -@ISC_PLATFORM_HAVESTATNSEC@ - -/* - * Type used for resource limits. - */ -@ISC_PLATFORM_RLIMITTYPE@ - -/* - * Define if your compiler supports "long long int". - */ -@ISC_PLATFORM_HAVELONGLONG@ - -/* - * Define if PTHREAD_ONCE_INIT should be surrounded by braces to - * prevent compiler warnings (such as with gcc on Solaris 2.8). - */ -@ISC_PLATFORM_BRACEPTHREADONCEINIT@ - -/* - * Used to control how extern data is linked; needed for Win32 platforms. - */ -@ISC_PLATFORM_USEDECLSPEC@ - -/* - * Define if the platform has <sys/un.h>. - */ -@ISC_PLATFORM_HAVESYSUNH@ - -/* * If the "xadd" operation is available on this architecture, * ISC_PLATFORM_HAVEXADD will be defined. */ @@ -115,75 +79,22 @@ @ISC_PLATFORM_USESTDASM@ /* - * Define if the platform has <strings.h>. - */ -@ISC_PLATFORM_HAVESTRINGSH@ - -/* * Define if the hash functions must be provided by OpenSSL. */ @ISC_PLATFORM_OPENSSLHASH@ /* - * Define if AES support is wanted - */ -@ISC_PLATFORM_WANTAES@ - -/* * Defines for the noreturn attribute. */ @ISC_PLATFORM_NORETURN_PRE@ @ISC_PLATFORM_NORETURN_POST@ /* - * Defined if we are enabling SIT (Source Identity Token). - */ -@ISC_PLATFORM_USESIT@ - -/*** - *** Windows dll support. - ***/ - -/* * Define if MacOS style of PPC assembly must be used. * e.g. "r6", not "6", for register six. */ @ISC_PLATFORM_USEMACASM@ -#ifndef ISC_PLATFORM_USEDECLSPEC -#define LIBISC_EXTERNAL_DATA -#define LIBDNS_EXTERNAL_DATA -#define LIBISCCFG_EXTERNAL_DATA -#define LIBBIND9_EXTERNAL_DATA -#define LIBTESTS_EXTERNAL_DATA -#else /*! \brief ISC_PLATFORM_USEDECLSPEC */ -#ifdef LIBISC_EXPORTS -#define LIBISC_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBISC_EXTERNAL_DATA __declspec(dllimport) -#endif -#ifdef LIBDNS_EXPORTS -#define LIBDNS_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBDNS_EXTERNAL_DATA __declspec(dllimport) -#endif -#ifdef LIBISCCFG_EXPORTS -#define LIBISCCFG_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBISCCFG_EXTERNAL_DATA __declspec(dllimport) -#endif -#ifdef LIBBIND9_EXPORTS -#define LIBBIND9_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBBIND9_EXTERNAL_DATA __declspec(dllimport) -#endif -#ifdef LIBTESTS_EXPORTS -#define LIBTESTS_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBTESTS_EXTERNAL_DATA __declspec(dllimport) -#endif -#endif /*! \brief ISC_PLATFORM_USEDECLSPEC */ - /* * Tell emacs to use C mode for this file. * diff --git a/usr.sbin/bind/lib/isc/include/isc/sockaddr.h b/usr.sbin/bind/lib/isc/include/isc/sockaddr.h index 724acaebb9e..cf4a692cf59 100644 --- a/usr.sbin/bind/lib/isc/include/isc/sockaddr.h +++ b/usr.sbin/bind/lib/isc/include/isc/sockaddr.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: sockaddr.h,v 1.3 2019/12/17 01:46:35 sthen Exp $ */ +/* $Id: sockaddr.h,v 1.4 2020/01/09 14:18:30 florian Exp $ */ #ifndef ISC_SOCKADDR_H #define ISC_SOCKADDR_H 1 @@ -24,9 +24,7 @@ #include <isc/lang.h> #include <isc/net.h> #include <isc/types.h> -#ifdef ISC_PLATFORM_HAVESYSUNH #include <sys/un.h> -#endif struct isc_sockaddr { union { @@ -34,9 +32,7 @@ struct isc_sockaddr { struct sockaddr_in sin; struct sockaddr_in6 sin6; struct sockaddr_storage ss; -#ifdef ISC_PLATFORM_HAVESYSUNH struct sockaddr_un sunix; -#endif } type; unsigned int length; /* XXXRTH beginning? */ ISC_LINK(struct isc_sockaddr) link; diff --git a/usr.sbin/bind/lib/isc/include/isc/string.h b/usr.sbin/bind/lib/isc/include/isc/string.h index 28f4a2f6f76..75b16c211f5 100644 --- a/usr.sbin/bind/lib/isc/include/isc/string.h +++ b/usr.sbin/bind/lib/isc/include/isc/string.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: string.h,v 1.7 2020/01/09 13:47:14 florian Exp $ */ +/* $Id: string.h,v 1.8 2020/01/09 14:18:30 florian Exp $ */ #ifndef ISC_STRING_H #define ISC_STRING_H 1 @@ -29,9 +29,7 @@ #include <string.h> -#ifdef ISC_PLATFORM_HAVESTRINGSH #include <strings.h> -#endif #define ISC_STRING_MAGIC 0x5e diff --git a/usr.sbin/bind/lib/isc/include/isc/version.h b/usr.sbin/bind/lib/isc/include/isc/version.h index 2e7132d0857..c6e1c2e9452 100644 --- a/usr.sbin/bind/lib/isc/include/isc/version.h +++ b/usr.sbin/bind/lib/isc/include/isc/version.h @@ -14,14 +14,14 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: version.h,v 1.3 2019/12/17 01:46:35 sthen Exp $ */ +/* $Id: version.h,v 1.4 2020/01/09 14:18:30 florian Exp $ */ /*! \file isc/version.h */ #include <isc/platform.h> -LIBISC_EXTERNAL_DATA extern const char isc_version[]; +extern const char isc_version[]; -LIBISC_EXTERNAL_DATA extern const unsigned int isc_libinterface; -LIBISC_EXTERNAL_DATA extern const unsigned int isc_librevision; -LIBISC_EXTERNAL_DATA extern const unsigned int isc_libage; +extern const unsigned int isc_libinterface; +extern const unsigned int isc_librevision; +extern const unsigned int isc_libage; diff --git a/usr.sbin/bind/lib/isc/lib.c b/usr.sbin/bind/lib/isc/lib.c index 8a511fcc409..78d68dabc1b 100644 --- a/usr.sbin/bind/lib/isc/lib.c +++ b/usr.sbin/bind/lib/isc/lib.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: lib.c,v 1.4 2020/01/09 13:47:13 florian Exp $ */ +/* $Id: lib.c,v 1.5 2020/01/09 14:18:30 florian Exp $ */ /*! \file */ @@ -38,7 +38,7 @@ *** Globals ***/ -LIBISC_EXTERNAL_DATA isc_msgcat_t * isc_msgcat = NULL; +isc_msgcat_t * isc_msgcat = NULL; /*** diff --git a/usr.sbin/bind/lib/isc/log.c b/usr.sbin/bind/lib/isc/log.c index e02e3575950..33d41f72072 100644 --- a/usr.sbin/bind/lib/isc/log.c +++ b/usr.sbin/bind/lib/isc/log.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: log.c,v 1.13 2020/01/09 13:47:13 florian Exp $ */ +/* $Id: log.c,v 1.14 2020/01/09 14:18:30 florian Exp $ */ /*! \file * \author Principal Authors: DCL */ @@ -189,7 +189,7 @@ static const int syslog_map[] = { * be overridden. Since the default is always looked up as the first * channellist in the log context, it must come first in isc_categories[]. */ -LIBISC_EXTERNAL_DATA isc_logcategory_t isc_categories[] = { +isc_logcategory_t isc_categories[] = { { "default", 0 }, /* "default" must come first. */ { "general", 0 }, { NULL, 0 } @@ -198,7 +198,7 @@ LIBISC_EXTERNAL_DATA isc_logcategory_t isc_categories[] = { /*! * See above comment for categories on LIBISC_EXTERNAL_DATA, and apply it to modules. */ -LIBISC_EXTERNAL_DATA isc_logmodule_t isc_modules[] = { +isc_logmodule_t isc_modules[] = { { "socket", 0 }, { "time", 0 }, { "interface", 0 }, @@ -218,7 +218,7 @@ static isc_logchannellist_t default_channel; /*! * libisc logs to this context. */ -LIBISC_EXTERNAL_DATA isc_log_t *isc_lctx = NULL; +isc_log_t *isc_lctx = NULL; /*! * Forward declarations. diff --git a/usr.sbin/bind/lib/isc/mem.c b/usr.sbin/bind/lib/isc/mem.c index 221a80d11aa..9726cf6a8f3 100644 --- a/usr.sbin/bind/lib/isc/mem.c +++ b/usr.sbin/bind/lib/isc/mem.c @@ -43,8 +43,8 @@ #ifndef ISC_MEM_DEBUGGING #define ISC_MEM_DEBUGGING 0 #endif -LIBISC_EXTERNAL_DATA unsigned int isc_mem_debugging = ISC_MEM_DEBUGGING; -LIBISC_EXTERNAL_DATA unsigned int isc_mem_defaultflags = ISC_MEMFLAG_DEFAULT; +unsigned int isc_mem_debugging = ISC_MEM_DEBUGGING; +unsigned int isc_mem_defaultflags = ISC_MEMFLAG_DEFAULT; /* * Constants. diff --git a/usr.sbin/bind/lib/isc/netaddr.c b/usr.sbin/bind/lib/isc/netaddr.c index db741a07ce1..c8b28900aa5 100644 --- a/usr.sbin/bind/lib/isc/netaddr.c +++ b/usr.sbin/bind/lib/isc/netaddr.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: netaddr.c,v 1.6 2020/01/09 13:47:13 florian Exp $ */ +/* $Id: netaddr.c,v 1.7 2020/01/09 14:18:30 florian Exp $ */ /*! \file */ @@ -52,12 +52,10 @@ isc_netaddr_equal(const isc_netaddr_t *a, const isc_netaddr_t *b) { a->zone != b->zone) return (ISC_FALSE); break; -#ifdef ISC_PLATFORM_HAVESYSUNH case AF_UNIX: if (strcmp(a->type.un, b->type.un) != 0) return (ISC_FALSE); break; -#endif default: return (ISC_FALSE); } @@ -140,7 +138,6 @@ isc_netaddr_totext(const isc_netaddr_t *netaddr, isc_buffer_t *target) { case AF_INET6: type = &netaddr->type.in6; break; -#ifdef ISC_PLATFORM_HAVESYSUNH case AF_UNIX: alen = strlen(netaddr->type.un); if (alen > isc_buffer_availablelength(target)) @@ -149,7 +146,6 @@ isc_netaddr_totext(const isc_netaddr_t *netaddr, isc_buffer_t *target) { (const unsigned char *)(netaddr->type.un), alen); return (ISC_R_SUCCESS); -#endif default: return (ISC_R_FAILURE); } @@ -299,7 +295,6 @@ isc_netaddr_fromin6(isc_netaddr_t *netaddr, const struct in6_addr *ina6) { isc_result_t isc_netaddr_frompath(isc_netaddr_t *netaddr, const char *path) { -#ifdef ISC_PLATFORM_HAVESYSUNH if (strlen(path) > sizeof(netaddr->type.un) - 1) return (ISC_R_NOSPACE); @@ -308,11 +303,6 @@ isc_netaddr_frompath(isc_netaddr_t *netaddr, const char *path) { strlcpy(netaddr->type.un, path, sizeof(netaddr->type.un)); netaddr->zone = 0; return (ISC_R_SUCCESS); -#else - UNUSED(netaddr); - UNUSED(path); - return (ISC_R_NOTIMPLEMENTED); -#endif } @@ -342,12 +332,10 @@ isc_netaddr_fromsockaddr(isc_netaddr_t *t, const isc_sockaddr_t *s) { memmove(&t->type.in6, &s->type.sin6.sin6_addr, 16); t->zone = s->type.sin6.sin6_scope_id; break; -#ifdef ISC_PLATFORM_HAVESYSUNH case AF_UNIX: memmove(t->type.un, s->type.sunix.sun_path, sizeof(t->type.un)); t->zone = 0; break; -#endif default: INSIST(0); } diff --git a/usr.sbin/bind/lib/isc/sockaddr.c b/usr.sbin/bind/lib/isc/sockaddr.c index 8a37b419e9b..1a7a15f0f32 100644 --- a/usr.sbin/bind/lib/isc/sockaddr.c +++ b/usr.sbin/bind/lib/isc/sockaddr.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: sockaddr.c,v 1.11 2020/01/09 13:47:14 florian Exp $ */ +/* $Id: sockaddr.c,v 1.12 2020/01/09 14:18:30 florian Exp $ */ /*! \file */ @@ -473,7 +473,6 @@ isc_sockaddr_isnetzero(const isc_sockaddr_t *sockaddr) { isc_result_t isc_sockaddr_frompath(isc_sockaddr_t *sockaddr, const char *path) { -#ifdef ISC_PLATFORM_HAVESYSUNH if (strlen(path) >= sizeof(sockaddr->type.sunix.sun_path)) return (ISC_R_NOSPACE); memset(sockaddr, 0, sizeof(*sockaddr)); @@ -484,9 +483,4 @@ isc_sockaddr_frompath(isc_sockaddr_t *sockaddr, const char *path) { strlcpy(sockaddr->type.sunix.sun_path, path, sizeof(sockaddr->type.sunix.sun_path)); return (ISC_R_SUCCESS); -#else - UNUSED(sockaddr); - UNUSED(path); - return (ISC_R_NOTIMPLEMENTED); -#endif } diff --git a/usr.sbin/bind/lib/isc/unix/entropy.c b/usr.sbin/bind/lib/isc/unix/entropy.c index 3f5c9800921..09f2e8ece72 100644 --- a/usr.sbin/bind/lib/isc/unix/entropy.c +++ b/usr.sbin/bind/lib/isc/unix/entropy.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: entropy.c,v 1.10 2020/01/09 13:47:14 florian Exp $ */ +/* $Id: entropy.c,v 1.11 2020/01/09 14:18:30 florian Exp $ */ /* \file unix/entropy.c * \brief @@ -40,9 +40,7 @@ #include <isc/strerror.h> #include <isc/string.h> -#ifdef ISC_PLATFORM_NEEDSYSSELECTH #include <sys/select.h> -#endif #include "errno2result.h" diff --git a/usr.sbin/bind/lib/isc/unix/file.c b/usr.sbin/bind/lib/isc/unix/file.c index d43e4f7aaae..ad1e4b72a08 100644 --- a/usr.sbin/bind/lib/isc/unix/file.c +++ b/usr.sbin/bind/lib/isc/unix/file.c @@ -43,7 +43,7 @@ * SUCH DAMAGE. */ -/* $Id: file.c,v 1.7 2019/12/17 01:46:37 sthen Exp $ */ +/* $Id: file.c,v 1.8 2020/01/09 14:18:30 florian Exp $ */ /*! \file */ @@ -148,11 +148,7 @@ isc_file_getmodtime(const char *file, isc_time_t *modtime) { result = file_stats(file, &stats); if (result == ISC_R_SUCCESS) -#ifdef ISC_PLATFORM_HAVESTATNSEC isc_time_set(modtime, stats.st_mtime, stats.st_mtim.tv_nsec); -#else - isc_time_set(modtime, stats.st_mtime, 0); -#endif return (result); } diff --git a/usr.sbin/bind/lib/isc/unix/resource.c b/usr.sbin/bind/lib/isc/unix/resource.c index fd2fb9524a9..57605894dcf 100644 --- a/usr.sbin/bind/lib/isc/unix/resource.c +++ b/usr.sbin/bind/lib/isc/unix/resource.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: resource.c,v 1.4 2019/12/17 01:46:37 sthen Exp $ */ +/* $Id: resource.c,v 1.5 2020/01/09 14:18:30 florian Exp $ */ #include <config.h> @@ -103,7 +103,7 @@ resource2rlim(isc_resource_t resource, int *rlim_resource) { isc_result_t isc_resource_setlimit(isc_resource_t resource, isc_resourcevalue_t value) { struct rlimit rl; - ISC_PLATFORM_RLIMITTYPE rlim_value; + rlim_t rlim_value; int unixresult; int unixresource; isc_result_t result; @@ -121,17 +121,17 @@ isc_resource_setlimit(isc_resource_t resource, isc_resourcevalue_t value) { * integer so that it could contain the maximum range of * reasonable values. Unfortunately, this exceeds the typical * range on Unix systems. Ensure the range of - * ISC_PLATFORM_RLIMITTYPE is not overflowed. + * rlim_t is not overflowed. */ isc_resourcevalue_t rlim_max; isc_boolean_t rlim_t_is_signed = - ISC_TF(((double)(ISC_PLATFORM_RLIMITTYPE)-1) < 0); + ISC_TF(((double)(rlim_t)-1) < 0); if (rlim_t_is_signed) - rlim_max = ~((ISC_PLATFORM_RLIMITTYPE)1 << - (sizeof(ISC_PLATFORM_RLIMITTYPE) * 8 - 1)); + rlim_max = ~((rlim_t)1 << + (sizeof(rlim_t) * 8 - 1)); else - rlim_max = (ISC_PLATFORM_RLIMITTYPE)-1; + rlim_max = (rlim_t)-1; if (value > rlim_max) value = rlim_max; diff --git a/usr.sbin/bind/lib/isc/unix/socket.c b/usr.sbin/bind/lib/isc/unix/socket.c index e86c2a09cd1..6dc3c30881f 100644 --- a/usr.sbin/bind/lib/isc/unix/socket.c +++ b/usr.sbin/bind/lib/isc/unix/socket.c @@ -65,9 +65,7 @@ #include <isc/util.h> #include <isc/xml.h> -#ifdef ISC_PLATFORM_HAVESYSUNH #include <sys/un.h> -#endif #include <sys/event.h> #include <netinet/tcp.h> @@ -1579,11 +1577,9 @@ build_msghdr_recv(isc__socket_t *sock, char *cmsgbuf, isc_socketevent_t *dev, } else if (sock->pf == AF_INET6) { msg->msg_name = (void *)&dev->address.type.sin6; msg->msg_namelen = sizeof(dev->address.type.sin6); -#ifdef ISC_PLATFORM_HAVESYSUNH } else if (sock->pf == AF_UNIX) { msg->msg_name = (void *)&dev->address.type.sunix; msg->msg_namelen = sizeof(dev->address.type.sunix); -#endif } else { msg->msg_name = (void *)&dev->address.type.sa; msg->msg_namelen = sizeof(dev->address.type); @@ -5122,7 +5118,6 @@ isc__socket_sendto2(isc_socket_t *sock0, isc_region_t *region, void isc__socket_cleanunix(isc_sockaddr_t *sockaddr, isc_boolean_t active) { -#ifdef ISC_PLATFORM_HAVESYSUNH int s; struct stat sb; char strbuf[ISC_STRERRORSIZE]; @@ -5244,17 +5239,12 @@ isc__socket_cleanunix(isc_sockaddr_t *sockaddr, isc_boolean_t active) { } cleanup: close(s); -#else - UNUSED(sockaddr); - UNUSED(active); -#endif } isc_result_t isc__socket_permunix(isc_sockaddr_t *sockaddr, isc_uint32_t perm, isc_uint32_t owner, isc_uint32_t group) { -#ifdef ISC_PLATFORM_HAVESYSUNH isc_result_t result = ISC_R_SUCCESS; char strbuf[ISC_STRERRORSIZE]; char path[sizeof(sockaddr->type.sunix.sun_path)]; @@ -5297,13 +5287,6 @@ isc__socket_permunix(isc_sockaddr_t *sockaddr, isc_uint32_t perm, result = ISC_R_FAILURE; } return (result); -#else - UNUSED(sockaddr); - UNUSED(perm); - UNUSED(owner); - UNUSED(group); - return (ISC_R_NOTIMPLEMENTED); -#endif } isc_result_t diff --git a/usr.sbin/bind/lib/isc/unix/socket_p.h b/usr.sbin/bind/lib/isc/unix/socket_p.h index 306d1d5ed4a..a5e3ff975b4 100644 --- a/usr.sbin/bind/lib/isc/unix/socket_p.h +++ b/usr.sbin/bind/lib/isc/unix/socket_p.h @@ -14,16 +14,14 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket_p.h,v 1.5 2019/12/17 01:46:37 sthen Exp $ */ +/* $Id: socket_p.h,v 1.6 2020/01/09 14:18:30 florian Exp $ */ #ifndef ISC_SOCKET_P_H #define ISC_SOCKET_P_H /*! \file */ -#ifdef ISC_PLATFORM_NEEDSYSSELECTH #include <sys/select.h> -#endif typedef struct isc_socketwait isc_socketwait_t; int isc__socketmgr_waitevents(isc_socketmgr_t *, struct timeval *, |