Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Accomplish fileio standalone for Win32 with less intervention. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
af5dcc9c2a3a45d10b985f6b7ea18d39 |
User & Date: | larrybr 2021-09-20 21:42:39 |
Context
2021-09-21
| ||
17:26 | Add the "PRAGMA table_list" command with its corresponding eponymous table-valued function: "pragma_table_list". (check-in: 2c0e7ae5 user: drh tags: trunk) | |
2021-09-20
| ||
21:42 | Accomplish fileio standalone for Win32 with less intervention. (check-in: af5dcc9c user: larrybr tags: trunk) | |
20:15 | Allow fileio extension to be a stand-alone DLL for Win32 (check-in: d1cc3105 user: larrybr tags: trunk) | |
Changes
Changes to ext/misc/fileio.c.
︙ | ︙ | |||
234 235 236 237 238 239 240 | #if defined(FILEIO_WIN32_DLL) && (defined(_WIN32) || defined(WIN32)) # /* To allow a standalone DLL, use this next replacement function: */ # undef sqlite3_win32_utf8_to_unicode # define sqlite3_win32_utf8_to_unicode utf8_to_utf16 # LPWSTR utf8_to_utf16(const char *z){ int nAllot = MultiByteToWideChar(CP_UTF8, 0, z, -1, NULL, 0); | | | | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | #if defined(FILEIO_WIN32_DLL) && (defined(_WIN32) || defined(WIN32)) # /* To allow a standalone DLL, use this next replacement function: */ # undef sqlite3_win32_utf8_to_unicode # define sqlite3_win32_utf8_to_unicode utf8_to_utf16 # LPWSTR utf8_to_utf16(const char *z){ int nAllot = MultiByteToWideChar(CP_UTF8, 0, z, -1, NULL, 0); LPWSTR rv = sqlite3_malloc(nAllot * sizeof(WCHAR)); if( rv!=0 && 0 < MultiByteToWideChar(CP_UTF8, 0, z, -1, rv, nAllot) ) return rv; sqlite3_free(rv); return 0; } #endif /* ** This function attempts to normalize the time values found in the stat() ** buffer to UTC. This is necessary on Win32, where the runtime library |
︙ | ︙ | |||
1017 1018 1019 1020 1021 1022 1023 | if( rc==SQLITE_OK ){ rc = fsdirRegister(db); } return rc; } #if defined(FILEIO_WIN32_DLL) && (defined(_WIN32) || defined(WIN32)) | | < < | < < < < | | | 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 | if( rc==SQLITE_OK ){ rc = fsdirRegister(db); } return rc; } #if defined(FILEIO_WIN32_DLL) && (defined(_WIN32) || defined(WIN32)) /* To allow a standalone DLL, make test_windirent.c use the same * redefined SQLite API calls as the above extension code does. * Just pull in this .c to accomplish this. As a beneficial side * effect, this extension becomes a single translation unit. */ # include "test_windirent.c" #endif |