Merge branch 'v0.20.x'
This commit is contained in:
@@ -23,14 +23,14 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
AllocatedString<>
|
||||
FormatStringV(const char *fmt, va_list args) noexcept
|
||||
{
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
va_list tmp;
|
||||
va_copy(tmp, args);
|
||||
const int length = vsnprintf(NULL, 0, fmt, tmp);
|
||||
|
@@ -99,7 +99,7 @@ HugeDiscard(void *p, size_t size) noexcept
|
||||
#endif
|
||||
}
|
||||
|
||||
#elif defined(WIN32)
|
||||
#elif defined(_WIN32)
|
||||
|
||||
WritableBuffer<void>
|
||||
HugeAllocate(size_t size)
|
||||
|
@@ -78,7 +78,7 @@ HugeForkCow(void *p, size_t size, bool enable) noexcept;
|
||||
void
|
||||
HugeDiscard(void *p, size_t size) noexcept;
|
||||
|
||||
#elif defined(WIN32)
|
||||
#elif defined(_WIN32)
|
||||
#include <windows.h>
|
||||
|
||||
WritableBuffer<void>
|
||||
|
@@ -111,7 +111,7 @@ gcc_nonnull_all
|
||||
static inline char *
|
||||
UnsafeCopyStringP(char *dest, const char *src) noexcept
|
||||
{
|
||||
#if defined(WIN32) || defined(__BIONIC__)
|
||||
#if defined(_WIN32) || defined(__BIONIC__)
|
||||
/* emulate stpcpy() */
|
||||
UnsafeCopyString(dest, src);
|
||||
return dest + StringLength(dest);
|
||||
|
@@ -35,7 +35,7 @@
|
||||
#include <assert.h>
|
||||
#include <time.h>
|
||||
|
||||
#if !defined(__GLIBC__) && !defined(WIN32)
|
||||
#if !defined(__GLIBC__) && !defined(_WIN32)
|
||||
|
||||
/**
|
||||
* Determine the time zone offset in a portable way.
|
||||
@@ -59,7 +59,7 @@ ParseTimePoint(const char *s, const char *format)
|
||||
assert(s != nullptr);
|
||||
assert(format != nullptr);
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
/* TODO: emulate strptime()? */
|
||||
(void)s;
|
||||
(void)format;
|
||||
@@ -80,5 +80,5 @@ ParseTimePoint(const char *s, const char *format)
|
||||
|
||||
return std::chrono::system_clock::from_time_t(t);
|
||||
|
||||
#endif /* !WIN32 */
|
||||
#endif /* !_WIN32 */
|
||||
}
|
||||
|
@@ -101,7 +101,7 @@ gcc_nonnull_all
|
||||
static inline wchar_t *
|
||||
UnsafeCopyStringP(wchar_t *dest, const wchar_t *src) noexcept
|
||||
{
|
||||
#if defined(WIN32) || defined(__BIONIC__) || defined(__OpenBSD__) || \
|
||||
#if defined(_WIN32) || defined(__BIONIC__) || defined(__OpenBSD__) || \
|
||||
defined(__NetBSD__)
|
||||
/* emulate wcpcpy() */
|
||||
UnsafeCopyString(dest, src);
|
||||
|
Reference in New Issue
Block a user