System.Data.SQLite

Check-in [f168458919]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:More compilation fixes for non-Windows platforms.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f16845891981d95fa139d386d9acc1a9f39fc856
User & Date: mistachkin 2016-03-22 23:26:45.277
Context
2016-03-23
00:24
Disable the INTEROP_LOG feature when building for Mono. check-in: b37183d098 user: mistachkin tags: trunk
2016-03-22
23:26
More compilation fixes for non-Windows platforms. check-in: f168458919 user: mistachkin tags: trunk
22:59
Enable use of the interop assembly under Mono on Unix. check-in: d404fc5314 user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to SQLite.Interop/src/win/interop.c.
8
9
10
11
12
13
14




15
16
17
18
19
20
21
#ifdef _WIN32
#define SQLITE_API __declspec(dllexport)
#else
#define WINAPI
#endif

#include "../core/sqlite3.c"





#if defined(INTEROP_INCLUDE_EXTRA)
#include "../ext/extra.c"
#endif

#if defined(INTEROP_INCLUDE_CEROD)
#include "../ext/cerod.c"







>
>
>
>







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifdef _WIN32
#define SQLITE_API __declspec(dllexport)
#else
#define WINAPI
#endif

#include "../core/sqlite3.c"

#if !SQLITE_OS_WIN
#include <wchar.h>
#endif

#if defined(INTEROP_INCLUDE_EXTRA)
#include "../ext/extra.c"
#endif

#if defined(INTEROP_INCLUDE_CEROD)
#include "../ext/cerod.c"
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

#if defined(INTEROP_EXTENSION_FUNCTIONS)
#undef COMPILE_SQLITE_EXTENSIONS_AS_LOADABLE_MODULE
#include "../contrib/extension-functions.c"
extern int RegisterExtensionFunctions(sqlite3 *db);
#endif

#if SQLITE_OS_WIN
#if defined(INTEROP_CODEC) && !defined(INTEROP_INCLUDE_SEE)
#ifdef SQLITE_ENABLE_ZIPVFS
#define INTEROP_CODEC_GET_PAGER(a,b,c) sqlite3PagerGet(a,b,c,0)
#elif SQLITE_VERSION_NUMBER > 3009002
#define INTEROP_CODEC_GET_PAGER(a,b,c) sqlite3PagerGet(a,b,c,0)
#else
#define INTEROP_CODEC_GET_PAGER(a,b,c) sqlite3PagerGet(a,b,c)







<







36
37
38
39
40
41
42

43
44
45
46
47
48
49

#if defined(INTEROP_EXTENSION_FUNCTIONS)
#undef COMPILE_SQLITE_EXTENSIONS_AS_LOADABLE_MODULE
#include "../contrib/extension-functions.c"
extern int RegisterExtensionFunctions(sqlite3 *db);
#endif


#if defined(INTEROP_CODEC) && !defined(INTEROP_INCLUDE_SEE)
#ifdef SQLITE_ENABLE_ZIPVFS
#define INTEROP_CODEC_GET_PAGER(a,b,c) sqlite3PagerGet(a,b,c,0)
#elif SQLITE_VERSION_NUMBER > 3009002
#define INTEROP_CODEC_GET_PAGER(a,b,c) sqlite3PagerGet(a,b,c,0)
#else
#define INTEROP_CODEC_GET_PAGER(a,b,c) sqlite3PagerGet(a,b,c)
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
#endif
#if SQLITE_VERSION_NUMBER >= 3011000
  sqlite3VXPrintf(&acc, zFormat, ap);
#else
  sqlite3VXPrintf(&acc, 0, zFormat, ap);
#endif
  va_end(ap);
#if SQLITE_VERSION_NUMBER >= 3007013
  sqlite3_win32_write_debug(sqlite3StrAccumFinish(&acc), -1);
#elif defined(SQLITE_WIN32_HAS_ANSI)
  OutputDebugStringA(sqlite3StrAccumFinish(&acc));
#elif defined(SQLITE_WIN32_HAS_WIDE)
  {
    LPWSTR zWideMsg = utf8ToUnicode(sqlite3StrAccumFinish(&acc));
    if( zWideMsg ){
      OutputDebugStringW(zWideMsg);
      sqlite3_free(zWideMsg);
    }
  }







|

|

|







195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
#endif
#if SQLITE_VERSION_NUMBER >= 3011000
  sqlite3VXPrintf(&acc, zFormat, ap);
#else
  sqlite3VXPrintf(&acc, 0, zFormat, ap);
#endif
  va_end(ap);
#if SQLITE_OS_WIN && SQLITE_VERSION_NUMBER >= 3007013
  sqlite3_win32_write_debug(sqlite3StrAccumFinish(&acc), -1);
#elif SQLITE_OS_WIN && defined(SQLITE_WIN32_HAS_ANSI)
  OutputDebugStringA(sqlite3StrAccumFinish(&acc));
#elif SQLITE_OS_WIN && defined(SQLITE_WIN32_HAS_WIDE)
  {
    LPWSTR zWideMsg = utf8ToUnicode(sqlite3StrAccumFinish(&acc));
    if( zWideMsg ){
      OutputDebugStringW(zWideMsg);
      sqlite3_free(zWideMsg);
    }
  }
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
    }
    break;
  }
  sqlite3_mutex_leave(db->mutex);

  return ret;
}
#endif /* SQLITE_OS_WIN */

/*****************************************************************************/

#if defined(SQLITE_CORE)
#undef SQLITE_CORE
#endif








<







1057
1058
1059
1060
1061
1062
1063

1064
1065
1066
1067
1068
1069
1070
    }
    break;
  }
  sqlite3_mutex_leave(db->mutex);

  return ret;
}


/*****************************************************************************/

#if defined(SQLITE_CORE)
#undef SQLITE_CORE
#endif