Windows: MinGW fixes and Windows Travis builders - #663
Conversation
|
Apologies for being impatient, but any chance of this PR getting reviewed anytime soon? It would be good to get it into master to get better Travis checks for Windows PR:s. @mnunberg ? |
| #include <stddef.h> | ||
|
|
||
| #ifdef _MSC_VER | ||
| typedef signed long ssize_t; |
There was a problem hiding this comment.
How so? _MSC_VER is defined for all versions of the Microsoft Visual C++ compiler (and _WIN32 is defined for both 32-bit and 64-bit Windows).
There was a problem hiding this comment.
By the way: Both the new travis builders (MinGW and MSVC) do 64-bit builds.
There was a problem hiding this comment.
nvm, i forgot that long becomes 64 bits on 64 bit platforms.
| @@ -34,7 +34,7 @@ | |||
| #define __SDS_H | |||
There was a problem hiding this comment.
I think we pull sds directly from redis upstream.. so this might get overwritten at a later point in time.
There was a problem hiding this comment.
AFAICT the source for sds has already diverged from the upstream version (due to previous hiredis patches). This patch merely fixes regressions due to earlier patches.
Going forward it would be good to sync with/upstream to redis.
|
I'll try to rebase the branch and fix any conflicts... |
Use _MSC_VER (instead of _WIN32) for things that are specific for Visual Studio. Also remove #include <winsock2.h> from hiredis.h, as it leaks too many symbols and defines into the global namespace, which is undesirable for a public interface header. Anyone who uses the the affected parts of the hiredis API needs to include the appropriate headers anyway in order to declare struct timeval variables.
6efa644 to
bbbafc5
Compare
|
@mnunberg I've rebased and all Travis-CI checks passed. |
Unfortunately the MSVC fixes in #658 broke MinGW builds (mainly due to using
_WIN32instead of_MSC_VERwhen checking if the compiler is MS Visual Studio).The ifdef-logic has been cleaned up slightly to support both MSVC and MinGW (and possibly Clang etc too).
In addition, a couple of Travis build steps are added that should catch future breakage of the MinGW and MSVC support.