mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 05:28:00 +00:00
Fixup Windows build after strerr changes
This commit is contained in:
parent
7d44cc2422
commit
aa3e33575d
@ -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
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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…
x
Reference in New Issue
Block a user