]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[BUILD] add support for build under Cygwin
authorYitzhak Sapir <yitzhak@dcftech.com>
Sun, 14 Jun 2009 16:27:54 +0000 (18:27 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 14 Jul 2009 18:14:54 +0000 (20:14 +0200)
commitde5ba00c9a79a50f53229e6bd4bb34a2344be053
tree3c5bd0f43a45fdef4bcf3cc007bd1d35b5047438
parent16401e816202ad3915424a1ce1b514c0117cc85d
[BUILD] add support for build under Cygwin

After considering various possibilities, we compiled haproxy under cygwin.
Attached is an updated full diff that also has the TARGET=cygwin documented.
The whole thing compiles and installs with this diff only.

In cygwin 1.7 (now in beta), there is apparently support for ipv6.  Cygwin
1.5 (later versions, anyway) already includes some support in the form of a
define USE_IPV6.  When defined, it declares the sockaddr_in6 struct and
possibly other things.  The above definition AF_INET6=23 is taken from
their /usr/include/socket.h file (where it is #if 0'd out).

We are running into a socket limit.  It appears that Cygwin (running on
Windows 2003 Server) will only allow us to set ulimit -n (maximum open
files) to 3200, which means we're a little short of 1600 connections.

The limit of 3200 is an internal Cygwin limit.  Perhaps they can raise it in
the future.  Using the nbproc option, I was able to bring up 10 servers.  It
seems to me that they were able to handle over 2000 connections (even though
each had maxconn 1500 set, and the hard Cygwin fd limit).
(cherry picked from commit 32087312e3a4ad483440d371b0b1769db23946d3)
Makefile
README