Porting software from OpenBSD to Windows
Just committed the bits for Unworkable to build under Windows, using Cygwin. The code changes were pretty minimal – specifically, Cygwin lacks getaddrinfo() – however this was a relatively simple matter of bundling the KAME implementation (which is BSD licensed) in the source tree and building and linking with that if it wasn’t found. The other issue was that Cygwin doesn’t implement the madvise() function – this isn’t strictly necessary, its just supposed to give some hints to the OS VM – so I could safely #ifdef it out on Cygwin.
More difficult was getting SCons to work properly under Cygwin. Don’t bother trying to use the Windows package on their website, simply install Python through Cygwin, download the SCons source, and build and install it yourself manually. Then it will work fine.
Cygwin is a good starting point. Now to see about getting it to build as a native win32 app under MingW or even MS Visual Studio. Fortunately libevent appears to already build natively under Windows, and I’d imagine OpenSSL does too – so it shouldn’t be a horrendous amount of work.







Recent Comments