Remove legacy BSD/OS support (ipv6,various hacks)
This commit is contained in:
@@ -30,12 +30,6 @@
|
||||
*** Network.
|
||||
***/
|
||||
|
||||
/*! \brief
|
||||
* Define if this system needs the <netinet6/in6.h> header file included
|
||||
* to support in6_pkinfo (pretty much only BSD/OS).
|
||||
*/
|
||||
@ISC_PLATFORM_NEEDNETINET6IN6H@
|
||||
|
||||
/*! \brief
|
||||
* If sockaddrs on this system have an sa_len field, ISC_PLATFORM_HAVESALEN
|
||||
* will be defined.
|
||||
@@ -210,11 +204,6 @@
|
||||
*/
|
||||
@ISC_PLATFORM_HAVESTATNSEC@
|
||||
|
||||
/*
|
||||
* Type used for resource limits.
|
||||
*/
|
||||
@ISC_PLATFORM_RLIMITTYPE@
|
||||
|
||||
/*
|
||||
* Define if your compiler supports "long long int".
|
||||
*/
|
||||
|
||||
@@ -76,9 +76,6 @@
|
||||
|
||||
#include <netinet/in.h> /* Contractual promise. */
|
||||
#include <arpa/inet.h> /* Contractual promise. */
|
||||
#ifdef ISC_PLATFORM_NEEDNETINET6IN6H
|
||||
#include <netinet6/in6.h> /* Required on BSD/OS for in6_pktinfo. */
|
||||
#endif
|
||||
|
||||
#ifndef ISC_PLATFORM_HAVEIPV6
|
||||
#include <isc/ipv6.h> /* Contractual promise. */
|
||||
|
||||
@@ -100,7 +100,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;
|
||||
@@ -118,17 +118,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;
|
||||
bool rlim_t_is_signed =
|
||||
(((double)(ISC_PLATFORM_RLIMITTYPE)-1) < 0);
|
||||
(((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;
|
||||
|
||||
Reference in New Issue
Block a user