mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-22 09:20:51 -05:00
Merge branch '509-fix-strerr_r-on-Windows' into 'master'
Resolve "current master not building on ubuntu 16.04 using --with-libtool --enable-developer" also on Windows See merge request isc-projects/bind9!730
This commit is contained in:
commit
6a9031b0a6
17 changed files with 29 additions and 39 deletions
|
|
@ -68,7 +68,7 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>@OPENSSL_LIB@libisc.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>@OPENSSL_LIB@libisc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>@OPENSSL_LIB@libisc.lib;libdns.lib;libbind9.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>@OPENSSL_LIB@libisc.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
//
|
||||
|
||||
/*
|
||||
* Minimum version is Windows XP SP1
|
||||
* Minimum version is Windows Vista and Windows Server 2008
|
||||
*/
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#define NTDDI_VERSION 0x05010100
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#define NTDDI_VERSION 0x06000100
|
||||
|
||||
#ifndef _CRT_SECURE_NO_DEPRECATE
|
||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||
|
|
|
|||
|
|
@ -43,19 +43,19 @@
|
|||
#endif
|
||||
|
||||
/*
|
||||
* Minimum version is Windows XP
|
||||
* Minimum version is Windows Vista and Windows Server 2008
|
||||
*/
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#endif
|
||||
#if _WIN32_WINNT < 0x0501
|
||||
#error Minimum Target environment is Windows XP and Windows Server 2003
|
||||
#if _WIN32_WINNT < 0x0600
|
||||
#error Minimum Target environment is Windows Vista and Windows Server 2008
|
||||
#endif
|
||||
#ifndef NTDDI_VERSION
|
||||
#define NTDDI_VERSION 0x05010100
|
||||
#define NTDDI_VERSION 0x06000100
|
||||
#endif
|
||||
#if NTDDI_VERSION < 0x05010100
|
||||
#error Minimum Target environment is Windows XP SP1 and Windows Server 2003
|
||||
#if NTDDI_VERSION < 0x06000100
|
||||
#error Minimum Target environment is Windows Vista and Windows Server 2008
|
||||
#endif
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
|
|
|
|||
|
|
@ -1073,7 +1073,6 @@ dns_view_iscacheshared
|
|||
dns_view_isdelegationonly
|
||||
dns_view_issecuredomain
|
||||
dns_view_load
|
||||
dns_view_loadnew
|
||||
dns_view_loadnta
|
||||
dns_view_ntacovers
|
||||
dns_view_restorekeyring
|
||||
|
|
@ -1207,7 +1206,6 @@ dns_zone_keydone
|
|||
dns_zone_link
|
||||
dns_zone_load
|
||||
dns_zone_loadandthaw
|
||||
dns_zone_loadnew
|
||||
dns_zone_log
|
||||
dns_zone_logc
|
||||
dns_zone_logv
|
||||
|
|
@ -1346,7 +1344,6 @@ dns_zt_find
|
|||
dns_zt_flushanddetach
|
||||
dns_zt_freezezones
|
||||
dns_zt_load
|
||||
dns_zt_loadnew
|
||||
dns_zt_mount
|
||||
dns_zt_setviewcommit
|
||||
dns_zt_setviewrevert
|
||||
|
|
|
|||
|
|
@ -73,7 +73,11 @@ static const char *gai_messages[] = {
|
|||
* Returns an error message corresponding to an error code returned by
|
||||
* getaddrinfo() and getnameinfo()
|
||||
*/
|
||||
#if defined _WIN32
|
||||
char *
|
||||
#else
|
||||
const char *
|
||||
#endif
|
||||
gai_strerror(int ecode) {
|
||||
union {
|
||||
const char *const_ptr;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#if _GNU_SOURCE
|
||||
#if defined(strerror_r)
|
||||
#undef strerror_r
|
||||
#define strerror_r isc_string_strerror_r
|
||||
#endif
|
||||
#define strerror_r isc_string_strerror_r
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@
|
|||
|
||||
#ifdef _GNU_SOURCE
|
||||
#undef _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#include "isc/string.h" // IWYU pragma: keep
|
||||
|
||||
|
|
@ -109,5 +109,9 @@ isc_string_strlcat(char *dst, const char *src, size_t size)
|
|||
|
||||
int
|
||||
isc_string_strerror_r(int errnum, char *buf, size_t buflen) {
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
return (strerror_s(buf, buflen, errnum));
|
||||
#else
|
||||
return (strerror_r(errnum, buf, buflen));
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include "errno2result.h"
|
||||
#include <isc/result.h>
|
||||
#include <isc/strerr.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
#if defined(_WIN32) || defined(_WIN64)
|
||||
/* We are on Windows */
|
||||
# define strtok_r strtok_s
|
||||
# define strerror_r(errnum, buf, buflen) strerror_s(buf, buflen, errnum)
|
||||
|
||||
#define ISC_STRERRORSIZE 128
|
||||
|
||||
|
|
|
|||
|
|
@ -205,13 +205,13 @@ atomic_compare_exchange_strong_explicit64(atomic_int_fast64_t *obj,
|
|||
REQUIRE(succ == fail);
|
||||
switch (succ) {
|
||||
case memory_order_relaxed:
|
||||
__v = InterlockedCompareExchange64NoFence((atomic_int_fast64_t *)obj, desired, *expected);
|
||||
__v = InterlockedCompareExchangeNoFence64((atomic_int_fast64_t *)obj, desired, *expected);
|
||||
break;
|
||||
case memory_order_acquire:
|
||||
__v = InterlockedCompareExchange64Acquire((atomic_int_fast64_t *)obj, desired, *expected);
|
||||
__v = InterlockedCompareExchangeAcquire64((atomic_int_fast64_t *)obj, desired, *expected);
|
||||
break;
|
||||
case memory_order_release:
|
||||
__v = InterlockedCompareExchange64Release((atomic_int_fast64_t *)obj, desired, *expected);
|
||||
__v = InterlockedCompareExchangeRelease64((atomic_int_fast64_t *)obj, desired, *expected);
|
||||
break;
|
||||
default:
|
||||
__v = InterlockedCompareExchange64((atomic_int_fast64_t *)obj, desired, *expected);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
#include <isc/result.h>
|
||||
#include <isc/strerr.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/strerror.h>
|
||||
#include <isc/types.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -433,14 +433,12 @@ isc_net_disableipv6
|
|||
isc_net_enableipv4
|
||||
isc_net_enableipv6
|
||||
isc_net_getudpportrange
|
||||
isc_net_ntop
|
||||
isc_net_probe_ipv6only
|
||||
isc_net_probe_ipv6pktinfo
|
||||
isc_net_probedscp
|
||||
isc_net_probeipv4
|
||||
isc_net_probeipv6
|
||||
isc_net_probeunix
|
||||
isc_net_pton
|
||||
isc_netaddr_any
|
||||
isc_netaddr_any6
|
||||
isc_netaddr_eqprefix
|
||||
|
|
|
|||
|
|
@ -449,9 +449,6 @@
|
|||
<ClCompile Include="stdtime.c">
|
||||
<Filter>Win32 Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="strerror.c">
|
||||
<Filter>Win32 Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="syslog.c">
|
||||
<Filter>Win32 Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -538,12 +535,6 @@
|
|||
<ClCompile Include="..\httpd.c">
|
||||
<Filter>Library Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\inet_ntop.c">
|
||||
<Filter>Library Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\inet_pton.c">
|
||||
<Filter>Library Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\iterated_hash.c">
|
||||
<Filter>Library Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
|
|
|||
|
|
@ -437,8 +437,6 @@ copy InstallFiles ..\Build\Release\
|
|||
<ClCompile Include="..\hmacsha.c" />
|
||||
<ClCompile Include="..\ht.c" />
|
||||
<ClCompile Include="..\httpd.c" />
|
||||
<ClCompile Include="..\inet_ntop.c" />
|
||||
<ClCompile Include="..\inet_pton.c" />
|
||||
<ClCompile Include="..\iterated_hash.c" />
|
||||
<ClCompile Include="..\lex.c" />
|
||||
<ClCompile Include="..\lfsr.c" />
|
||||
|
|
@ -497,7 +495,6 @@ copy InstallFiles ..\Build\Release\
|
|||
<ClCompile Include="socket.c" />
|
||||
<ClCompile Include="stdio.c" />
|
||||
<ClCompile Include="stdtime.c" />
|
||||
<ClCompile Include="strerror.c" />
|
||||
<ClCompile Include="syslog.c" />
|
||||
<ClCompile Include="thread.c" />
|
||||
<ClCompile Include="time.c" />
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include <isc/msgs.h>
|
||||
#include <isc/net.h>
|
||||
#include <isc/once.h>
|
||||
#include <isc/strerror.h>
|
||||
#include <isc/strerr.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
#include <isc/region.h>
|
||||
#include <isc/socket.h>
|
||||
#include <isc/stats.h>
|
||||
#include <isc/strerror.h>
|
||||
#include <isc/strerr.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/syslog.h>
|
||||
#include <isc/task.h>
|
||||
|
|
|
|||
Loading…
Reference in a new issue