Subject: Watcom and ares_iphlpapi.h

Watcom and ares_iphlpapi.h

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Thu, 21 Jul 2011 20:17:04 +0200

I just did a Git commit of my diffs (using the TortoiseGit shell-extension in
WinExplorer). It seems to work well. But just to make sure, I repeat the whys
and commit-messages here.

The Watcom build seems to have fallen a bit behind since the introduction
of the ares_iphlpapi.h file. I had to make the following patches to make it
build:

ares_iphlpapi.h: Added "!defined(_WS2DEF_)" since Watcom doesn't have
  a per type guard for the typedefs 'CSADDR_INFO' (that MingW has) or
  'SOCKET_ADDRESS' (that MSVC has). But we can use the header-guard for
  <ws2def.h> instead.

Makefile.Watcom:
  * The 'NTDDI_VERSION' needs to be raised to 0x05010000
    in order for SOCKADDR_STORAGE etc. to be typedefed.
  * Replaced '-dUSE_WATT32' with '-dWATT32'.
  * Added $(DEMOS) to the 'all' target and removed the 'demos'
    target to be consistent with e.g. Makefile.msvc etc.
  * 'ENABLE_IPV6' is no longer used. Hence removed the '%use_ipv6' construct.
  * object-file order seems to be important (Watcom v.19). Hence 'ares_getopt.obj'
    must be put after the .obj that references getopt().

--gv
Received on 2011-07-21