aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/btree.h6
-rw-r--r--src/hash.h6
-rw-r--r--src/hwtime.h6
-rw-r--r--src/msvc.h6
-rw-r--r--src/os.c2
-rw-r--r--src/os_setup.h6
-rw-r--r--src/os_win.c28
-rw-r--r--src/os_win.h6
-rw-r--r--src/pager.h6
-rw-r--r--src/sqlite.h.in6
-rw-r--r--src/sqlite3ext.h6
-rw-r--r--src/sqliteInt.h6
-rw-r--r--src/test_intarray.h6
-rw-r--r--src/test_multiplex.h6
-rw-r--r--src/vdbe.h6
-rw-r--r--src/vdbeInt.h6
-rw-r--r--src/wal.h6
17 files changed, 59 insertions, 61 deletions
diff --git a/src/btree.h b/src/btree.h
index c8b293ef1..b76e2ce21 100644
--- a/src/btree.h
+++ b/src/btree.h
@@ -13,8 +13,8 @@
** subsystem. See comments in the source code for a detailed description
** of what each interface routine does.
*/
-#ifndef _BTREE_H_
-#define _BTREE_H_
+#ifndef SQLITE_BTREE_H
+#define SQLITE_BTREE_H
/* TODO: This definition is just included so other modules compile. It
** needs to be revisited.
@@ -359,4 +359,4 @@ void sqlite3BtreeCursorList(Btree*);
#endif
-#endif /* _BTREE_H_ */
+#endif /* SQLITE_BTREE_H */
diff --git a/src/hash.h b/src/hash.h
index 6dfa4e035..90540eda5 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -12,8 +12,8 @@
** This is the header file for the generic hash-table implementation
** used in SQLite.
*/
-#ifndef _SQLITE_HASH_H_
-#define _SQLITE_HASH_H_
+#ifndef SQLITE_HASH_H
+#define SQLITE_HASH_H
/* Forward declarations of structures. */
typedef struct Hash Hash;
@@ -93,4 +93,4 @@ void sqlite3HashClear(Hash*);
*/
/* #define sqliteHashCount(H) ((H)->count) // NOT USED */
-#endif /* _SQLITE_HASH_H_ */
+#endif /* SQLITE_HASH_H */
diff --git a/src/hwtime.h b/src/hwtime.h
index b8bc5a295..5b209db8a 100644
--- a/src/hwtime.h
+++ b/src/hwtime.h
@@ -13,8 +13,8 @@
** This file contains inline asm code for retrieving "high-performance"
** counters for x86 class CPUs.
*/
-#ifndef _HWTIME_H_
-#define _HWTIME_H_
+#ifndef SQLITE_HWTIME_H
+#define SQLITE_HWTIME_H
/*
** The following routine only works on pentium-class (or newer) processors.
@@ -82,4 +82,4 @@
#endif
-#endif /* !defined(_HWTIME_H_) */
+#endif /* !defined(SQLITE_HWTIME_H) */
diff --git a/src/msvc.h b/src/msvc.h
index 01ebf2b46..3914b05bc 100644
--- a/src/msvc.h
+++ b/src/msvc.h
@@ -12,8 +12,8 @@
**
** This file contains code that is specific to MSVC.
*/
-#ifndef _MSVC_H_
-#define _MSVC_H_
+#ifndef SQLITE_MSVC_H
+#define SQLITE_MSVC_H
#if defined(_MSC_VER)
#pragma warning(disable : 4054)
@@ -33,4 +33,4 @@
#pragma warning(disable : 4706)
#endif /* defined(_MSC_VER) */
-#endif /* _MSVC_H_ */
+#endif /* SQLITE_MSVC_H */
diff --git a/src/os.c b/src/os.c
index 6138bf4f3..5cf001479 100644
--- a/src/os.c
+++ b/src/os.c
@@ -13,9 +13,7 @@
** This file contains OS interface code that is common to all
** architectures.
*/
-#define _SQLITE_OS_C_ 1
#include "sqliteInt.h"
-#undef _SQLITE_OS_C_
/*
** If we compile with the SQLITE_TEST macro set, then the following block
diff --git a/src/os_setup.h b/src/os_setup.h
index 68de1446e..08aaa1195 100644
--- a/src/os_setup.h
+++ b/src/os_setup.h
@@ -13,8 +13,8 @@
** This file contains pre-processor directives related to operating system
** detection and/or setup.
*/
-#ifndef _OS_SETUP_H_
-#define _OS_SETUP_H_
+#ifndef SQLITE_OS_SETUP_H
+#define SQLITE_OS_SETUP_H
/*
** Figure out if we are dealing with Unix, Windows, or some other operating
@@ -54,4 +54,4 @@
# endif
#endif
-#endif /* _OS_SETUP_H_ */
+#endif /* SQLITE_OS_SETUP_H */
diff --git a/src/os_win.c b/src/os_win.c
index 1c861b0fb..622408858 100644
--- a/src/os_win.c
+++ b/src/os_win.c
@@ -3675,12 +3675,12 @@ struct winShm {
/*
** Apply advisory locks for all n bytes beginning at ofst.
*/
-#define _SHM_UNLCK 1
-#define _SHM_RDLCK 2
-#define _SHM_WRLCK 3
+#define WINSHM_UNLCK 1
+#define WINSHM_RDLCK 2
+#define WINSHM_WRLCK 3
static int winShmSystemLock(
winShmNode *pFile, /* Apply locks to this open shared-memory segment */
- int lockType, /* _SHM_UNLCK, _SHM_RDLCK, or _SHM_WRLCK */
+ int lockType, /* WINSHM_UNLCK, WINSHM_RDLCK, or WINSHM_WRLCK */
int ofst, /* Offset to first byte to be locked/unlocked */
int nByte /* Number of bytes to lock or unlock */
){
@@ -3693,12 +3693,12 @@ static int winShmSystemLock(
pFile->hFile.h, lockType, ofst, nByte));
/* Release/Acquire the system-level lock */
- if( lockType==_SHM_UNLCK ){
+ if( lockType==WINSHM_UNLCK ){
rc = winUnlockFile(&pFile->hFile.h, ofst, 0, nByte, 0);
}else{
/* Initialize the locking parameters */
DWORD dwFlags = LOCKFILE_FAIL_IMMEDIATELY;
- if( lockType == _SHM_WRLCK ) dwFlags |= LOCKFILE_EXCLUSIVE_LOCK;
+ if( lockType == WINSHM_WRLCK ) dwFlags |= LOCKFILE_EXCLUSIVE_LOCK;
rc = winLockFile(&pFile->hFile.h, dwFlags, ofst, 0, nByte, 0);
}
@@ -3710,7 +3710,7 @@ static int winShmSystemLock(
}
OSTRACE(("SHM-LOCK file=%p, func=%s, errno=%lu, rc=%s\n",
- pFile->hFile.h, (lockType == _SHM_UNLCK) ? "winUnlockFile" :
+ pFile->hFile.h, (lockType == WINSHM_UNLCK) ? "winUnlockFile" :
"winLockFile", pFile->lastErrno, sqlite3ErrName(rc)));
return rc;
@@ -3838,7 +3838,7 @@ static int winOpenSharedMemory(winFile *pDbFd){
/* Check to see if another process is holding the dead-man switch.
** If not, truncate the file to zero length.
*/
- if( winShmSystemLock(pShmNode, _SHM_WRLCK, WIN_SHM_DMS, 1)==SQLITE_OK ){
+ if( winShmSystemLock(pShmNode, WINSHM_WRLCK, WIN_SHM_DMS, 1)==SQLITE_OK ){
rc = winTruncate((sqlite3_file *)&pShmNode->hFile, 0);
if( rc!=SQLITE_OK ){
rc = winLogError(SQLITE_IOERR_SHMOPEN, osGetLastError(),
@@ -3846,8 +3846,8 @@ static int winOpenSharedMemory(winFile *pDbFd){
}
}
if( rc==SQLITE_OK ){
- winShmSystemLock(pShmNode, _SHM_UNLCK, WIN_SHM_DMS, 1);
- rc = winShmSystemLock(pShmNode, _SHM_RDLCK, WIN_SHM_DMS, 1);
+ winShmSystemLock(pShmNode, WINSHM_UNLCK, WIN_SHM_DMS, 1);
+ rc = winShmSystemLock(pShmNode, WINSHM_RDLCK, WIN_SHM_DMS, 1);
}
if( rc ) goto shm_open_err;
}
@@ -3876,7 +3876,7 @@ static int winOpenSharedMemory(winFile *pDbFd){
/* Jump here on any error */
shm_open_err:
- winShmSystemLock(pShmNode, _SHM_UNLCK, WIN_SHM_DMS, 1);
+ winShmSystemLock(pShmNode, WINSHM_UNLCK, WIN_SHM_DMS, 1);
winShmPurge(pDbFd->pVfs, 0); /* This call frees pShmNode if required */
sqlite3_free(p);
sqlite3_free(pNew);
@@ -3965,7 +3965,7 @@ static int winShmLock(
/* Unlock the system-level locks */
if( (mask & allMask)==0 ){
- rc = winShmSystemLock(pShmNode, _SHM_UNLCK, ofst+WIN_SHM_BASE, n);
+ rc = winShmSystemLock(pShmNode, WINSHM_UNLCK, ofst+WIN_SHM_BASE, n);
}else{
rc = SQLITE_OK;
}
@@ -3993,7 +3993,7 @@ static int winShmLock(
/* Get shared locks at the system level, if necessary */
if( rc==SQLITE_OK ){
if( (allShared & mask)==0 ){
- rc = winShmSystemLock(pShmNode, _SHM_RDLCK, ofst+WIN_SHM_BASE, n);
+ rc = winShmSystemLock(pShmNode, WINSHM_RDLCK, ofst+WIN_SHM_BASE, n);
}else{
rc = SQLITE_OK;
}
@@ -4018,7 +4018,7 @@ static int winShmLock(
** also mark the local connection as being locked.
*/
if( rc==SQLITE_OK ){
- rc = winShmSystemLock(pShmNode, _SHM_WRLCK, ofst+WIN_SHM_BASE, n);
+ rc = winShmSystemLock(pShmNode, WINSHM_WRLCK, ofst+WIN_SHM_BASE, n);
if( rc==SQLITE_OK ){
assert( (p->sharedMask & mask)==0 );
p->exclMask |= mask;
diff --git a/src/os_win.h b/src/os_win.h
index 17d6a2bef..27714ed07 100644
--- a/src/os_win.h
+++ b/src/os_win.h
@@ -12,8 +12,8 @@
**
** This file contains code that is specific to Windows.
*/
-#ifndef _OS_WIN_H_
-#define _OS_WIN_H_
+#ifndef SQLITE_OS_WIN_H
+#define SQLITE_OS_WIN_H
/*
** Include the primary Windows SDK header file.
@@ -85,4 +85,4 @@
# define SQLITE_OS_WIN_THREADS 0
#endif
-#endif /* _OS_WIN_H_ */
+#endif /* SQLITE_OS_WIN_H */
diff --git a/src/pager.h b/src/pager.h
index 69d3bb443..af71d745a 100644
--- a/src/pager.h
+++ b/src/pager.h
@@ -14,8 +14,8 @@
** at a time and provides a journal for rollback.
*/
-#ifndef _PAGER_H_
-#define _PAGER_H_
+#ifndef SQLITE_PAGER_H
+#define SQLITE_PAGER_H
/*
** Default maximum size for persistent journal files. A negative
@@ -229,4 +229,4 @@ void *sqlite3PagerCodec(DbPage *);
# define enable_simulated_io_errors()
#endif
-#endif /* _PAGER_H_ */
+#endif /* SQLITE_PAGER_H */
diff --git a/src/sqlite.h.in b/src/sqlite.h.in
index 55f96dd89..12a07a9b4 100644
--- a/src/sqlite.h.in
+++ b/src/sqlite.h.in
@@ -30,8 +30,8 @@
** the version number) and changes its name to "sqlite3.h" as
** part of the build process.
*/
-#ifndef _SQLITE3_H_
-#define _SQLITE3_H_
+#ifndef SQLITE3_H
+#define SQLITE3_H
#include <stdarg.h> /* Needed for the definition of va_list */
/*
@@ -8218,4 +8218,4 @@ SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(
#ifdef __cplusplus
} /* End of the 'extern "C"' block */
#endif
-#endif /* _SQLITE3_H_ */
+#endif /* SQLITE3_H */
diff --git a/src/sqlite3ext.h b/src/sqlite3ext.h
index 20a2fcdf0..2d38e87ae 100644
--- a/src/sqlite3ext.h
+++ b/src/sqlite3ext.h
@@ -15,8 +15,8 @@
** as extensions by SQLite should #include this file instead of
** sqlite3.h.
*/
-#ifndef _SQLITE3EXT_H_
-#define _SQLITE3EXT_H_
+#ifndef SQLITE3EXT_H
+#define SQLITE3EXT_H
#include "sqlite3.h"
typedef struct sqlite3_api_routines sqlite3_api_routines;
@@ -543,4 +543,4 @@ struct sqlite3_api_routines {
# define SQLITE_EXTENSION_INIT3 /*no-op*/
#endif
-#endif /* _SQLITE3EXT_H_ */
+#endif /* SQLITE3EXT_H */
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index c52cd2992..998a17dac 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -12,8 +12,8 @@
** Internal interface definitions for SQLite.
**
*/
-#ifndef _SQLITEINT_H_
-#define _SQLITEINT_H_
+#ifndef SQLITEINT_H
+#define SQLITEINT_H
/* Special Comments:
**
@@ -4237,4 +4237,4 @@ int sqlite3ThreadJoin(SQLiteThread*, void**);
int sqlite3DbstatRegister(sqlite3*);
#endif
-#endif /* _SQLITEINT_H_ */
+#endif /* SQLITEINT_H */
diff --git a/src/test_intarray.h b/src/test_intarray.h
index 84b1f3fe6..cee55b5da 100644
--- a/src/test_intarray.h
+++ b/src/test_intarray.h
@@ -75,8 +75,8 @@
** action to free the intarray objects.
*/
#include "sqlite3.h"
-#ifndef _INTARRAY_H_
-#define _INTARRAY_H_
+#ifndef SQLITE_INTARRAY_H
+#define SQLITE_INTARRAY_H
/*
** Make sure we can call this stuff from C++.
@@ -125,4 +125,4 @@ SQLITE_API int sqlite3_intarray_bind(
#ifdef __cplusplus
} /* End of the 'extern "C"' block */
#endif
-#endif /* _INTARRAY_H_ */
+#endif /* SQLITE_INTARRAY_H */
diff --git a/src/test_multiplex.h b/src/test_multiplex.h
index d973e4af2..790c778a3 100644
--- a/src/test_multiplex.h
+++ b/src/test_multiplex.h
@@ -20,8 +20,8 @@
**
*/
-#ifndef _TEST_MULTIPLEX_H
-#define _TEST_MULTIPLEX_H
+#ifndef SQLITE_TEST_MULTIPLEX_H
+#define SQLITE_TEST_MULTIPLEX_H
/*
** CAPI: File-control Operations Supported by Multiplex VFS
@@ -96,4 +96,4 @@ extern int sqlite3_multiplex_shutdown(int eForce);
} /* End of the 'extern "C"' block */
#endif
-#endif /* _TEST_MULTIPLEX_H */
+#endif /* SQLITE_TEST_MULTIPLEX_H */
diff --git a/src/vdbe.h b/src/vdbe.h
index 3db32c855..a7bc84cea 100644
--- a/src/vdbe.h
+++ b/src/vdbe.h
@@ -15,8 +15,8 @@
** or VDBE. The VDBE implements an abstract machine that runs a
** simple program to access and modify the underlying database.
*/
-#ifndef _SQLITE_VDBE_H_
-#define _SQLITE_VDBE_H_
+#ifndef SQLITE_VDBE_H
+#define SQLITE_VDBE_H
#include <stdio.h>
/*
@@ -309,4 +309,4 @@ void sqlite3VdbeScanStatus(Vdbe*, int, int, int, LogEst, const char*);
# define sqlite3VdbeScanStatus(a,b,c,d,e)
#endif
-#endif
+#endif /* SQLITE_VDBE_H */
diff --git a/src/vdbeInt.h b/src/vdbeInt.h
index 61561e9dc..ecb4fc5f0 100644
--- a/src/vdbeInt.h
+++ b/src/vdbeInt.h
@@ -15,8 +15,8 @@
** 6000 lines long) it was split up into several smaller files and
** this header information was factored out.
*/
-#ifndef _VDBEINT_H_
-#define _VDBEINT_H_
+#ifndef SQLITE_VDBEINT_H
+#define SQLITE_VDBEINT_H
/*
** The maximum number of times that a statement will try to reparse
@@ -558,4 +558,4 @@ int sqlite3VdbeMemHandleBom(Mem *pMem);
#define ExpandBlob(P) SQLITE_OK
#endif
-#endif /* !defined(_VDBEINT_H_) */
+#endif /* !defined(SQLITE_VDBEINT_H) */
diff --git a/src/wal.h b/src/wal.h
index 97e6ab4f1..6048e7985 100644
--- a/src/wal.h
+++ b/src/wal.h
@@ -14,8 +14,8 @@
** the implementation of each function in log.c for further details.
*/
-#ifndef _WAL_H_
-#define _WAL_H_
+#ifndef SQLITE_WAL_H
+#define SQLITE_WAL_H
#include "sqliteInt.h"
@@ -143,4 +143,4 @@ int sqlite3WalFramesize(Wal *pWal);
sqlite3_file *sqlite3WalFile(Wal *pWal);
#endif /* ifndef SQLITE_OMIT_WAL */
-#endif /* _WAL_H_ */
+#endif /* SQLITE_WAL_H */