Define ssize_t for MSVC
ssize_t is not available in visual studio, nor is sys/param.h We typedef intmax_t to ssize_t
This commit is contained in:
parent
a15accf4eb
commit
8d0ccbeeae
2 changed files with 7 additions and 0 deletions
|
|
@ -11,7 +11,9 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifndef _MSC_VER
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#define STRUCT_PTR 0
|
||||
#define LIST_PTR 1
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@
|
|||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
// ssize_t is not defined in stdint.h in MSVC.
|
||||
#ifdef _MSC_VER
|
||||
typedef intmax_t ssize_t;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue