mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-24 02:59:01 +08:00
Fix #1359 - add conditional for MSVC, _DEBUG and strdup
This commit is contained in:
parent
c490ff8ae7
commit
46029c501a
@ -418,8 +418,10 @@ typedef enum { false = 0, true = 1 } bool;
|
|||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
#define vsnprintf _vsnprintf
|
#define vsnprintf _vsnprintf
|
||||||
|
#ifndef strdup // For MSVC with _DEBUG, see #1359
|
||||||
#define strdup(x) _strdup(x)
|
#define strdup(x) _strdup(x)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef unsigned suseconds_t;
|
typedef unsigned suseconds_t;
|
||||||
typedef int socklen_t;
|
typedef int socklen_t;
|
||||||
|
@ -51,8 +51,10 @@ typedef enum { false = 0, true = 1 } bool;
|
|||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
#define vsnprintf _vsnprintf
|
#define vsnprintf _vsnprintf
|
||||||
|
#ifndef strdup // For MSVC with _DEBUG, see #1359
|
||||||
#define strdup(x) _strdup(x)
|
#define strdup(x) _strdup(x)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef unsigned suseconds_t;
|
typedef unsigned suseconds_t;
|
||||||
typedef int socklen_t;
|
typedef int socklen_t;
|
||||||
|
Loading…
Reference in New Issue
Block a user