Skip Menu |
 

This queue is for tickets about the Tcl CPAN distribution.

Report information
The Basics
Id: 25822
Status: resolved
Priority: 0/
Queue: Tcl

People
Owner: Nobody in particular
Requestors: jdhedden [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.91
Fixed in: 0.95



Subject: Tcl on Cygwin
Download (untitled) / with headers
text/plain 328b
Guess I'm the first to try your module under Cygwin. The attached patch contains 3 changes: 1. Makefile.PL uses tclConfig.sh under Cygwin. 2. Uses INT2PTR in Tcl.xs to silence a few compiler warnings. 3. Works around an apparent deficiency in canonpath() for Cygwin in info.t. Looking forward to using your module. Thanks.
Subject: tcl.patch
Download tcl.patch
text/x-diff 2.2k
diff -urN Tcl-0.91/Makefile.PL Tcl-patched/Makefile.PL --- Tcl-0.91/Makefile.PL 2006-11-13 12:19:00.000000000 -0500 +++ Tcl-patched/Makefile.PL 2007-03-26 10:52:36.000000000 -0400 @@ -42,6 +42,8 @@ $arch = "$^O-i686" if ($Config{archname} =~ /i\d86/); $arch = "$^O-ia64" if ($Config{archname} =~ /ia64/i); $arch = "$^O-x86_64" if ($Config{archname} =~ /x86_64/); +} elsif ($^O eq "cygwin") { + $tclconfig = '/usr/lib/tclConfig.sh'; } GetOptions("tclsh=s", \$tclsh, # Use this tclsh executable as a diff -urN Tcl-0.91/Tcl.xs Tcl-patched/Tcl.xs --- Tcl-0.91/Tcl.xs 2006-11-03 13:35:56.000000000 -0400 +++ Tcl-patched/Tcl.xs 2007-03-26 11:01:26.000000000 -0400 @@ -1468,8 +1468,8 @@ CODE: if (!initialized) { return; } if (SvIOK(cmdProc)) - Tcl_CreateCommand(interp, cmdName, (Tcl_CmdProc *) SvIV(cmdProc), - (ClientData) SvIV(clientData), NULL); + Tcl_CreateCommand(interp, cmdName, INT2PTR(Tcl_CmdProc *, SvIV(cmdProc)), + INT2PTR(ClientData, SvIV(clientData)), NULL); else { AV *av = (AV *) SvREFCNT_inc((SV *) newAV()); av_store(av, 0, newSVsv(cmdProc)); @@ -1662,7 +1662,7 @@ sv = *av_fetch(av, 0, FALSE); if (sv_derived_from(sv, "Tcl")) { IV tmp = SvIV((SV *) SvRV(sv)); - interp = (Tcl) tmp; + interp = INT2PTR(Tcl, tmp); } else { croak("bad object passed to Tcl::Var::FETCH"); @@ -1696,7 +1696,7 @@ sv = *av_fetch(av, 0, FALSE); if (sv_derived_from(sv, "Tcl")) { IV tmp = SvIV((SV *) SvRV(sv)); - interp = (Tcl) tmp; + interp = INT2PTR(Tcl, tmp); } else croak("bad object passed to Tcl::Var::STORE"); diff -urN Tcl-0.91/t/info.t Tcl-patched/t/info.t --- Tcl-0.91/t/info.t 2004-12-30 20:05:04.000000000 -0500 +++ Tcl-patched/t/info.t 2007-03-26 11:21:56.000000000 -0400 @@ -11,7 +11,14 @@ my $tcl = Tcl->new; ok($tcl); -ok(canonpath($tcl->Eval("info nameofexecutable")), canonpath($^X)); +if ($^O eq 'cygwin') { + my $cpath = $tcl->Eval("info nameofexecutable"); + $cpath = `cygpath -u '$cpath'`; + chomp($cpath); + ok($cpath, canonpath($^X)); +} else { + ok(canonpath($tcl->Eval("info nameofexecutable")), canonpath($^X)); +} ok($tcl->Eval("info exists tcl_platform"), 1); my $tclversion = $tcl->Eval("info tclversion");
Download (untitled) / with headers
text/plain 516b
On Mon Mar 26 17:46:42 2007, JDHEDDEN wrote: Show quoted text
> Guess I'm the first to try your module under Cygwin. > The attached patch contains 3 changes: > > 1. Makefile.PL uses tclConfig.sh under Cygwin. > 2. Uses INT2PTR in Tcl.xs to silence a few compiler warnings. > 3. Works around an apparent deficiency in canonpath() for Cygwin in info.t. > > Looking forward to using your module. Thanks.
This patch was merged in May 2011 and was included in the 0.95 release of this module; this ticket can therefore be closed.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.