Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6cba79031e2584770572312e44680813790c829a
Ticket: 1911102fffffffffffffffffffffffffffffffff
tclUnixPort.h MODULE_SCOPE compile error
User & Date: lvirden on 2008-03-10 14:30:34
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Over the past couple of weeks, I've been working on trying to get the expect cvs head to compile. It generates a compile error. At first, I just assumed there was a problem in expect.
    
    Today, I'm not so certain.
    
    The expect cvs head, built against the Tcl 8.5b1 cvs head, says this:
    
    cc -DPACKAGE_NAME=\"expect\" -DPACKAGE_TARNAME=\"expect\" -DPACKAGE_VERSION=\"5.
    44.1.5\" -DPACKAGE_STRING=\"expect\ 5.44.1.5\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_H
    EADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRIN
    G_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_UNISTD_H=1
     -DWORDS_BIGENDIAN=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1
     -D_REENTRANT=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -D
    _REENTRANT=1 -D_POSIX_PTHREAD_SEMANTICS=1 -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STU
    BS=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_SYSMACROS_H=1 -DHAVE_VARARGS_H=1 -DHAVE_STROPT
    S_H=1 -DHAVE_SYSCONF_H=1 -DHAVE_SYS_FCNTL_H=1 -DHAVE_SYS_PTEM_H=1 -DHAVE_STRREDI
    R_H=1 -DRETSIGTYPE=void -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME
    =1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_TIMEZONE_VAR=1 -DNO_UNION_WAIT=
    1 -DSOLARIS=1 -DHAVE_MEMMOVE=1 -DHAVE_SYSCONF=1 -DHAVE_STRFTIME=1 -DHAVE_STRCHR=
    1 -DHAVE_TIMEZONE=1 -DHAVE_SIGLONGJMP=1 -DHAVE_MEMCPY=1 -DWNOHANG_BACKUP_VALUE=6
    4 -DSELECT_MASK_TYPE=fd_set -DREARM_SIG=1 -DHAVE_PTMX=1 -DHAVE_TCSETATTR=1 -DPOS
    IX=1 -DHAVE_SGTTYB=1 -DHAVE_TERMIO=1 -DHAVE_TERMIOS=1 -DHAVE_TCGETS_OR_TCGETA_IN
    _TERMIOS_H=1 -DHAVE_TIOCGWINSZ_IN_TERMIOS_H=1 -DSETPGRP_VOID=1 -DHAVE_SV_TIMEZON
    E=1 -DHAVE_LONG_FILE_NAMES=1  -DTCL_DEBUGGER -DUSE_NON_CONST -DSCRIPTDIR=\"/proj
    ects/sprs_lwv/tcl85/lib/expect5.44.1.5\" -DEXECSCRIPTDIR=\"/projects/sprs_lwv/tc
    l85/lib/expect5.44.1.5\" -DSTTY_BIN=\"/bin/stty\" -DDFLT_STTY="\"sane\"" -I. -I"
    .." -I"/vol/tclsrcsol/tcl85/tcl/generic" -I"/vol/tclsrcsol/tcl85/tcl/unix" -I"/p
    rojects/sprs_lwv/tcl85/include"    -xarch=v9   -KPIC -c `echo ../exp_tty.c` -o e
    xp_tty.o
    "/vol/tclsrcsol/tcl85/tcl/unix/tclUnixPort.h", line 112: warning: old-style decl
    aration or incorrect type for: MODULE_SCOPE
    "/vol/tclsrcsol/tcl85/tcl/unix/tclUnixPort.h", line 112: syntax error before or 
    at: int
    cc: acomp failed for ../exp_tty.c
    gmake: *** [exp_tty.o] Error 2
    
    
    When I look in exp_tty.c, I don't see any references to MODULE_SCOPE (and in fact, the error doesn't claim there were any - it specifically mentions tclUnixPort.h.
    
    So, I look at that file, and here's what I see:
    
    At line 112, I see the line:
    
    MODULE_SCOPE int TclUnixSetBlockingMode(int fd, int mode);
    This is the first reference to MODULE_SCOPE.
    
    Then, at line 626, I see:
    #ifndef MODULE_SCOPE
    #define MODULE_SCOPE extern
    #endif
    
    It seems, to me, these 3 lines should appear before line 112, shouldn't they?  Or else that line should move down to this point...
    
  4. foundin changed to: "obsolete: 8.5.2"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "lvirden"
  10. subsystem changed to: "52. Portability Support"
  11. title changed to: "tcolUnixPort.h header file pecularity"
  12. type changed to: "Bug"