SQLite

Check-in [f74a5ea8c9]
Login

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

Overview
Comment:Fix the windows build so that it works with -DSQLITE_OMIT_AUTOINIT.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f74a5ea8c986dc33d3afcda169c38abbe55728c56716cf9991a5e2ef7fc4917a
User & Date: drh 2022-09-05 18:17:03.632
Context
2022-09-07
19:58
Fix the windows build so that it works with -DSQLITE_OMIT_AUTOINIT. (check-in: 1662eb07d8 user: drh tags: branch-3.39)
2022-09-05
22:54
Add the tool/omittest-msvc.tcl script that will try to build using MSVC using various compile-time options, to ensure that the compile-time options all build without errors. (check-in: 6b00ecb59f user: drh tags: trunk)
20:42
Add a prototype for a script, similar to tool/omittest.tcl, that is designed to test builds using MSVC to ensure they work with various OMIT options. (check-in: b1e37a0bd3 user: drh tags: msvc-omit-test)
18:17
Fix the windows build so that it works with -DSQLITE_OMIT_AUTOINIT. (check-in: f74a5ea8c9 user: drh tags: trunk)
2022-09-02
21:19
Ensure the Pager.journalOff variable is zeroed if an error occurs while writing the initial header to the journal file. (check-in: da7af29096 user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/os_win.c.
1914
1915
1916
1917
1918
1919
1920

1921
1922
1923
1924
1925
1926
1927
1928
1929
** it accepts a UTF-8 string.
*/
int sqlite3_win32_set_directory8(
  unsigned long type, /* Identifier for directory being set or reset */
  const char *zValue  /* New value for directory being set or reset */
){
  char **ppDirectory = 0;

#ifndef SQLITE_OMIT_AUTOINIT
  int rc = sqlite3_initialize();
  if( rc ) return rc;
#endif
  sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));
  if( type==SQLITE_WIN32_DATA_DIRECTORY_TYPE ){
    ppDirectory = &sqlite3_data_directory;
  }else if( type==SQLITE_WIN32_TEMP_DIRECTORY_TYPE ){
    ppDirectory = &sqlite3_temp_directory;







>

|







1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
** it accepts a UTF-8 string.
*/
int sqlite3_win32_set_directory8(
  unsigned long type, /* Identifier for directory being set or reset */
  const char *zValue  /* New value for directory being set or reset */
){
  char **ppDirectory = 0;
  int rc;
#ifndef SQLITE_OMIT_AUTOINIT
  rc = sqlite3_initialize();
  if( rc ) return rc;
#endif
  sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));
  if( type==SQLITE_WIN32_DATA_DIRECTORY_TYPE ){
    ppDirectory = &sqlite3_data_directory;
  }else if( type==SQLITE_WIN32_TEMP_DIRECTORY_TYPE ){
    ppDirectory = &sqlite3_temp_directory;