Add realpath() for Win32

This commit is contained in:
Sergey Lyubka 2021-12-22 18:04:27 +00:00
parent ce6164ca20
commit af3a0f6af0

View File

@ -49,7 +49,6 @@ typedef enum { false = 0, true = 1 } bool;
// Protect from calls like std::snprintf in app code
// See https://github.com/cesanta/mongoose/issues/1047
#ifndef __cplusplus
#define sleep(x) Sleep(x)
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#ifndef strdup // For MSVC with _DEBUG, see #1359
@ -70,6 +69,9 @@ typedef int socklen_t;
#define EWOULDBLOCK WSAEWOULDBLOCK
#endif
#define realpath(a, b) _fullpath((b), (a), MG_PATH_MAX)
#define sleep(x) Sleep(x)
#ifndef va_copy
#ifdef __va_copy
#define va_copy __va_copy