Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 393ce3ef7d0632988475e58f279bf3dc190990ae
Ticket: 217823ffffffffffffffffffffffffffffffffff
FileSeekProc fails to return error code
User & Date: nobody on 2000-10-26 00:44:22
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 1491 Bug
    Version: 8.1b1
    SubmitDate: '1999-03-11'
    LastModified: '1999-04-05'
    Severity: MED
    Status: Closed
    Submitter: pat
    ChangedBy: stanton
    RelatedBugIDs: 1477
    OS: Other
    Machine: NA
    FixedDate: '2000-10-25'
    ClosedDate: '1999-04-05'
    
    
    Name:
    Don Porter
    
    CVS:
    tclWinChan.c,v 1.1.2.4 1999/02/26
    
    Patch:
    Index: tclWinChan.c
    ===================================================================
    RCS file: /cvsroot/tcl/win/tclWinChan.c,v
    retrieving revision 1.1.2.4
    diff -c -r1.1.2.4 tclWinChan.c
    *** tclWinChan.c1999/02/26 02:19:231.1.2.4
    --- tclWinChan.c1999/03/09 20:11:26
    ***************
    *** 443,448 ****
    --- 443,449 ----
          newPos = SetFilePointer(infoPtr->handle, offset, NULL, moveMethod);
          if (newPos == 0xFFFFFFFF) {
              TclWinConvertError(GetLastError());
    +         *errorCodePtr = errno;
              return -1;
          }
          return newPos;
    
    
    
    
    PatchFiles:
        tclWinChan.c
        
    
    
    
    
    
        FileSeekProc doesn't set *errorCodePtr to a Posix error code
        as the documentation in Tcl_CreateChannel(3) specifies.  This
        patch corrects the error.
        
        NB 1: This patch assumes that when SetFilePointer() is called
        on a handle to a nonseeking device, it will fail and the next
        call to GetLastError() will return an error which gets converted
        to EINVAL.   If that is not true, further patching is needed.
        
        NB 2: The same bug is present in Tcl 8.0.x .  I'm submitting only
        one patch.
        
        03/11/1999 13:26 - pat -duplicate of bug 1477
    
    
  4. foundin changed to: "obsolete: 8.1b1"
  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: "FileSeekProc fails to return error code"
  11. type changed to: "Bug"