• src/xpdev/netwrap.c

    From Rob Swindell (on Windows 11)@1:103/705 to Git commit to main/sbbs/master on Monday, July 27, 2026 02:09:08
    https://gitlab.synchro.net/main/sbbs/-/commit/0ed3f6b3f2b2827cb3ec6a03
    Modified Files:
    src/xpdev/netwrap.c
    Log Message:
    xpdev: an IPv6 address resolved to the local host's name

    xp_inet_pton() returns 1 on success, 0 when the string is numeric but not
    of the requested address family, and -1 when it doesn't parse at all. getHostNameByAddr() and isValidAddressString() tested for "not -1", so the
    0 case counted as success.

    That gave getHostNameByAddr() a wrong answer rather than no answer: an
    IPv6 argument took the IPv4 branch with sin_addr never written, and getnameinfo() on the resulting 0.0.0.0 succeeds, returning the local
    host's name. Every IPv6 address reverse-resolved to the local machine,
    the QWK message from_host stamp included.

    isValidAddressString() arrived at the right answer either way -- an IPv6
    string that returns 0 from the AF_INET call is accepted there, where the
    strict test accepts it from the AF_INET6 call instead -- and changes with
    it for the contract rather than the behavior.

    The comparison arrived with 775e87a614 (2026-03-21) in
    getHostNameByAddr(); isValidAddressString() predates it. The test harness
    keeps the const on the result it prints.

    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Windows 11)@1:103/705 to Git commit to main/sbbs/master on Tuesday, July 28, 2026 15:19:37
    https://gitlab.synchro.net/main/sbbs/-/commit/f4e6127b447885f4c04686ab
    Modified Files:
    src/xpdev/netwrap.c
    Log Message:
    xpdev: fix the Borland build of getNameServerList()

    Borland C++ Builder 6 broke on the Windows name-server enumeration added
    in 7eb6f7302b (2026-07-27):

    - Its iptypes.h predates GAA_FLAG_SKIP_FRIENDLY_NAME, stopping at
    GAA_FLAG_SKIP_DNS_SERVER; define the flag when the SDK lacks it.
    - bcc32 C-mode mis-parses "TYPEDEFNAME* ident = ..." in a for-init
    clause as a multiplication expression (E2108/E2451), so declare the
    adapter and DNS-server pointers ahead of their loops. Loop-scoped
    declarations of fundamental types ("for (unsigned i = 0; ...)") are
    accepted and remain in use elsewhere.

    src/xpdev is built with Borland make/bcc32 by the windows-x86 CI job, so
    this failed the whole Windows pipeline before MSBuild ever ran.

    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)