diff options
author | mistachkin <mistachkin@noemail.net> | 2015-04-16 03:56:32 +0000 |
---|---|---|
committer | mistachkin <mistachkin@noemail.net> | 2015-04-16 03:56:32 +0000 |
commit | 0cbcffa75d4c4a6036720c6a5bf7d5da5fe3841a (patch) | |
tree | 18fecb303c00e841d0bee6549e639a5ca4d38b49 /src | |
parent | 02b0e267fb17fc89cc962f3a8f81e0212ffbd482 (diff) | |
download | sqlite-0cbcffa75d4c4a6036720c6a5bf7d5da5fe3841a.tar.gz sqlite-0cbcffa75d4c4a6036720c6a5bf7d5da5fe3841a.zip |
Move OSTRACE defines so they are visible to all source files that need them.
FossilOrigin-Name: 72485c97c6de47b8bba63b2a307e7bdeea114040
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/os_common.h | 13 | ||||
-rw-r--r-- | src/sqliteInt.h | 15 |
3 files changed, 15 insertions, 15 deletions
diff --git a/src/main.c b/src/main.c index 043f3e14d..27a0fe58d 100644 --- a/src/main.c +++ b/src/main.c @@ -1206,7 +1206,7 @@ void sqlite3RollbackAll(sqlite3 *db, int tripCode){ ** Return a static string containing the name corresponding to the error code ** specified in the argument. */ -#ifdef SQLITE_HAVE_OS_TRACE +#if defined(SQLITE_DEBUG) || defined(SQLITE_HAVE_OS_TRACE) const char *sqlite3ErrName(int rc){ const char *zName = 0; int i, origRc = rc; diff --git a/src/os_common.h b/src/os_common.h index 24b00f668..d18b95a5f 100644 --- a/src/os_common.h +++ b/src/os_common.h @@ -30,19 +30,6 @@ #endif /* -** Declarations used for tracing the operating system interfaces. -*/ -#if (defined(SQLITE_DEBUG) && SQLITE_OS_WIN) || \ - defined(SQLITE_TEST) || defined(SQLITE_FORCE_OS_TRACE) - extern int sqlite3OSTrace; -# define OSTRACE(X) if( sqlite3OSTrace ) sqlite3DebugPrintf X -# define SQLITE_HAVE_OS_TRACE -#else -# define OSTRACE(X) -# undef SQLITE_HAVE_OS_TRACE -#endif - -/* ** Macros for performance tracing. Normally turned off. Only works ** on i486 hardware. */ diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 769b2afe8..3bea7335d 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -363,6 +363,19 @@ #endif /* +** Declarations used for tracing the operating system interfaces. +*/ +#if (defined(SQLITE_DEBUG) && SQLITE_OS_WIN) || \ + defined(SQLITE_TEST) || defined(SQLITE_FORCE_OS_TRACE) + extern int sqlite3OSTrace; +# define OSTRACE(X) if( sqlite3OSTrace ) sqlite3DebugPrintf X +# define SQLITE_HAVE_OS_TRACE +#else +# define OSTRACE(X) +# undef SQLITE_HAVE_OS_TRACE +#endif + +/* ** Return true (non-zero) if the input is an integer that is too large ** to fit in 32-bits. This macro is used inside of various testcase() ** macros to verify that we have tested SQLite for large-file support. @@ -3493,7 +3506,7 @@ void *sqlite3HexToBlob(sqlite3*, const char *z, int n); u8 sqlite3HexToInt(int h); int sqlite3TwoPartName(Parse *, Token *, Token *, Token **); -#ifdef SQLITE_HAVE_OS_TRACE +#if defined(SQLITE_DEBUG) || defined(SQLITE_HAVE_OS_TRACE) const char *sqlite3ErrName(int); #endif |