Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2007-04-22
05:43 • Closed ticket [1387154fff]: Workaround for Cygwin timezone incompatibility p... artifact: 286d5c037b user: kennykb
2005-12-23
22:11 • Ticket [1387154fff]: 4 changes artifact: 43c8a689c5 user: kennykb
2005-12-21
22:23 • Ticket [1387154fff]: 1 change artifact: 413522d2b8 user: dkf
21:41 • Ticket [1387154fff]: 4 changes artifact: a35e8b288c user: nobody
21:41 • Add attachment diffs to ticket [1387154fff] artifact: f132776d13 user: nobody
14:41 • New ticket [1387154fff] Workaround for Cygwin timezone incompatibility. artifact: 66fedb9179 user: nobody

Workaround for Cygwin timezone incompatibility

Closed / Accepted1387154fffffffffffffffffffffffffffffffffCreated 21 years agoUpdated 20 years ago
Descriptionplain2005-12-21 14:41:40
From: [email protected]

Cygwin has an external variable called _timezone
instead of timezone, with a type of long instead of int.

To reproduce the problem, attempt to build tclsh from
source (tcl8.4.12) on Cygwin using gcc. My version of
Cygwin (according to uname -a):

CYGWIN_NT-5.1 frb3250bd1 1.5.18(0.132/4/2) 2005-07-02
20:30 i686 unknown unknown Cygwin

My version of gcc:

gcc (GCC) 3.4.4 (cygming special) (gdc 0.12, using dmd
0.125)

My configuration command was

./configure \
    --prefix=$HOME \
    --bindir=$HOME/bin/i386/cygwin \
    --sbindir=$HOME/bin/i386/cygwin \
    --libexecdir=$HOME/lib/i386/cygwin \
    --libdir=$HOME/lib/i386/cygwin \
    --program-suffix=.exe

but I believe the problem is independent of the
specific configuration.

gcc then fails to compile generic/tclClock.c, giving
these error messages (slightly abbreviated):

../generic/tclClock.c: In function `FormatClock':
../generic/tclClock.c:314: warning: assignment makes
integer from pointer without a cast
../generic/tclClock.c:315: error: invalid lvalue in
assignment
../generic/tclClock.c:360: error: invalid lvalue in
assignment

This is a workaround which just defines timezone as
_timezone and introduces a TIMEZONE_t type, which is
long for Cygwin and int everywhere else.
nobodyplain2005-12-21 21:41:41
File Added - 160686: diffs
dkf Ticket [1387154fff]: 1 change [History diff]2005-12-21 22:23:40
kennykbplain2005-12-23 22:11:19
Logged In: YES 
user_id=99768

Uhm, which configurator am I supposed to use in this exercise?

unix/configure or win/configure?

Oh my, am I glad this code isn't in the HEAD.  :)
kennykb Closed ticket [1387154fff]. [History diff]2007-04-22 05:43:00
Log in (anonymous is fine) to add a comment.

Attachments: