Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8677bb0b6aaf0a4ec6d754476462ade70c21404f8f69775f2d693aa042c107ac
Ticket: da235271f1e5c582eb54a93a893a85c2cbe2b76c
[info hostname] on Windows is limited to max NetBIOS name length
User & Date: anonymous on 2020-02-21 17:27:04
Changes

  1. icomment:
    Sorry, I don't know how to view the patches you have created -- I tried looking in
    https://core.tcl-lang.org/tcl/brlist but I couldn't find them.
    
    In any case, I think GetComputerNameExW is the right method to use, and it should 
    try DNS first and then NetBIOS.  The entire problem here is that Tcl is preferring 
    the NetBIOS name instead of the DNS name.  I'm not even sure it's possible to get 
    a name longer than 15 characters from NetBIOS -- that is, I don't know if that is 
    a limit inherent to NetBIOS or if that is "just" a limit of GetComputerNameW.  It 
    seems best therefore to default to the DNS name, and only try for the NetBIOS name 
    if there is no DNS name.
    
    - emelski
    
  2. login: "anonymous"
  3. mimetype: "text/plain"