Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
cdb836d5
Commit
cdb836d5
authored
Apr 13, 2019
by
jinjiazhang
Browse files
Fix Compile Error On Windows (Visual Studio)
parent
5aa2397f
Changes
4
Hide whitespace changes
Inline
Side-by-side
async.c
View file @
cdb836d5
...
...
@@ -32,7 +32,12 @@
#include "fmacros.h"
#include <stdlib.h>
#include <string.h>
#ifndef _WIN32
#include <strings.h>
#else
#define strcasecmp stricmp
#define strncasecmp strnicmp
#endif
#include <assert.h>
#include <ctype.h>
#include <errno.h>
...
...
hiredis.h
View file @
cdb836d5
...
...
@@ -35,7 +35,11 @@
#define __HIREDIS_H
#include "read.h"
#include <stdarg.h>
/* for va_list */
#ifndef _WIN32
#include <sys/time.h>
/* for struct timeval */
#else
#include <winsock2.h>
#endif
#include <stdint.h>
/* uintXX_t, etc */
#include "sds.h"
/* for sds */
...
...
sds.h
View file @
cdb836d5
...
...
@@ -34,6 +34,9 @@
#define __SDS_H
#define SDS_MAX_PREALLOC (1024*1024)
#ifdef _WIN32
#define __attribute__(x)
#endif
#include <sys/types.h>
#include <stdarg.h>
...
...
sockcompat.h
View file @
cdb836d5
...
...
@@ -50,6 +50,8 @@
#include <ws2tcpip.h>
#include <stddef.h>
typedef
signed
long
ssize_t
;
/* Emulate the parts of the BSD socket API that we need (override the winsock signatures). */
int
win32_getaddrinfo
(
const
char
*
node
,
const
char
*
service
,
const
struct
addrinfo
*
hints
,
struct
addrinfo
**
res
);
const
char
*
win32_gai_strerror
(
int
errcode
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment