Download src/os_common.h from AryaWu/sqlite: direct link, hf CLI and curl.
- Browser
- Download file 3 kB
-
https://huggingface.co/AryaWu/sqlite/resolve/main/src/os_common.h
- Command line
-
hf download hf://AryaWu/sqlite/src/os_common.h
-
curl -L -o os_common.h https://huggingface.co/AryaWu/sqlite/resolve/main/src/os_common.h
3 kB
| /* | |
| ** 2004 May 22 | |
| ** | |
| ** The author disclaims copyright to this source code. In place of | |
| ** a legal notice, here is a blessing: | |
| ** | |
| ** May you do good and not evil. | |
| ** May you find forgiveness for yourself and forgive others. | |
| ** May you share freely, never taking more than you give. | |
| ** | |
| ****************************************************************************** | |
| ** | |
| ** This file contains macros and a little bit of code that is common to | |
| ** all of the platform-specific files (os_*.c) and is #included into those | |
| ** files. | |
| ** | |
| ** This file should be #included by the os_*.c files only. It is not a | |
| ** general purpose header file. | |
| */ | |
| /* | |
| ** At least two bugs have slipped in because we changed the MEMORY_DEBUG | |
| ** macro to SQLITE_DEBUG and some older makefiles have not yet made the | |
| ** switch. The following code should catch this problem at compile-time. | |
| */ | |
| /* | |
| ** Macros for performance tracing. Normally turned off. Only works | |
| ** on i486 hardware. | |
| */ | |
| static sqlite_uint64 g_start; | |
| static sqlite_uint64 g_elapsed; | |
| /* | |
| ** If we compile with the SQLITE_TEST macro set, then the following block | |
| ** of code will give us the ability to simulate a disk I/O error. This | |
| ** is used for testing the I/O recovery logic. | |
| */ | |
| extern int sqlite3_io_error_hit; | |
| extern int sqlite3_io_error_hardhit; | |
| extern int sqlite3_io_error_pending; | |
| extern int sqlite3_io_error_persist; | |
| extern int sqlite3_io_error_benign; | |
| extern int sqlite3_diskfull_pending; | |
| extern int sqlite3_diskfull; | |
| static void local_ioerr(){ | |
| IOTRACE(("IOERR\n")); | |
| sqlite3_io_error_hit++; | |
| if( !sqlite3_io_error_benign ) sqlite3_io_error_hardhit++; | |
| } | |
| /* | |
| ** When testing, keep a count of the number of open files. | |
| */ | |
| extern int sqlite3_open_file_count; | |