RE: Sqlite 3.2.3 use of Tcl_WideInt not defined in Tcl/Tk8.3.5

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

RE: Sqlite 3.2.3 use of Tcl_WideInt not defined in Tcl/Tk8.3.5

Downey, Shawn
I emailed Dr. Hipp separately on this issue.  Thanks.  I may try to
upgrade Tcl to 8.4.  

But this patch looks like it may work as well (for my purposes only).  I
inserted the following in tclsqlite.c just after the #includes:

/* Added to support backward compatibility to Tcl/Tk 8.3 */
#include "os.h"
#if OS_WIN /* This file is used for windows only */
#ifndef Tcl_WideInt /* Tcl_WideInt is not defined in Tcl/Tk
8.3 */
#define Tcl_WideInt __int64
#endif
#endif

Is the problem as simple as this?  Or am I underestimating the problem?
Thank you for any input.

Shawn M. Downey
MPR Associates
632 Plank Road, Suite 110
Clifton Park, NY 12065
518-371-3983 x3 (work)
860-508-5015 (cell)


-----Original Message-----
From: D. Richard Hipp [mailto:[hidden email]]
Sent: Monday, August 22, 2005 11:26 AM
To: [hidden email]
Subject: Re: [sqlite] Sqlite 3.2.3 use of Tcl_WideInt not defined in
Tcl/Tk8.3.5

On Mon, 2005-08-22 at 10:51 -0400, Downey, Shawn wrote:
> We use Tcl/Tk 8.3.5 and are sort of stuck with it.  The new
tclsqlite.c
> declares Tcl_WideInt which is not defined in the include files for
> Tcl/Tk 8.3.5.
>

Tclsqlite.c requires Tcl 8.4 or later.  You can try to
back port it if you want, but that will be tricky.  SQLite
uses 64-bit integers and they did not appear in Tcl until
version 8.4 so it is not clear how you will handle them
in a back-ported version.  (Convert them to strings?)

FWIW: If you are speaking of the project that I once worked
on, I have compiled it using Tcl 8.4 and it worked fine.
I would recommend that you upgrade.  Going to Tcl 8.4
(or 8.5) will cost you perhaps 1 day of work, but will
easily pay back that much and more as you continue to
work with the code.
--
D. Richard Hipp <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

RE: Sqlite 3.2.3 use of Tcl_WideInt not defined in Tcl/Tk8.3.5

D. Richard Hipp
On Mon, 2005-08-22 at 12:15 -0400, Downey, Shawn wrote:

> But this patch looks like it may work as well (for my purposes only).  I
> inserted the following in tclsqlite.c just after the #includes:
>
> /* Added to support backward compatibility to Tcl/Tk 8.3 */
> #include "os.h"
> #if OS_WIN /* This file is used for windows only */
> #ifndef Tcl_WideInt /* Tcl_WideInt is not defined in Tcl/Tk
> 8.3 */
> #define Tcl_WideInt __int64
> #endif
> #endif
>
> Is the problem as simple as this?  Or am I underestimating the problem?

Actually, that looks like it might work.  Have you tried it?

You might also need to comment out some code further down in the
file that attempts to create new WideInt objects in Tcl.  
--
D. Richard Hipp <[hidden email]>