| OLD | NEW |
| 1 /* | 1 /* |
| 2 ** 2004 May 22 | 2 ** 2004 May 22 |
| 3 ** | 3 ** |
| 4 ** The author disclaims copyright to this source code. In place of | 4 ** The author disclaims copyright to this source code. In place of |
| 5 ** a legal notice, here is a blessing: | 5 ** a legal notice, here is a blessing: |
| 6 ** | 6 ** |
| 7 ** May you do good and not evil. | 7 ** May you do good and not evil. |
| 8 ** May you find forgiveness for yourself and forgive others. | 8 ** May you find forgiveness for yourself and forgive others. |
| 9 ** May you share freely, never taking more than you give. | 9 ** May you share freely, never taking more than you give. |
| 10 ** | 10 ** |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 /* | 23 /* |
| 24 ** At least two bugs have slipped in because we changed the MEMORY_DEBUG | 24 ** At least two bugs have slipped in because we changed the MEMORY_DEBUG |
| 25 ** macro to SQLITE_DEBUG and some older makefiles have not yet made the | 25 ** macro to SQLITE_DEBUG and some older makefiles have not yet made the |
| 26 ** switch. The following code should catch this problem at compile-time. | 26 ** switch. The following code should catch this problem at compile-time. |
| 27 */ | 27 */ |
| 28 #ifdef MEMORY_DEBUG | 28 #ifdef MEMORY_DEBUG |
| 29 # error "The MEMORY_DEBUG macro is obsolete. Use SQLITE_DEBUG instead." | 29 # error "The MEMORY_DEBUG macro is obsolete. Use SQLITE_DEBUG instead." |
| 30 #endif | 30 #endif |
| 31 | 31 |
| 32 #if defined(SQLITE_TEST) && defined(SQLITE_DEBUG) | |
| 33 # ifndef SQLITE_DEBUG_OS_TRACE | |
| 34 # define SQLITE_DEBUG_OS_TRACE 0 | |
| 35 # endif | |
| 36 int sqlite3OSTrace = SQLITE_DEBUG_OS_TRACE; | |
| 37 # define OSTRACE(X) if( sqlite3OSTrace ) sqlite3DebugPrintf X | |
| 38 #else | |
| 39 # define OSTRACE(X) | |
| 40 #endif | |
| 41 | |
| 42 /* | 32 /* |
| 43 ** Macros for performance tracing. Normally turned off. Only works | 33 ** Macros for performance tracing. Normally turned off. Only works |
| 44 ** on i486 hardware. | 34 ** on i486 hardware. |
| 45 */ | 35 */ |
| 46 #ifdef SQLITE_PERFORMANCE_TRACE | 36 #ifdef SQLITE_PERFORMANCE_TRACE |
| 47 | 37 |
| 48 /* | 38 /* |
| 49 ** hwtime.h contains inline assembler code for implementing | 39 ** hwtime.h contains inline assembler code for implementing |
| 50 ** high-performance timing routines. | 40 ** high-performance timing routines. |
| 51 */ | 41 */ |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 ** When testing, keep a count of the number of open files. | 96 ** When testing, keep a count of the number of open files. |
| 107 */ | 97 */ |
| 108 #ifdef SQLITE_TEST | 98 #ifdef SQLITE_TEST |
| 109 int sqlite3_open_file_count = 0; | 99 int sqlite3_open_file_count = 0; |
| 110 #define OpenCounter(X) sqlite3_open_file_count+=(X) | 100 #define OpenCounter(X) sqlite3_open_file_count+=(X) |
| 111 #else | 101 #else |
| 112 #define OpenCounter(X) | 102 #define OpenCounter(X) |
| 113 #endif | 103 #endif |
| 114 | 104 |
| 115 #endif /* !defined(_OS_COMMON_H_) */ | 105 #endif /* !defined(_OS_COMMON_H_) */ |
| OLD | NEW |