summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bind/lib/isc/unix
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bind/lib/isc/unix')
-rw-r--r--usr.sbin/bind/lib/isc/unix/entropy.c4
-rw-r--r--usr.sbin/bind/lib/isc/unix/file.c6
-rw-r--r--usr.sbin/bind/lib/isc/unix/resource.c14
-rw-r--r--usr.sbin/bind/lib/isc/unix/socket.c17
-rw-r--r--usr.sbin/bind/lib/isc/unix/socket_p.h4
5 files changed, 10 insertions, 35 deletions
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 *,