Skip to content

Introduce support for building on MinGW/Cygwin systems#51

Merged
etr merged 5 commits intoetr:masterfrom
InBetweenNames:master
Jun 23, 2014
Merged

Introduce support for building on MinGW/Cygwin systems#51
etr merged 5 commits intoetr:masterfrom
InBetweenNames:master

Conversation

@InBetweenNames
Copy link
Copy Markdown
Contributor

All testcases pass!

$ ./basic.exe
Running test (1): two_endpoints

  • Time spent during "two_endpoints": 4.003
    Running test (2): read_body
  • Time spent during "read_body": 0
    Running test (3): read_long_body
  • Time spent during "read_long_body": 0.999
    Running test (4): read_header
  • Time spent during "read_header": 1.014
    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
  • Time spent during "postprocessor": 1.001
    Running test (8): empty_arg
  • Time spent during "empty_arg": 1
    ** 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.

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.
@InBetweenNames
Copy link
Copy Markdown
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
@etr
Copy link
Copy Markdown
Owner

etr commented Jun 23, 2014

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
@etr etr merged commit 68f00fc into etr:master Jun 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants