Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2004-04-07
20:44 • Closed ticket [927411ffff]: tclPort.h throws errors plus 7 other changes artifact: 1198fd5e1d user: dgp
05:49 • Open ticket [927411ffff]. artifact: a6359b4972 user: vincentdarley
05:40 • Pending ticket [927411ffff]. artifact: d554a519ee user: dgp
04:29 • Ticket [927411ffff]: 1 change artifact: 6827466bf5 user: dgp
2004-04-02
00:11 • Ticket [927411ffff]: 4 changes artifact: 541c5d7a1d user: dgp
2004-04-01
11:04 • New ticket [927411ffff]. artifact: f6c2d7ddbd user: vincentdarley

tclPort.h throws errors

Closed / Fixed927411ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 23 years ago
Descriptionplain2004-04-01 11:04:00
Trying to compile tclvfs on Windows against the latest
cvs head throws these errors:

../../cvs-tcl/generic\tclIntDecls.h(702) : error C2143:
syntax error : missing '
)' before '*'
../../cvs-tcl/generic\tclIntDecls.h(702) : error C2143:
syntax error : missing '
{' before '*'
../../cvs-tcl/generic\tclIntDecls.h(702) : error C2059:
syntax error : 'type'
../../cvs-tcl/generic\tclIntDecls.h(702) : error C2059:
syntax error : ')'
../../cvs-tcl/generic\tclIntDecls.h(1115) : error
C2143: syntax error : missing
')' before '*'
../../cvs-tcl/generic\tclIntDecls.h(1115) : error
C2143: syntax error : missing
';' before '*'
../../cvs-tcl/generic\tclIntDecls.h(1115) : error
C2059: syntax error : '*'
../../cvs-tcl/generic\tclIntDecls.h(1115) : error
C2059: syntax error : ')'
../../cvs-tcl/generic\tclIntDecls.h(1164) : error
C2059: syntax error : '}'
../../cvs-tcl/generic\tclIntDecls.h(1169) : error
C2143: syntax error : missing
'{' before '*'
C:\Progra~1\devstudio\vc\include\time.h(154) : warning
C4142: benign redefinitio
n of type
C:\Progra~1\devstudio\vc\include\time.h(154) : error
C2372: 'time' : redefinitio
n; different types of indirection
..\generic\vfs.c(963) : error C2223: left of
'->tclInExit' must point to struct/
union

This appears to be due to vfs.c doing this:

#include <tcl.h>
/* Required to access the 'stat' structure fields */
#include "tclPort.h"

If one adds a 

#include "tclInt.h"

in between those two includes, then the compilation
proceeds ok.

At the least this behaviour change should be documented
in the ChangeLog.
dgpplain2004-04-02 00:11:51
Logged In: YES 
user_id=80530


can you check whether the
patch attached to Feature
Request 922727 corrects
this?  (or makes it worse?)
dgp Ticket [927411ffff]: 1 change [History diff]2004-04-07 04:29:06
dgpplain2004-04-07 05:40:44
Logged In: YES 
user_id=80530


please check the HEAD again.
Patch 922727 may have corrected
this.
vincentdarleyplain2004-04-07 05:49:03
Logged In: YES 
user_id=32170

vfs.c still fails, but now with TclInExit not being defined.
I guess before that function was accessed through tclPort.h
somehow.

Finally, with the previous fix to vfs.c the code still works.

So, in some sense Tcl has still broken backwards
compatibility (but only for internal interfaces), and a
simple one-line source fix solves the issue.

(sorry for not checking this earlier -- I've been v. busy)
dgpplain2004-04-07 20:44:13
Logged In: YES 
user_id=80530

Yes, TclInExit() is in the internal
stubs table, so its declaration is
best access via

#include "tclInt.h"

Using that instead of

#include "tclPort.h"

should cover compatibility
with both the HEAD and older
Tcl releases.

Closing.  Re-open if there
are problems with that answer.
Thanks for testing.
Log in (anonymous is fine) to add a comment.