Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Changes for WinRT compatibility. Also, allow version resource compilation and embedding to be disabled at compile-time. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
4b0facc13b1026419f9b89dab3453ba4 |
User & Date: | mistachkin 2012-10-06 03:48:25 |
Context
2012-10-07
| ||
05:34 | Corrections to test names to eliminate duplicates and follow naming conventions. check-in: 50679889 user: mistachkin tags: trunk | |
00:52 | Manually define the Win32 file-mapping APIs for WAL if SQLITE_WIN32_FILEMAPPING_API is defined. Closed-Leaf check-in: 585e2070 user: mistachkin tags: winFileMapping | |
2012-10-06
| ||
03:48 | Changes for WinRT compatibility. Also, allow version resource compilation and embedding to be disabled at compile-time. check-in: 4b0facc1 user: mistachkin tags: trunk | |
2012-10-05
| ||
19:43 | Fix a problem in shared-cache mode where a COMMIT statement might cause a busy-handler belonging to a shared-cache connection other than the current writer to be invoked. check-in: e0c889d6 user: dan tags: trunk | |
Changes
Changes to Makefile.msc.
25 25 # 26 26 XCOMPILE = 0 27 27 28 28 # Set this non-0 to use the native libraries paths for cross-compiling 29 29 # the command line tools needed during the compilation process. 30 30 # 31 31 USE_NATIVE_LIBPATHS = 0 32 + 33 +# Set this 0 to skip the compiling and embedding of version resources. 34 +# 35 +USE_RC = 1 32 36 33 37 # Set this non-0 to compile binaries suitable for the WinRT environment. 34 38 # This setting does not apply to any binaries that require Tcl to operate 35 39 # properly (i.e. the text fixture, etc). 36 40 # 37 41 FOR_WINRT = 0 38 42 ................................................................................ 164 168 # the following compile-time options must be used as well to 165 169 # disable use of Win32 APIs that are not available and to enable 166 170 # use of Win32 APIs that are specific to Windows 8 and/or WinRT. 167 171 # 168 172 !IF $(FOR_WINRT)!=0 169 173 TCC = $(TCC) -DSQLITE_OS_WINRT=1 170 174 RCC = $(RCC) -DSQLITE_OS_WINRT=1 171 -TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_PARTITION_APP 172 -RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_PARTITION_APP 175 +TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP 176 +RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP 173 177 !ENDIF 174 178 175 179 # Also, we need to dynamically link to the correct MSVC runtime 176 180 # when compiling for WinRT (e.g. debug or release) OR if the 177 181 # USE_CRT_DLL option is set to force dynamically linking to the 178 182 # MSVC runtime library. 179 183 # 180 184 !IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0 181 185 !IF $(DEBUG)>0 182 186 TCC = $(TCC) -MDd 187 +BCC = $(BCC) -MDd 183 188 !ELSE 184 189 TCC = $(TCC) -MD 190 +BCC = $(BCC) -MD 185 191 !ENDIF 186 192 !ELSE 187 193 !IF $(DEBUG)>0 188 194 TCC = $(TCC) -MTd 195 +BCC = $(BCC) -MTd 189 196 !ELSE 190 197 TCC = $(TCC) -MT 198 +BCC = $(BCC) -MT 191 199 !ENDIF 192 200 !ENDIF 193 201 194 202 # The mksqlite3c.tcl and mksqlite3h.tcl scripts will pull in 195 203 # any extension header files by default. For non-amalgamation 196 204 # builds, we need to make sure the compiler can find these. 197 205 # ................................................................................ 467 475 # Determine the real value of LIBOBJ based on the 'configure' script 468 476 # 469 477 !IF $(USE_AMALGAMATION)==0 470 478 LIBOBJ = $(LIBOBJS0) 471 479 !ELSE 472 480 LIBOBJ = $(LIBOBJS1) 473 481 !ENDIF 482 + 483 +# Determine if embedded resource compilation and usage are enabled. 484 +# 485 +!IF $(USE_RC)!=0 486 +LIBRESOBJS = sqlite3res.lo 487 +!ELSE 488 +LIBRESOBJS = 489 +!ENDIF 474 490 475 491 # All of the source code files. 476 492 # 477 493 SRC = \ 478 494 $(TOP)\src\alter.c \ 479 495 $(TOP)\src\analyze.c \ 480 496 $(TOP)\src\attach.c \ ................................................................................ 762 778 763 779 libsqlite3.lib: $(LIBOBJ) 764 780 $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS) 765 781 766 782 libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib 767 783 $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCL:tcl=tclstub) $(TLIBS) 768 784 769 -sqlite3.exe: $(TOP)\src\shell.c libsqlite3.lib sqlite3res.lo sqlite3.h 785 +sqlite3.exe: $(TOP)\src\shell.c libsqlite3.lib $(LIBRESOBJS) sqlite3.h 770 786 $(LTLINK) $(READLINE_FLAGS) \ 771 787 $(TOP)\src\shell.c \ 772 - /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib sqlite3res.lo $(LIBREADLINE) $(LTLIBS) $(TLIBS) 788 + /link $(LTLINKOPTS) $(LTLIBPATHS) libsqlite3.lib $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS) 773 789 774 790 # This target creates a directory named "tsrc" and fills it with 775 791 # copies of all of the C source code and header files needed to 776 792 # build on the target system. Some of the C source code and header 777 793 # files are automatically generated. This target takes care of 778 794 # all that automatic generation. 779 795 # ................................................................................ 815 831 $(LTCOMPILE) -c parse.c 816 832 817 833 opcodes.lo: opcodes.c 818 834 $(LTCOMPILE) -c opcodes.c 819 835 820 836 # Rule to build the Win32 resources object file. 821 837 # 822 -sqlite3res.lo: $(TOP)\src\sqlite3.rc $(HDR) 838 +!IF $(USE_RC)!=0 839 +$(LIBRESOBJS): $(TOP)\src\sqlite3.rc $(HDR) 823 840 echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h 824 841 for /F %%V in ('type "$(TOP)\VERSION"') do ( \ 825 842 echo #define SQLITE_RESOURCE_VERSION %%V \ 826 843 | $(NAWK) "/.*/ { gsub(/[.]/,\",\");print }" >> sqlite3rc.h \ 827 844 ) 828 845 echo #endif >> sqlite3rc.h 829 - $(LTRCOMPILE) -fo sqlite3res.lo $(TOP)\src\sqlite3.rc 846 + $(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc 847 +!ENDIF 830 848 831 849 # Rules to build individual *.lo files from files in the src directory. 832 850 # 833 851 alter.lo: $(TOP)\src\alter.c $(HDR) 834 852 $(LTCOMPILE) -c $(TOP)\src\alter.c 835 853 836 854 analyze.lo: $(TOP)\src\analyze.c $(HDR) ................................................................................ 1039 1057 1040 1058 tclsqlite.lo: $(TOP)\src\tclsqlite.c $(HDR) 1041 1059 $(LTCOMPILE) -DUSE_TCL_STUBS=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c 1042 1060 1043 1061 tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR) 1044 1062 $(LTCOMPILE) -DTCLSH=1 -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c 1045 1063 1046 -tclsqlite3.exe: tclsqlite-shell.lo libsqlite3.lib sqlite3res.lo 1047 - $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /OUT:$@ libsqlite3.lib tclsqlite-shell.lo sqlite3res.lo $(LTLIBS) $(TLIBS) 1064 +tclsqlite3.exe: tclsqlite-shell.lo libsqlite3.lib $(LIBRESOBJS) 1065 + $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /OUT:$@ libsqlite3.lib tclsqlite-shell.lo $(LIBRESOBJS) $(LTLIBS) $(TLIBS) 1048 1066 1049 1067 # Rules to build opcodes.c and opcodes.h 1050 1068 # 1051 1069 opcodes.c: opcodes.h $(TOP)\mkopcodec.awk 1052 1070 $(NAWK) -f $(TOP)\mkopcodec.awk opcodes.h > opcodes.c 1053 1071 1054 1072 opcodes.h: parse.h $(TOP)\src\vdbe.c $(TOP)\mkopcodeh.awk ................................................................................ 1153 1171 TESTFIXTURE_SRC1 = sqlite3.c 1154 1172 !IF $(USE_AMALGAMATION)==0 1155 1173 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC0) 1156 1174 !ELSE 1157 1175 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)\src\tclsqlite.c $(TESTFIXTURE_SRC1) 1158 1176 !ENDIF 1159 1177 1160 -testfixture.exe: $(TESTFIXTURE_SRC) sqlite3res.lo $(HDR) 1178 +testfixture.exe: $(TESTFIXTURE_SRC) $(LIBRESOBJS) $(HDR) 1161 1179 $(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \ 1162 1180 -DBUILD_sqlite -I$(TCLINCDIR) \ 1163 1181 $(TESTFIXTURE_SRC) \ 1164 - /link $(LTLINKOPTS) $(LTLIBPATHS) sqlite3res.lo $(LTLIBS) $(TLIBS) 1182 + /link $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS) 1165 1183 1166 1184 fulltest: testfixture.exe sqlite3.exe 1167 1185 .\testfixture.exe $(TOP)\test\all.test 1168 1186 1169 1187 soaktest: testfixture.exe sqlite3.exe 1170 1188 .\testfixture.exe $(TOP)\test\all.test -soak=1 1171 1189 ................................................................................ 1178 1196 sqlite3_analyzer.c: sqlite3.c $(TOP)\src\test_stat.c $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl 1179 1197 copy sqlite3.c + $(TOP)\src\test_stat.c + $(TOP)\src\tclsqlite.c $@ 1180 1198 echo static const char *tclsh_main_loop(void){ >> $@ 1181 1199 echo static const char *zMainloop = >> $@ 1182 1200 $(NAWK) -f $(TOP)\tool\tostr.awk $(TOP)\tool\spaceanal.tcl >> $@ 1183 1201 echo ; return zMainloop; } >> $@ 1184 1202 1185 -sqlite3_analyzer.exe: sqlite3_analyzer.c sqlite3res.lo 1203 +sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS) 1186 1204 $(LTLINK) -DBUILD_sqlite -DTCLSH=2 -I$(TCLINCDIR) sqlite3_analyzer.c \ 1187 - /link $(LTLINKOPTS) $(LTLIBPATHS) sqlite3res.lo $(LTLIBS) $(TLIBS) 1205 + /link $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS) 1188 1206 1189 1207 clean: 1190 1208 del /Q *.lo *.ilk *.lib *.obj *.pdb sqlite3.exe libsqlite3.lib 1191 1209 del /Q *.da *.bb *.bbg gmon.out 1192 1210 del /Q sqlite3.h opcodes.c opcodes.h 1193 1211 del /Q lemon.exe lempar.c parse.* 1194 1212 del /Q mkkeywordhash.exe keywordhash.h ................................................................................ 1213 1231 1214 1232 sqlite3.def: libsqlite3.lib 1215 1233 echo EXPORTS > sqlite3.def 1216 1234 dumpbin /all libsqlite3.lib \ 1217 1235 | $(NAWK) "/ 1 _?sqlite3_/ { sub(/^.* _?/,\"\");print }" \ 1218 1236 | sort >> sqlite3.def 1219 1237 1220 -sqlite3.dll: $(LIBOBJ) sqlite3res.lo sqlite3.def 1221 - $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:sqlite3.def /OUT:$@ $(LIBOBJ) sqlite3res.lo $(LTLIBS) $(TLIBS) 1238 +sqlite3.dll: $(LIBOBJ) $(LIBRESOBJS) sqlite3.def 1239 + $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:sqlite3.def /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
Changes to src/os_win.c.
398 398 #else 399 399 { "FormatMessageW", (SYSCALL)0, 0 }, 400 400 #endif 401 401 402 402 #define osFormatMessageW ((DWORD(WINAPI*)(DWORD,LPCVOID,DWORD,DWORD,LPWSTR, \ 403 403 DWORD,va_list*))aSyscall[15].pCurrent) 404 404 405 +#if !defined(SQLITE_OMIT_LOAD_EXTENSION) 405 406 { "FreeLibrary", (SYSCALL)FreeLibrary, 0 }, 407 +#else 408 + { "FreeLibrary", (SYSCALL)0, 0 }, 409 +#endif 406 410 407 411 #define osFreeLibrary ((BOOL(WINAPI*)(HMODULE))aSyscall[16].pCurrent) 408 412 409 413 { "GetCurrentProcessId", (SYSCALL)GetCurrentProcessId, 0 }, 410 414 411 415 #define osGetCurrentProcessId ((DWORD(WINAPI*)(VOID))aSyscall[17].pCurrent) 412 416 ................................................................................ 479 483 #define osGetFullPathNameW ((DWORD(WINAPI*)(LPCWSTR,DWORD,LPWSTR, \ 480 484 LPWSTR*))aSyscall[25].pCurrent) 481 485 482 486 { "GetLastError", (SYSCALL)GetLastError, 0 }, 483 487 484 488 #define osGetLastError ((DWORD(WINAPI*)(VOID))aSyscall[26].pCurrent) 485 489 490 +#if !defined(SQLITE_OMIT_LOAD_EXTENSION) 486 491 #if SQLITE_OS_WINCE 487 492 /* The GetProcAddressA() routine is only available on Windows CE. */ 488 493 { "GetProcAddressA", (SYSCALL)GetProcAddressA, 0 }, 489 494 #else 490 495 /* All other Windows platforms expect GetProcAddress() to take 491 496 ** an ANSI string regardless of the _UNICODE setting */ 492 497 { "GetProcAddressA", (SYSCALL)GetProcAddress, 0 }, 493 498 #endif 499 +#else 500 + { "GetProcAddressA", (SYSCALL)0, 0 }, 501 +#endif 494 502 495 503 #define osGetProcAddressA ((FARPROC(WINAPI*)(HMODULE, \ 496 504 LPCSTR))aSyscall[27].pCurrent) 497 505 498 506 #if !SQLITE_OS_WINRT 499 507 { "GetSystemInfo", (SYSCALL)GetSystemInfo, 0 }, 500 508 #else ................................................................................ 590 598 #else 591 599 { "HeapValidate", (SYSCALL)0, 0 }, 592 600 #endif 593 601 594 602 #define osHeapValidate ((BOOL(WINAPI*)(HANDLE,DWORD, \ 595 603 LPCVOID))aSyscall[41].pCurrent) 596 604 597 -#if defined(SQLITE_WIN32_HAS_ANSI) 605 +#if defined(SQLITE_WIN32_HAS_ANSI) && !defined(SQLITE_OMIT_LOAD_EXTENSION) 598 606 { "LoadLibraryA", (SYSCALL)LoadLibraryA, 0 }, 599 607 #else 600 608 { "LoadLibraryA", (SYSCALL)0, 0 }, 601 609 #endif 602 610 603 611 #define osLoadLibraryA ((HMODULE(WINAPI*)(LPCSTR))aSyscall[42].pCurrent) 604 612 605 -#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE) 613 +#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE) && \ 614 + !defined(SQLITE_OMIT_LOAD_EXTENSION) 606 615 { "LoadLibraryW", (SYSCALL)LoadLibraryW, 0 }, 607 616 #else 608 617 { "LoadLibraryW", (SYSCALL)0, 0 }, 609 618 #endif 610 619 611 620 #define osLoadLibraryW ((HMODULE(WINAPI*)(LPCWSTR))aSyscall[43].pCurrent) 612 621 ................................................................................ 787 796 #else 788 797 { "CreateFile2", (SYSCALL)0, 0 }, 789 798 #endif 790 799 791 800 #define osCreateFile2 ((HANDLE(WINAPI*)(LPCWSTR,DWORD,DWORD,DWORD, \ 792 801 LPCREATEFILE2_EXTENDED_PARAMETERS))aSyscall[66].pCurrent) 793 802 794 -#if SQLITE_OS_WINRT 803 +#if SQLITE_OS_WINRT && !defined(SQLITE_OMIT_LOAD_EXTENSION) 795 804 { "LoadPackagedLibrary", (SYSCALL)LoadPackagedLibrary, 0 }, 796 805 #else 797 806 { "LoadPackagedLibrary", (SYSCALL)0, 0 }, 798 807 #endif 799 808 800 809 #define osLoadPackagedLibrary ((HMODULE(WINAPI*)(LPCWSTR, \ 801 810 DWORD))aSyscall[67].pCurrent)