Thursday, September 30, 2004, 10:34:50 AM, DRH wrote:

> The problem reported by ticket #924 appears to be mingw brain damage,
> not a bug in SQLite.  Can somebody who uses a recent version of
> mingw (I'm still using a version from 3 or 4 years ago - a version
> that works) please suggest a reasonable workaround.

>    http://www.sqlite.org/cvstrac/tktview?tn=924

Here is a solution that affects 4 files...

In os.h after the include of the platform specific headers, add:

#ifndef OFF_T
#define OFF_T off_t
#endif

In the rest of os.h and in os_win.c pager.c test2.c
replace: off_t
   with: OFF_T

In os_win.h replace:

#if defined(_MSC_VER) || defined(__BORLANDC__)
  typedef __int64 off_t;
#else
# if !defined(_CYGWIN_TYPES_H)
  typedef long long off_t;
#   if defined(__MINGW32__)
#     define    _OFF_T_
#   endif
# endif
#endif

with:

#if defined(_MSC_VER) || defined(__BORLANDC__)
#define OFF_T __int64
#else
#define OFF_T long long
#endif

or

#if defined(_MSC_VER) || defined(__BORLANDC__)
  typedef __int64 w32_off_t;
#else
  typedef long long w32_off_t;
#endif
#define OFF_T w32_off_t

e

Reply via email to