aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 26a653461..b59d768fd 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -12,7 +12,7 @@
**
** This file contains code that is specific to Unix systems.
**
-** $Id: os_unix.c,v 1.211 2008/11/17 19:18:55 danielk1977 Exp $
+** $Id: os_unix.c,v 1.212 2008/11/19 09:05:27 danielk1977 Exp $
*/
#include "sqliteInt.h"
#if SQLITE_OS_UNIX /* This file is used on unix only */
@@ -770,12 +770,12 @@ static int testLockingStyle(int fd){
** If SQLITE_ENABLE_LOCKING_STYLE is not defined, this function always
** returns LOCKING_STYLE_POSIX.
*/
+#if SQLITE_ENABLE_LOCKING_STYLE
static int detectLockingStyle(
sqlite3_vfs *pVfs,
const char *filePath,
int fd
){
-#if SQLITE_ENABLE_LOCKING_STYLE
#if defined(__RTP__) || defined(_WRS_KERNEL)
if( !filePath ){
return LOCKING_STYLE_NONE;
@@ -826,10 +826,12 @@ static int detectLockingStyle(
/* Default case. Handles, amongst others, "nfs". */
return testLockingStyle(fd);
-#endif
-#endif
+#endif /* if defined(__RTP__) || defined(_WRS_KERNEL) */
return LOCKING_STYLE_POSIX;
}
+#else
+ #define detectLockingStyle(x,y,z) LOCKING_STYLE_POSIX
+#endif /* ifdef SQLITE_ENABLE_LOCKING_STYLE */
/*
** Given a file descriptor, locate lockInfo and openCnt structures that