Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

Commit

Permalink
[PR] Fix building problems in MSVS2015.
Browse files Browse the repository at this point in the history
  • Loading branch information
CAIQT authored and enricogior committed Feb 16, 2016
1 parent 7388b95 commit aa25356
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 5 deletions.
13 changes: 11 additions & 2 deletions deps/jemalloc-win/include/msvc_compat/stdint.h
Expand Up @@ -103,11 +103,20 @@ typedef uint64_t uint_least64_t;

// 7.18.1.3 Fastest minimum-width integer types
typedef int8_t int_fast8_t;
typedef int16_t int_fast16_t;
#if (_MSC_VER <= 1800)
typedef int16_t int_fast16_t;
#else
typedef int int_fast16_t;
#endif

typedef int32_t int_fast32_t;
typedef int64_t int_fast64_t;
typedef uint8_t uint_fast8_t;
typedef uint16_t uint_fast16_t;
#if (_MSC_VER <= 1800)
typedef uint16_t uint_fast16_t;
#else
typedef unsigned int uint_fast16_t;
#endif
typedef uint32_t uint_fast32_t;
typedef uint64_t uint_fast64_t;

Expand Down
4 changes: 3 additions & 1 deletion deps/lua/src/fpconv.c
Expand Up @@ -37,7 +37,9 @@

#ifdef _WIN32
#define inline __inline
#define snprintf _snprintf
#if (_MSC_VER <= 1800)
#define snprintf _snprintf
#endif
#endif

/* Lua CJSON assumes the locale is the same for all threads within a
Expand Down
4 changes: 3 additions & 1 deletion deps/lua/src/luaconf.h
Expand Up @@ -750,7 +750,9 @@ union luai_Cast { double l_d; long l_l; };


#ifdef _WIN32
#define snprintf _snprintf
#if (_MSC_VER <= 1800)
#define snprintf _snprintf
#endif
#endif


Expand Down
1 change: 1 addition & 0 deletions src/Win32_Interop/Win32_FDAPI.h
Expand Up @@ -37,6 +37,7 @@ typedef unsigned long nfds_t;
#include <WinSock2.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/stat.h>

// Including a version of this file modified to eliminate prototype
// definitions not removed by INCL_WINSOCK_API_PROTOTYPES
Expand Down
3 changes: 3 additions & 0 deletions src/Win32_Interop/Win32_Time.h
Expand Up @@ -25,6 +25,9 @@
#ifndef WIN32_INTEROP_TIME_H
#define WIN32_INTEROP_TIME_H

#if (_MSC_VER > 1800)
#include <corecrt.h>
#endif
#include <stdint.h>

#define gettimeofday gettimeofday_highres
Expand Down
2 changes: 1 addition & 1 deletion src/redis.h
Expand Up @@ -1087,7 +1087,7 @@ void freeClientsInAsyncFreeQueue(void);
void asyncCloseClientOnOutputBufferLimitReached(redisClient *c);
int getClientType(redisClient *c);
int getClientTypeByName(char *name);
char *getClientTypeName(int class);
char *getClientTypeName(int IF_WIN32(_class,class));
void flushSlavesOutputBuffers(void);
void disconnectSlaves(void);
int listenToPort(int port, int *fds, int *count);
Expand Down

0 comments on commit aa25356

Please sign in to comment.