Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f5beab9fb33dd6020aa9ac0188a5c9cc9533fed2
Ticket: 219085ffffffffffffffffffffffffffffffffff
tclUnixThrd.c won't compile under AIX 4.3.3 with -DTCL_THREA
User & Date: nobody on 2000-10-26 01:10:27
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 5254 Bug
    Version: 8.3
    SubmitDate: '2000-04-25'
    LastModified: '2000-04-25'
    Severity: MED
    Status: Released
    Submitter: techsupp
    ChangedBy: hobbs
    OS: AIX
    OSVersion: AIX 4.3.3
    FixedDate: '2000-04-25'
    FixedInVersion: 8.3.1
    ClosedDate: '2000-10-25'
    
    
    Name:
    Valdis Kletnieks
    
    CVS:
    SCCS:  @(#) tclUnixThrd.c 1.18 98/02/19 14:24:12
    
    Comments:
    The provided patch is *KNOWN SUBOPTIMAL*.  It got me a working compile,
        but should almost certainly be handled in another way.  A quick check of
        Solaris 2.6 and 2.7 show two different definitions of
        PTHREAD_MUTEX_INITIALIZER, but they both have the {} as well, and thus
        probably
        would encounter a problem.
    
    ReproducibleScript:
    The AIX 4.3.3 /usr/include/pthread.h file defines PTHREAD_MUTEX_INITIALIZER with a pair of {} already attached (which is needed to delimite the substructure in the PTHREAD_RWLOCK_INITIALIZER define further down).  When tclUnixThrd.c uses it with its own {},
    the IBM xlc compiler complains about the number of initializers (which is correct - {1,2,3} is different from {{1,2,3}}.
    
    ObservedBehavior:
    Failure to compile cleanly
    
    DesiredBehavior:
    A correct compile
    
    Patch:
    *** unix/tclUnixThrd.c.dist     Wed Apr 12 16:47:56 2000
    --- unix/tclUnixThrd.c  Fri Apr 21 14:30:42 2000
    ***************
    *** 26,32 ****
    --- 26,36 ----
       * initialize the mutex.
       */
    
    + #ifdef _AIX
    + static pthread_mutex_t masterLock = PTHREAD_MUTEX_INITIALIZER;
    + #else
      static pthread_mutex_t masterLock = {PTHREAD_MUTEX_INITIALIZER};
    + #endif
    
      /*
       * initLock is used to serialize initialization and finalization
    ***************
    *** 33,39 ****
    --- 37,47 ----
       * of Tcl.  It cannot use any dyamically allocated storage.
       */
    
    + #ifdef _AIX
    + static pthread_mutex_t initLock = PTHREAD_MUTEX_INITIALIZER;
    + #else
      static pthread_mutex_t initLock = {PTHREAD_MUTEX_INITIALIZER};
    + #endif
    
      /*
       * allocLock is used by Tcl's version of malloc for synchronization.
    ***************
    *** 40,46 ****
    --- 48,58 ----
       * For obvious reasons, cannot use any dyamically allocated storage.
       */
    
    + #ifdef _AIX
    + static pthread_mutex_t allocLock = PTHREAD_MUTEX_INITIALIZER;
    + #else
      static pthread_mutex_t allocLock = {PTHREAD_MUTEX_INITIALIZER};
    + #endif
      static pthread_mutex_t *allocLockPtr = &allocLock;
    
      /*
    
    PatchFiles:
    tclUnixThrd.c
    
    
    
    Fixed in 8.3.1.  Those braces weren't correct for Solaris (x86
    and Sparc) or Linux either. 
    -- 04/25/2000 hobbs
    
  4. foundin changed to: "obsolete: 8.3"
  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: "49. Threading"
  10. title changed to:
    tclUnixThrd.c won't compile under AIX 4.3.3 with -DTCL_THREA
    
  11. type changed to: "Bug"