Re: [sqlite] sqlite3 problems on both 32 and 64 architectures

2004-11-03 Thread D. Richard Hipp
Jaros?aw Staniek wrote:
Hallo,
assertions like this (btree.c, line 1043) are bad:
  assert( sizeof(ptr)==sizeof(char*) );
The problem better is described here:
http://bugs.kde.org/show_bug.cgi?id=92563
Reporters say that even for intel P4, sizeof pointers is 8, not 4 there. 
Any plans for fixing these bugs in official sqlite release?

On the contrary, the assert show above is a Very Good Thing.
The ptr type is supposed to be a signed integer which is
the same size as a pointer.  The configure script is suppose
to run some tests to pick the appropriate integer size and
set a #define so that ptr can be defined appropriately.
The assert() above verifies that all this happened correctly.
In your case, there is some kind of configuration problem
and ptr is not being sized correctly.  The assert above
discovered this problem quickly so that you know the library
is miscompiled, rather than letting the library run and
generate subtle and hard-to-track errors.
You should be thankful for this assert.  I has saved you
a lot of debugging.
The configure script is suppose to set a macro named
SQLITE_PTR_SZ to either 4 or 8.  Like this:
-DSQLITE_PTR_SZ=8
-DSQLITE_PTR_SZ=4
What do you see when you compile?  4 or 8?  Why is the
configure script setting it incorrectly?
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


[sqlite] sqlite3 problems on both 32 and 64 architectures

2004-11-02 Thread Jarosław Staniek
Hallo,
assertions like this (btree.c, line 1043) are bad:
  assert( sizeof(ptr)==sizeof(char*) );
The problem better is described here:
http://bugs.kde.org/show_bug.cgi?id=92563
Reporters say that even for intel P4, sizeof pointers is 8, not 4 there. Any
plans for fixing these bugs in official sqlite release?
--
regards / pozdrawiam,
 Jaroslaw Staniek / OpenOffice Polska
 Developers wanted! Kexi Project: http://www.kexi-project.org
 KDElibs/Windows: http://wiki.kde.org/tiki-index.php?page=KDElibs+for+win32