[bind10-dev] Windows support status

Francis Dupont fdupont at isc.org
Fri Apr 22 14:26:08 UTC 2011


I first tried to build libraries as DLL but in fact the DLL idea is
very bound to C and is incompatible with C++, so I changed my mind
and built static libraries. Note if we create a C++ -> C wrapper
to use bind10 libraries from C, wrapped objects will be good
candidates for DLLs.

I tried libraries in (Unix makefile) order with associated unit
tests and python bindings. I use a WS 2008 platform (but it should
work on Vista, Windows 7 and WS 2008R2 too) with Visual Studio 2008
and Visual Studio C++ 2010 Express (i.e., the free version). I have
a Visual Studio 2005 too but I haven't used it yet.

There are some small porting issues (no stdint.h in VS 2008, no
gettimeofday(), etc) but until the cc library nothing hard to fix.

I found three building or runtime bugs which are in 836, 837 and 838
tickets with the fixes. Note they are real bugs so they should be fixed
anyway (i.e., independently of Windows).

I found two problems which can't be simply solved (so I stopped at
the cc library, I ported only exception and dns libraries):
 - the cc library uses local (aka PF_UNIX) sockets. The obvious fix
  is to moved to local TCP/IP sockets or to switch to something else,
  but this is not trivial and needs some coordination.
 - open socket file descriptors are transmitted using a PF_UNIX socket
  feature. This is highly not portable but the function can be
  performed another way on Windows so I proposed a two step plan:
   * offer as an alternative the use of /proc (note the idea is
   not to replace PF_UNIX, /proc is in fact less portable but
   its interface is very closed to the second step)
   * use WSADuplicateSocket() on Windows (the another way)

BTW I can't see a good reason to include session_config.h in session.h,
if someone agrees (s)he should open a ticket to remove this #include
(BTW session_config.h is included by session.cc too so included twice
at the only place it is used...). My idea is to skip the cc library,
other things won't built as they depend on it but the porting effort
could continue.

I got a lot of warnings, I collected them so they are available to
the warning cleanup team (:-) in 858 attachments.

Regards

Francis Dupont <fdupont at isc.org>



More information about the bind10-dev mailing list