On Tue, Feb 23, 2010 at 1:56 AM, 4eanlss <4ean...@engineer.com> wrote:

> Shane Harrelson <shane.harrel...@...> writes:
>
> >
> > I was unable to duplicate your error with the CLI and 3.6.22 (compiled
> with
> > cygwin\gcc or msvc):
> Ok, so Borland not supported and windows API not followed.
> Just as I expected from open source software.
>
>

I never said Borland was not supported.  I said I wasn't able to reproduce
the problem with the two compilers currently available to me.   It would be
very difficult to maintain build environments for every compiler and
compiler version used by SQLite users.
If you check the full source, you'll see where we've made specific
modifications for many compilers not used by us, like the Borland compilers,
all done and tested with the help of users.

I'm not certain what you mean by "windows API not followed".  Could you
provide more information?  In non CE builds, the only Windows API called in
the winCurrentTime() function is GetSystemTimeAsFileTime(). This returns a
FILETIME structure containing two DWORDS (u32s) representing the the number
of 100-nanosecond intervals since January 1, 1601.

The MSDN docs on the Windows API that use and manipulate system time values
state that it will be zero or positive, and less than 0x8000000000000000
(except for functions such as SetFileTime() which use 0xFFFFFFFFFFFFFFFF to
indicate that the previous file time should be preserved.)   Regardless, an
int64 is large enough to represent all the 100-nanosecond intervals from
January 1, 1601 through sometime in the year 30,828.

We use casting and 64-bit math to convert and manipulate these two DWORDS as
64-bit *signed *integers.   We avoid using uint64s because it's difficult
enough working through all the various compiler quirks out there for
manipulating 64-bit types with just int64s without introducing another
type.   Case in point, the odd initialization of some of the "consts" we use
in the winCurrentTime() function and the use of "math" instead of shifting.

I suspect that one of these "quirks" in your build environment is being
exposed by the code in winCurrentTime().    Perhaps you could debug through
the code and find where the calculations are going wrong?   In this way we
could provide more help.

HTH.
-Shane
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to