Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 956cb386f9b94acdd2d44ea7c320bf73e7bcca1d
Ticket: 474335ffffffffffffffffffffffffffffffffff
logic of matherr is backwards
User & Date: jenglish on 2002-01-16 09:21:46
Changes

  1. icomment:
    Logged In: YES 
    user_id=68433
    
    On the Unices that I have available, 'matherr()' is only
    used  if you statically  link against a special library
    instead of the default -lm (IRIX: -lmx; AIX: -lmsaa; Linux
    (RH 6.2, 7.0,7.1,7.2, SuSE 6.2): apparently not supported). 
    
    A google search shows that matherr is supported on HP-UX and
    a few others, but the default behaviour (set errno and
    continue) is exactly the same as  what's in
    unix/tclMtherr.c, so the latter is redundant.
    
    It would appear that this is either unused or redundant on
    all Unix platforms, and can safely be removed (except for
    one problem, see below).
    
    In unix/tclAppInit.c the following should also be taken out:
    
    /* 
     * The following variable is a special hack that is needed
    in order for
     * Sun shared libraries to be used for Tcl.
     */
    extern int matherr();
    int *tclDummyMathPtr = (int *) matherr;
    
    This bit of code has been around since Tcl 7.4, but has long
    since been rendered obsolete by Stubs and newer versions of
    SunOS.
     
    The only problem with removing unix/tclMtherr.c is that all
    the custom tclsh's and wishes out there that have retained
    the tclDummyMathPtr definition for cargo-cult reasons will
    fail to link on platforms that don't have matherr().  It's
    an easy fix -- just get rid of the definition -- so this
    probably isn't much of an issue.
    
    
    
  2. login: "jenglish"
  3. mimetype: "text/plain"
  4. username: "jenglish"