| 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 #ifdef SQLITE_DEBUG | 32 #if defined(SQLITE_TEST) && defined(SQLITE_DEBUG) |
| 33 int sqlite3OSTrace = 0; | 33 # ifndef SQLITE_DEBUG_OS_TRACE |
| 34 #define OSTRACE(X) if( sqlite3OSTrace ) sqlite3DebugPrintf X | 34 # define SQLITE_DEBUG_OS_TRACE 0 |
| 35 # endif |
| 36 int sqlite3OSTrace = SQLITE_DEBUG_OS_TRACE; |
| 37 # define OSTRACE(X) if( sqlite3OSTrace ) sqlite3DebugPrintf X |
| 35 #else | 38 #else |
| 36 #define OSTRACE(X) | 39 # define OSTRACE(X) |
| 37 #endif | 40 #endif |
| 38 | 41 |
| 39 /* | 42 /* |
| 40 ** Macros for performance tracing. Normally turned off. Only works | 43 ** Macros for performance tracing. Normally turned off. Only works |
| 41 ** on i486 hardware. | 44 ** on i486 hardware. |
| 42 */ | 45 */ |
| 43 #ifdef SQLITE_PERFORMANCE_TRACE | 46 #ifdef SQLITE_PERFORMANCE_TRACE |
| 44 | 47 |
| 45 /* | 48 /* |
| 46 ** hwtime.h contains inline assembler code for implementing | 49 ** hwtime.h contains inline assembler code for implementing |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 ** When testing, keep a count of the number of open files. | 106 ** When testing, keep a count of the number of open files. |
| 104 */ | 107 */ |
| 105 #ifdef SQLITE_TEST | 108 #ifdef SQLITE_TEST |
| 106 int sqlite3_open_file_count = 0; | 109 int sqlite3_open_file_count = 0; |
| 107 #define OpenCounter(X) sqlite3_open_file_count+=(X) | 110 #define OpenCounter(X) sqlite3_open_file_count+=(X) |
| 108 #else | 111 #else |
| 109 #define OpenCounter(X) | 112 #define OpenCounter(X) |
| 110 #endif | 113 #endif |
| 111 | 114 |
| 112 #endif /* !defined(_OS_COMMON_H_) */ | 115 #endif /* !defined(_OS_COMMON_H_) */ |
| OLD | NEW |