Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8219c894aa4744b46c991bedbfd9c0c0690b40d6
Ticket: 3280043fffffffffffffffffffffffffffffffff
win2k: unresolved DLL imports
User & Date: stankok on 2011-04-08 00:24:24
Changes

  1. assignee changed to: "mdejong"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Functions getaddrinfo(), getnameinfo() and freeaddrinfo() were introduced in winXP, and are not present on win2k. 
    Tcl relies on these functions in files generic/tclIOSock.c and generic/tclIOSock.c, resulting in unresolved imports from ws2_32.dll (see screenshot). 
    
    The fix is to include header "wspiapi.h". Read section titled "Support for XXX on earlier versions of Windows" at the bottom of articles: 
    getaddrinfo: http://msdn.microsoft.com/en-us/library/ms738520%28v=vs.85%29.aspx
    getnameinfo: http://msdn.microsoft.com/en-us/library/ms738532%28v=vs.85%29.aspx
    freeaddrinfo: http://msdn.microsoft.com/en-us/library/ms737931%28v=vs.85%29.aspx
    
    Patch is trivial, but here it is:
    diff -r orig/generic/tclIOSock.c src/generic/tclIOSock.c
    15a16,19
    > #if defined(_WIN32)
    > #include <wspiapi.h>
    > #endif
    > 
    diff -r orig/win/tclWinSock.c src/win/tclWinSock.c
    51a52,53
    > #include <wspiapi.h>
    > 
    
    
  4. foundin changed to: "obsolete: 8.6b1.1"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "stankok"
  10. subsystem changed to: "52. Portability Support"
  11. title changed to: "win2k: unresolved DLL imports"
  12. type changed to: "Bug"