Windows 10 SDK build fixes
Build without Win32.mak, and using Universal C Runtime (UCRT) windows: Check for APPVER, not VCVER for UCRT When deciding whether UCRT is used (and thus no CRT merge modules), check for Windows 10 rather than the version of Visual Studio, as we may be building with an older SDK.
This commit is contained in:

committed by
Nico Williams

parent
7cc4b7a9e6
commit
ec866e635e
@@ -356,7 +356,16 @@ ROKEN_CPP_START
|
||||
|
||||
#define fsync _commit
|
||||
|
||||
/* The MSVC implementation of snprintf is not C99 compliant. */
|
||||
#define timezone _timezone
|
||||
|
||||
#define tzname _tzname
|
||||
|
||||
#define _PIPE_BUFFER_SZ 8192
|
||||
#define pipe(fds) _pipe((fds), _PIPE_BUFFER_SZ, O_BINARY);
|
||||
|
||||
#define ftruncate(fd, sz) _chsize((fd), (sz))
|
||||
|
||||
#if !defined(HAVE_UCRT)
|
||||
#define snprintf rk_snprintf
|
||||
#define vsnprintf rk_vsnprintf
|
||||
#define vasnprintf rk_vasnprintf
|
||||
@@ -364,11 +373,6 @@ ROKEN_CPP_START
|
||||
#define asnprintf rk_asnprintf
|
||||
#define asprintf rk_asprintf
|
||||
|
||||
#define _PIPE_BUFFER_SZ 8192
|
||||
#define pipe(fds) _pipe((fds), _PIPE_BUFFER_SZ, O_BINARY);
|
||||
|
||||
#define ftruncate(fd, sz) _chsize((fd), (sz))
|
||||
|
||||
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
|
||||
rk_snprintf (char *str, size_t sz, const char *format, ...);
|
||||
|
||||
@@ -386,6 +390,7 @@ rk_vasnprintf (char **ret, size_t max_sz, const char *format, va_list args);
|
||||
|
||||
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
|
||||
rk_vsnprintf (char *str, size_t sz, const char *format, va_list args);
|
||||
#endif /* !defined(HAVE_UCRT) */
|
||||
|
||||
/* missing stat.h predicates */
|
||||
|
||||
|
@@ -38,6 +38,8 @@
|
||||
|
||||
#include "roken.h"
|
||||
|
||||
#ifndef HAVE_STRTOLL
|
||||
|
||||
/* #include <sys/cdefs.h> */
|
||||
|
||||
#include <limits.h>
|
||||
@@ -150,3 +152,4 @@ noconv:
|
||||
*endptr = (char *)(any ? s - 1 : nptr);
|
||||
return ret;
|
||||
}
|
||||
#endif /* !HAVE_STRTOLL */
|
||||
|
@@ -38,6 +38,8 @@
|
||||
|
||||
#include "roken.h"
|
||||
|
||||
#ifndef HAVE_STRTOULL
|
||||
|
||||
/* #include <sys/cdefs.h> */
|
||||
|
||||
#include <limits.h>
|
||||
@@ -124,3 +126,4 @@ noconv:
|
||||
*endptr = (char *)(any ? s - 1 : nptr);
|
||||
return (acc);
|
||||
}
|
||||
#endif /* !HAVE_STRTOULL */
|
||||
|
Reference in New Issue
Block a user