Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 87ceeee696765bd3a1bb4f32660b8b7e3d30e999
Ticket: 874058ffffffffffffffffffffffffffffffffff
wrong Tcl_StatBuf type with 64 HP Ansi C
User & Date: rwurth on 2004-01-09 21:19:18
Changes

  1. assignee changed to: "vincentdarley"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    When trying to build tcl on an HP system using HP's
    optional ANSI C compiler (the default compiler that
    comes with the system supports almost no features and
    is suitable only for recompiling kernel table
    declarations), many instances of the following error
    pairs occur for files unix/tclUnixFile.c and
    unix/tclUnixFCmd.c:  
    
    warning 604: Pointers are not assignment-compatible.
    warning 563: Argument #2 is not the correct type.
    
    
    In these files each calls to TclOSstat or TclOSlstat
    generates this pair of errors.  
    
    Examining the results after pre-processing, but before
    compiling reveals that the calls to Tcl_OSstat and
    Tcl_OSlstat are being mapped to native calls stat and
    lstat, respectively.  
    
    The function prototypes for both show a second argument
    of type (stat *).  The calling code passes an argument
    of type (Tcl_StatBuf *), which is a typedef for (struct
    stat64 *).  There are 2 subtle differences between the
    structures.  First, member st_size is off_t (a typedef
    for long), in stat, but off64_t, a typedef for
    int64_t,. which is a typedef for long.  This is
    probably not a problem because the names are the same
    and the base types are the same.  Secondly, where stat
    has member blckcnt_t, also of type off_t, stat64 has
    member blckcnt64_t, of type int64_t.  The base class is
    the same for both, but the names are different.  
    
    OS details (uname -a):  HP-UX urkel B.11.00 U 9000/800
    1552710528 unlimited-user license
    
    Compiler lines:  
    
    /usr/bin/cc -c -O -DTCL_DBGX=  +z -I./../generic -I.
    +DA2.0W -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\"
    -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
    -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1
    -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
    -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
    -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
    -DHAVE_UNISTD_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1
    -DTCL_CFGVAL_ENCODING=\"iso8859-1\"
    -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long
    -DHAVE_STRUCT_STAT64=1 -DHAVE_TYPE_OFF64_T=1
    -DWORDS_BIGENDIAN=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1
    -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1
    -DHAVE_WAITPID=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1
    -DHAVE_SYS_MODEM_H=1 -DUSE_TERMIOS=1
    -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 -DHAVE_STRUCT_STAT_ST_BLKSIZE=1
    -DHAVE_ST_BLKSIZE=1 -DNO_UNION_WAIT=1 -DNO_GETTOD=1
    -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1
    -D_XOPEN_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1
    -DTCL_CFG_DO64BIT=1 -DTCL_CFG_OPTIMIZED=1
    -DTCL_CFG_DEBUG=1 -DHAVE_SYS_IOCTL_H=1        
    -DTCL_SHLIB_EXT=\".sl\" ./../unix/tclUnixFCmd.c
    
    
    /usr/bin/cc -c -O -DTCL_DBGX=  +z -I./../generic -I.
    +DA2.0W -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\"
    -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
    -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1
    -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
    -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
    -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
    -DHAVE_UNISTD_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1
    -DTCL_CFGVAL_ENCODING=\"iso8859-1\"
    -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long
    -DHAVE_STRUCT_STAT64=1 -DHAVE_TYPE_OFF64_T=1
    -DWORDS_BIGENDIAN=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1
    -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1
    -DHAVE_WAITPID=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1
    -DHAVE_SYS_MODEM_H=1 -DUSE_TERMIOS=1
    -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 -DHAVE_STRUCT_STAT_ST_BLKSIZE=1
    -DHAVE_ST_BLKSIZE=1 -DNO_UNION_WAIT=1 -DNO_GETTOD=1
    -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1
    -D_XOPEN_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1
    -DTCL_CFG_DO64BIT=1 -DTCL_CFG_OPTIMIZED=1
    -DTCL_CFG_DEBUG=1 -DHAVE_SYS_IOCTL_H=1        
    -DTCL_SHLIB_EXT=\".sl\" ./../unix/tclUnixFile.c
    
    
    Config command line:  
    
    MAKE=gmake CC=/usr/bin/cc ./configure \
      --enable-shared \
      --enable-64bit \
      --prefix=/usr/local/tcl-X/tcl8.5 \
      --exec-prefix=/usr/local/tcl-X/tcl8.5
    
    config.log attached.  
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "rwurth"
  9. subsystem changed to: "37. File System"
  10. title changed to:
    HEAD (8.5) wrong Tcl_StatBuf type with 64 HP Ansi C
    
  11. type changed to: "Bug"