Fix compilation with VS2017
The primary issue is that in MSVC 14.00 (VS2015) Microsoft added snprintf as a function to the standard library and prevents users from defining it to something else (typically, this was _snprintf). So, only define it when using _MSC_VER < 1900. Other changes are: - Fix macro definition of dup2 - Add macro for getpid - Add function definition for win32_dup - Add missing EXTERNs Signed-off-by: Tim Crawford <crawfxrd@gmail.com>
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#if defined(WIN32)
|
||||
#include "win32/win32_compat.h"
|
||||
#else
|
||||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
|
||||
Reference in New Issue
Block a user