Introduce support for building on MinGW/Cygwin systems#51
Merged
etr merged 5 commits intoetr:masterfrom Jun 23, 2014
Merged
Conversation
… about forward compatibility
This patch modifies the build to properly handle MinGW/Cygwin hosts and adds support for Windows sockets in the source. This was achieved by using MHD_socket as the socket datatype where necessary, which is guaranteed to resolve to SOCKET on windows and int on unix systems, preserving old functionality while adding new. Some internal functions were modified to accomodate the change, namely those that implictly converted sockets to ints (which would have caused problems on x86_64 windows, as those are 8 byte unsigned) All test cases pass with MSYS2/MinGW compiler.
Contributor
Author
|
You will need libmicrohttpd-0.9.37 to build this, as 0.9.26 doesn't define MHD_socket. Also, to build on MSYS2/MinGW, the libgnurx package should be installed for regex.h support. |
…HD_socket, this time being in the API. MHD_socket is int on unix systems, so this change shouldn't break any existing code
Owner
|
Great. Looks good to me! |
etr
pushed a commit
that referenced
this pull request
Jun 23, 2014
Introduce support for building on MinGW/Cygwin systems
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All testcases pass!
$ ./basic.exe
Running test (1): two_endpoints
Running test (2): read_body
Running test (3): read_long_body
Running test (4): read_header
Running test (5): complete
OKOKOKOKOK- Time spent during "complete": 2.991
Running test (6): only_render
OKOKOKOKMethod not AcceptableOK- Time spent during "only_render": 3.002
Running test (7): postprocessor
Running test (8): empty_arg
** Runner terminated! **
8 tests executed
25 checks
-> 25 successes
-> 0 failures
Total run time: 15.001
Total time spent in tests: 14.01 ms
Average set up time: 0.110111 ms
Average tear down time: 0 ms
This patch brought to you by Dr. Robert Kent's research group at the University of Windsor.