Skip to content
Tcl Source Code View Ticket
Login

View Ticket

tclDecls.h won't compile on SunOS

Closed / Invalid217859ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:44:59
OriginalBugID: 2007 Bug
Version: 8.1
SubmitDate: '1999-05-07'
LastModified: '1999-10-21'
Severity: CRIT
Status: Closed
Submitter: pat
ChangedBy: hobbs
RelatedBugIDs: 1962
OS: SunOS
OSVersion: 4.1.3_U1
Machine: Sparc
FixedDate: '2000-10-25'
ClosedDate: '1999-10-21'


Name:
Fred Roeber

Extensions:
TK 8.1, TCL-DP 4.0.2

CustomShell:
None

ReproducibleScript:
I ran configure on a SunOS machine and then went to compile TCL 8.1. The
    compile immediately failed with the error:
    gcc -pipe -c -O -Wall -Wconversion   -I../../generic -I..
    -DHAVE_GETCWD=1 -DNO_STRERROR=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1
    -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1
    -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1
    -DHAVE_ST_BLKSIZE=1 -DNO_MEMMOVE=1 -DSTDC_HEADERS=1 -DNEED_MATHERR=1
    -DRETSIGTYPE=void -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1
    -DHAVE_SYS_FILIO_H=1 -DUSE_FIONBIO=1          -DTCL_SHLIB_EXT=\".so\"
    ../../generic/regcomp.c
    In file included from ../../generic/tcl.h:1521,
                     from ../../generic/tclInt.h:33,
                     from ../../generic/regcustom.h:2,
                     from ../../generic/regguts.h:12,
                     from ../../generic/regcomp.c:6:
    ../../generic/tclDecls.h:1073: parse error before `size_t'
    ../../generic/tclDecls.h:1514: parse error before `size_t'

    This error shows up in any source file that includes tclDecls.h

ObservedBehavior:
Can't compile TCL 8.1 due to incorrect include file ordering. I am using
    gcc 2.8.1. I could compile TCL 8.0.4 on the same machine with the same
    compiler.

DesiredBehavior:
I expect to be able to compile TCL to be able to support programs
    running on SunOS.

Patch:
I simply removed the declaration for the Tcl_UniCharNcmp function in the tcl.decls file and redid "make genstubs" to get a new version of tclDecls.h. I couldn't figure out how to "really" fix things so that size_t would be valid in tclDecls.h due to the convoluted include file ordering rules in TCL. I did note that definitions included in tclIntDecls.h could refer to size_t with no problem. I also noted that the definition of Tcl_UniCharNcmp should have refered to CONST instead of const for consistency with the other code.

After making this fix, I could compile TCL 8.1 and TK 8.1 on SunOS (as well as Solaris and Windows/NT). It doesn't seem that anyone references the Tcl_UniCharNcmp function yet.

PatchFiles:
tcl.decls
welch Closed ticket [217859ffff]. [History diff]2000-10-26 07:59:48
dgp Ticket [217859ffff]: 3 changes [History diff]2001-04-13 23:30:55
Log in (anonymous is fine) to add a comment.