Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6c05fbc26dd4d4801ff3578cb887076929fc7493
Ticket: 219008ffffffffffffffffffffffffffffffffff
tclUnixChan.c mixes signed and unsigned
User & Date: nobody on 2000-10-26 01:09:15
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 3878 Bug
    Version: 8.0.5
    SubmitDate: '1999-12-14'
    LastModified: '2000-01-24'
    Severity: LOW
    Status: Released
    Submitter: techsupp
    ChangedBy: hobbs
    OS: BSD
    OSVersion: netbsd
    Machine: Tera MTX
    FixedDate: '2000-01-24'
    FixedInVersion: 8.3
    ClosedDate: '2000-10-25'
    
    
    Name: Robert R. Henry
    
    
    
    ObservedBehavior:
    
    tclUnixChan.c contains the test
    
    if (addr.s_addr == -1) {
    
    on a netbsd port, where sizeof(int)==8, sizeof(short)==4,
    
    sizeof(addr.s_addr)==4, this comparision results in a test
    
    ofa 32 bit unsigned (s_addr) with a 64 bit signed number,
    
    and the comparision always fails.
    
    
    
    DesiredBehavior:
    
    The value -1 should be type cast to the same type as s_addr;
    
    or a manifest constant should be used for the value -1 (broadcast mask);
    
    or the explicit constant 0xffffffff should be used;
    
    
    
    
    
    In 8.3.0, the '-1' was changed to '0xFFFFFFFFFFFFFFFF', which will
    be -1 for 32 or 64 bits. 
    -- 01/23/2000 hobbs
    Wrong fix.  The intention was to make it be 32 bits at all times.
    The constant was changed to 0xFFFFFFFF (-1 for 32 bits). 
    -- 01/24/2000 hobbs
    
  4. foundin changed to: "final: 8.0.5"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "tclUnixChan.c mixes signed and unsigned"
  11. type changed to: "Bug"