delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/01/19/13:13:56

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
From: CV <or254498 AT hotmail DOT com>
Subject: Re: FileRunner under cygwin - simple compilation - Success.
Date: Wed, 19 Jan 2005 18:13:07 +0000 (UTC)
Lines: 49
Message-ID: <loom.20050119T183501-250@post.gmane.org>
References: <loom DOT 20050118T142731-507 AT post DOT gmane DOT org> <Pine DOT GSO DOT 4 DOT 61 DOT 0501181010110 DOT 1614 AT slinky DOT cs DOT nyu DOT edu> <loom DOT 20050118T181653-835 AT post DOT gmane DOT org> <Pine DOT GSO DOT 4 DOT 61 DOT 0501181238270 DOT 2596 AT slinky DOT cs DOT nyu DOT edu> <loom DOT 20050119T002537-61 AT post DOT gmane DOT org> <Pine DOT GSO DOT 4 DOT 61 DOT 0501181952340 DOT 9964 AT slinky DOT cs DOT nyu DOT edu> <loom DOT 20050119T140548-969 AT post DOT gmane DOT org> <Pine DOT GSO DOT 4 DOT 61 DOT 0501191137150 DOT 17795 AT slinky DOT cs DOT nyu DOT edu>
Mime-Version: 1.0
X-Complaints-To: usenet AT sea DOT gmane DOT org
X-Gmane-NNTP-Posting-Host: main.gmane.org
User-Agent: Loom/3.14 (http://gmane.org/)
X-Loom-IP: 82.158.81.106 (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax))
X-IsSubscribed: yes

Igor Pechtchanski <pechtcha <at> cs.nyu.edu> writes:
> 
> Arg #3 is a pointer to a function (Tcl_CmdProc).  See where that's
> declared *in the preprocessed file* (so that all macros are expanded) and
> see if your declarations of GetTimeFromSecs, etc, correspond to it.  The
> most obvious mismatch is probably the "const char* argv[]" vs. your "char*
> argv[]".

OK, this is the definition of Tcl_CmdProc in the preprocessed file:
-------------------------------------------------------------------
typedef int (Tcl_CmdProc) (ClientData clientData, Tcl_Interp *interp,
  int argc, const char *argv[]);

And here is GetTimeFromSecs also from the preprocessed file:
-------------------------------------------------------------------
static int GetTimeFromSecs(ClientData clientData, Tcl_Interp* interp,
                           int argc, char* argv[]);

... so I changed "char* argv[]" to to "const char *argv[]" at
the affected spots in the source code in ext.c.

It now compiles and links without warnings and the application
(FileRunner) works with the resulting .dll. I can't be certain
yet if it also fixed the problem I was having, since it was
intermittent.

I can see how this change makes the data types agree and gets
rid of the warnings.

But I am quite baffled as to why this should be declared as a
constant !? That argument  seems to be a pointer to an array
of input arguments to a function. Surely such a pointer would
have to change dynamically during execution and no way could
it be constant !?

Oh well. These comments sort of give away my level of
(in)experience I suppose... :o)

Another thing is that, seeing what it was all about, I can't
imagine that the warnings actually mattered, or made the
resulting .dll work differently in any way (?)

Can't be sure if I'm through with this yet but your advice saw
me through a couple of initial hurdles in style here.

Big THANKS, again, for your excellent help !

Cheers CV



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019