2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

Fixup Windows build after strerr changes

This commit is contained in:
Ondřej Surý 2018-08-29 20:37:55 +02:00
parent 7d44cc2422
commit aa3e33575d
9 changed files with 10 additions and 19 deletions

View File

@ -17,7 +17,7 @@
#include <string.h> #include <string.h>
#if _GNU_SOURCE #if defined(strerror_r)
#undef strerror_r #undef strerror_r
#define strerror_r isc_string_strerror_r
#endif #endif
#define strerror_r isc_string_strerror_r

View File

@ -44,8 +44,8 @@
#ifdef _GNU_SOURCE #ifdef _GNU_SOURCE
#undef _GNU_SOURCE #undef _GNU_SOURCE
#include <string.h>
#endif #endif
#include <string.h>
#include "isc/string.h" // IWYU pragma: keep #include "isc/string.h" // IWYU pragma: keep
@ -109,5 +109,9 @@ isc_string_strlcat(char *dst, const char *src, size_t size)
int int
isc_string_strerror_r(int errnum, char *buf, size_t buflen) { 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)); return (strerror_r(errnum, buf, buflen));
#endif
} }

View File

@ -17,6 +17,7 @@
#include "errno2result.h" #include "errno2result.h"
#include <isc/result.h> #include <isc/result.h>
#include <isc/strerr.h>
#include <isc/string.h> #include <isc/string.h>
#include <isc/util.h> #include <isc/util.h>

View File

@ -28,7 +28,6 @@
#if defined(_WIN32) || defined(_WIN64) #if defined(_WIN32) || defined(_WIN64)
/* We are on Windows */ /* We are on Windows */
# define strtok_r strtok_s # define strtok_r strtok_s
# define strerror_r(errnum, buf, buflen) strerror_s(buf, buflen, errnum)
#define ISC_STRERRORSIZE 128 #define ISC_STRERRORSIZE 128

View File

@ -31,7 +31,6 @@
#include <isc/result.h> #include <isc/result.h>
#include <isc/strerr.h> #include <isc/strerr.h>
#include <isc/string.h> #include <isc/string.h>
#include <isc/strerror.h>
#include <isc/types.h> #include <isc/types.h>
#include <isc/util.h> #include <isc/util.h>

View File

@ -449,9 +449,6 @@
<ClCompile Include="stdtime.c"> <ClCompile Include="stdtime.c">
<Filter>Win32 Source Files</Filter> <Filter>Win32 Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="strerror.c">
<Filter>Win32 Source Files</Filter>
</ClCompile>
<ClCompile Include="syslog.c"> <ClCompile Include="syslog.c">
<Filter>Win32 Source Files</Filter> <Filter>Win32 Source Files</Filter>
</ClCompile> </ClCompile>
@ -538,12 +535,6 @@
<ClCompile Include="..\httpd.c"> <ClCompile Include="..\httpd.c">
<Filter>Library Source Files</Filter> <Filter>Library Source Files</Filter>
</ClCompile> </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"> <ClCompile Include="..\iterated_hash.c">
<Filter>Library Source Files</Filter> <Filter>Library Source Files</Filter>
</ClCompile> </ClCompile>

View File

@ -437,8 +437,6 @@ copy InstallFiles ..\Build\Release\
<ClCompile Include="..\hmacsha.c" /> <ClCompile Include="..\hmacsha.c" />
<ClCompile Include="..\ht.c" /> <ClCompile Include="..\ht.c" />
<ClCompile Include="..\httpd.c" /> <ClCompile Include="..\httpd.c" />
<ClCompile Include="..\inet_ntop.c" />
<ClCompile Include="..\inet_pton.c" />
<ClCompile Include="..\iterated_hash.c" /> <ClCompile Include="..\iterated_hash.c" />
<ClCompile Include="..\lex.c" /> <ClCompile Include="..\lex.c" />
<ClCompile Include="..\lfsr.c" /> <ClCompile Include="..\lfsr.c" />
@ -497,7 +495,6 @@ copy InstallFiles ..\Build\Release\
<ClCompile Include="socket.c" /> <ClCompile Include="socket.c" />
<ClCompile Include="stdio.c" /> <ClCompile Include="stdio.c" />
<ClCompile Include="stdtime.c" /> <ClCompile Include="stdtime.c" />
<ClCompile Include="strerror.c" />
<ClCompile Include="syslog.c" /> <ClCompile Include="syslog.c" />
<ClCompile Include="thread.c" /> <ClCompile Include="thread.c" />
<ClCompile Include="time.c" /> <ClCompile Include="time.c" />

View File

@ -19,7 +19,7 @@
#include <isc/msgs.h> #include <isc/msgs.h>
#include <isc/net.h> #include <isc/net.h>
#include <isc/once.h> #include <isc/once.h>
#include <isc/strerror.h> #include <isc/strerr.h>
#include <isc/string.h> #include <isc/string.h>
#include <isc/util.h> #include <isc/util.h>

View File

@ -62,7 +62,7 @@
#include <isc/region.h> #include <isc/region.h>
#include <isc/socket.h> #include <isc/socket.h>
#include <isc/stats.h> #include <isc/stats.h>
#include <isc/strerror.h> #include <isc/strerr.h>
#include <isc/string.h> #include <isc/string.h>
#include <isc/syslog.h> #include <isc/syslog.h>
#include <isc/task.h> #include <isc/task.h>