From f3ec4bbc7c366d0b424653bc60dae0817a0ef98d Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Mon, 20 Feb 2012 15:25:25 +0000 Subject: [PATCH] 2012-02-20 16:25 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * harbour/src/3rd/zlib/gzlib.c ! do not use _lseeki64 in MinGWCE builds - such function does not exists in CTRL * harbour/contrib/3rd/sqlite3/sqlite3.c ! fixed declaration of 64bit integer constant value in WinCE builds ; TOFIX: in WInCE builds the following error is generated: implicit declaration of function 'osUnlockFileEx' and of course such functions does not exists (it's internal SQLITE3 macro) * harbour/contrib/3rd/sqlite3/sqlite3.hbp ! fixed declaration of _WIN32_WCE macro - it should be set to WinCE API version number. * harbour/contrib/3rd/sqlite3/sqlite3.dif * rediffed with ../../../bin/hb3rdpat.hbs -rediff * harbour/contrib/hbzebra/qrcode.c * pacified warning --- harbour/ChangeLog | 22 ++++++++++++++++++++ harbour/contrib/3rd/sqlite3/sqlite3.c | 7 ++++++- harbour/contrib/3rd/sqlite3/sqlite3.dif | 27 ++++++++++++++++++++++--- harbour/contrib/3rd/sqlite3/sqlite3.hbp | 2 +- harbour/contrib/hbzebra/qrcode.c | 1 + harbour/src/3rd/zlib/gzlib.c | 2 +- 6 files changed, 55 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 0fff586f35..dd3fd5ec9a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,28 @@ The license applies to all entries newer than 2009-04-28. */ +2012-02-20 16:25 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * harbour/src/3rd/zlib/gzlib.c + ! do not use _lseeki64 in MinGWCE builds - such function does not + exists in CTRL + + * harbour/contrib/3rd/sqlite3/sqlite3.c + ! fixed declaration of 64bit integer constant value in WinCE builds + ; TOFIX: in WInCE builds the following error is generated: + implicit declaration of function 'osUnlockFileEx' + and of course such functions does not exists (it's internal + SQLITE3 macro) + + * harbour/contrib/3rd/sqlite3/sqlite3.hbp + ! fixed declaration of _WIN32_WCE macro - it should be set to + WinCE API version number. + + * harbour/contrib/3rd/sqlite3/sqlite3.dif + * rediffed with ../../../bin/hb3rdpat.hbs -rediff + + * harbour/contrib/hbzebra/qrcode.c + * pacified warning + 2012-02-20 11:58 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * harbour/src/3rd/pcre/sjconfi.h ! disabled fastcall function attr in GCC older then 3.4 diff --git a/harbour/contrib/3rd/sqlite3/sqlite3.c b/harbour/contrib/3rd/sqlite3/sqlite3.c index 603be880d6..6937ae08bf 100644 --- a/harbour/contrib/3rd/sqlite3/sqlite3.c +++ b/harbour/contrib/3rd/sqlite3/sqlite3.c @@ -33210,6 +33210,11 @@ static void logIoerr(int nRetry){ ** substitute. */ /* #include */ +#if defined( _MSC_VER ) +#define _LL( num ) num +#else +#define _LL( num ) num##LL +#endif struct tm *__cdecl localtime(const time_t *t) { static struct tm y; @@ -33217,7 +33222,7 @@ struct tm *__cdecl localtime(const time_t *t) SYSTEMTIME pTm; sqlite3_int64 t64; t64 = *t; - t64 = (t64 + 11644473600)*10000000; + t64 = (t64 + _LL(11644473600))*10000000; uTm.dwLowDateTime = (DWORD)(t64 & 0xFFFFFFFF); uTm.dwHighDateTime= (DWORD)(t64 >> 32); osFileTimeToLocalFileTime(&uTm,&lTm); diff --git a/harbour/contrib/3rd/sqlite3/sqlite3.dif b/harbour/contrib/3rd/sqlite3/sqlite3.dif index f0e0854d2a..9b82166ebe 100644 --- a/harbour/contrib/3rd/sqlite3/sqlite3.dif +++ b/harbour/contrib/3rd/sqlite3/sqlite3.dif @@ -1,6 +1,6 @@ -diff -urN sqlite3.orig\sqlite3.c sqlite3\sqlite3.c ---- sqlite3.orig\sqlite3.c Tue Feb 07 22:41:01 2012 -+++ sqlite3\sqlite3.c Tue Feb 07 22:41:01 2012 +diff -urN sqlite3.orig/sqlite3.c sqlite3/sqlite3.c +--- sqlite3.orig/sqlite3.c 2012-02-20 16:20:53.627278687 +0100 ++++ sqlite3/sqlite3.c 2012-02-20 16:20:53.637278687 +0100 @@ -28424,7 +28424,11 @@ ** is the same technique used by glibc to implement posix_fallocate() ** on systems that do not have a real fallocate() system call. @@ -13,3 +13,24 @@ diff -urN sqlite3.orig\sqlite3.c sqlite3\sqlite3.c i64 iWrite; /* Next offset to write to */ if( robust_ftruncate(pFile->h, nSize) ){ +@@ -33206,6 +33210,11 @@ + ** substitute. + */ + /* #include */ ++#if defined( _MSC_VER ) ++#define _LL( num ) num ++#else ++#define _LL( num ) num##LL ++#endif + struct tm *__cdecl localtime(const time_t *t) + { + static struct tm y; +@@ -33213,7 +33222,7 @@ + SYSTEMTIME pTm; + sqlite3_int64 t64; + t64 = *t; +- t64 = (t64 + 11644473600)*10000000; ++ t64 = (t64 + _LL(11644473600))*10000000; + uTm.dwLowDateTime = (DWORD)(t64 & 0xFFFFFFFF); + uTm.dwHighDateTime= (DWORD)(t64 >> 32); + osFileTimeToLocalFileTime(&uTm,&lTm); diff --git a/harbour/contrib/3rd/sqlite3/sqlite3.hbp b/harbour/contrib/3rd/sqlite3/sqlite3.hbp index b0e83ebe3e..392d3860a9 100644 --- a/harbour/contrib/3rd/sqlite3/sqlite3.hbp +++ b/harbour/contrib/3rd/sqlite3/sqlite3.hbp @@ -24,7 +24,7 @@ -cflag=-DSQLITE_OMIT_DEPRECATED -cflag=-DSQLITE_ENABLE_COLUMN_METADATA --cflag=-D_WIN32_WCE{wce} +-cflag=-D_WIN32_WCE=0x0300{wce} # DJGPP and OpenWatcom in DOS aren't correctly recognized by SQLite, # so we're forcing the next best available option. This will cause missing # externals though. [vszakats] diff --git a/harbour/contrib/hbzebra/qrcode.c b/harbour/contrib/hbzebra/qrcode.c index 12aade1ea1..d6cf24f6d2 100644 --- a/harbour/contrib/hbzebra/qrcode.c +++ b/harbour/contrib/hbzebra/qrcode.c @@ -665,6 +665,7 @@ static int _qr_dataencode( const char * szCode, HB_SIZE nSize, PHB_BITBUFFER pDa /* Select version */ + iVersion = 0; /* to pacify warning */ for( i = 1; i <= 40; i++ ) { iDataLen = ( int ) ( s_version[ i - 1 ].uiTotal - s_version[ i - 1 ].level[ iLevel ].uiECC ); diff --git a/harbour/src/3rd/zlib/gzlib.c b/harbour/src/3rd/zlib/gzlib.c index 62eebf83e3..08f3417b08 100644 --- a/harbour/src/3rd/zlib/gzlib.c +++ b/harbour/src/3rd/zlib/gzlib.c @@ -5,7 +5,7 @@ #include "gzguts.h" -#if defined(__XCC__) +#if defined(__XCC__) || defined(__MINGW32CE__) # define LSEEK lseek #elif defined(__POCC__) # define LSEEK _lseek64