Skip to content

Commit 6859cc7

Browse files
feihongmeilianmichael-grunder
authored andcommitted
Define ssize_t as intptr_t in Windows
1 parent ccad7eb commit 6859cc7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

hiredis.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#include <sys/time.h> /* for struct timeval */
4040
#else
4141
struct timeval; /* forward declaration */
42-
typedef long long ssize_t;
42+
typedef intptr_t ssize_t;
4343
#endif
4444
#include <stdint.h> /* uintXX_t, etc */
4545
#include "sds.h" /* for sds */

sds.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535

3636
#define SDS_MAX_PREALLOC (1024*1024)
3737
#ifdef _MSC_VER
38-
typedef long long ssize_t;
39-
#define SSIZE_MAX (LLONG_MAX >> 1)
38+
typedef intptr_t ssize_t;
39+
#define SSIZE_MAX INTPTR_MAX
4040
#ifndef __clang__
4141
#define __attribute__(x)
4242
#endif

sockcompat.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
#include <mstcpip.h>
5454

5555
#ifdef _MSC_VER
56-
typedef long long ssize_t;
56+
typedef intptr_t ssize_t;
5757
#endif
5858

5959
/* Emulate the parts of the BSD socket API that we need (override the winsock signatures). */

0 commit comments

Comments
 (0)