Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change the OS_XXX pre-processor symbols to SQLITE_OS_XXX. Symbols "OS…

…_UNIX", "OS_WIN", "OS_WINCE", "OS_OS2" and "OS_OTHER" are now "SQLITE_OS_UNIX", "SQLITE_OS_WIN", "SQLITE_OS_WINCE", "SQLITE_OS_OS2" and "SQLITE_OS_OTHER", respectively. (CVS 5311)
  • Loading branch information...
commit c6e2ff62ba2ea28a3731597dd5a86539fcbaacd2 1 parent 3bdda7b
Unknown authored
View
2  Makefile.arm-wince-mingw32ce-gcc
@@ -63,7 +63,7 @@ TLIBS =
#OPTS = -DSQLITE_DEBUG=2
#OPTS = -DSQLITE_DEBUG=1
#OPTS =
-OPTS = -DNDEBUG=1 -DOS_WIN=1 -D_WIN32_WCE=1
+OPTS = -DNDEBUG=1 -DSQLITE_OS_WIN=1 -D_WIN32_WCE=1
#OPTS += -DHAVE_FDATASYNC=1
#### The suffix to add to executable files. ".exe" for windows.
View
52 configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for sqlite 3.5.9.
+# Generated by GNU Autoconf 2.59 for sqlite 3.6.0.
#
# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
@@ -416,8 +416,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='sqlite'
PACKAGE_TARNAME='sqlite'
-PACKAGE_VERSION='3.5.9'
-PACKAGE_STRING='sqlite 3.5.9'
+PACKAGE_VERSION='3.6.0'
+PACKAGE_STRING='sqlite 3.6.0'
PACKAGE_BUGREPORT=''
# Factoring default headers for most tests.
@@ -457,7 +457,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS LIBTOOL build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT SED EGREP FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM LN_S AR ac_ct_AR STRIP ac_ct_STRIP RANLIB ac_ct_RANLIB lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK TCLSH_CMD program_prefix VERSION RELEASE VERSION_NUMBER BUILD_CC SQLITE_THREADSAFE XTHREADCONNECT THREADSOVERRIDELOCKS ALLOWRELEASE TEMP_STORE BUILD_EXEEXT OS_UNIX OS_WIN OS_OS2 TARGET_EXEEXT TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIBS TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC HAVE_TCL TARGET_READLINE_LIBS TARGET_READLINE_INC TARGET_HAVE_READLINE TARGET_DEBUG USE_AMALGAMATION LOADEXTENSION_FLAGS USE_GCOV BUILD_CFLAGS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS LIBTOOL build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT SED EGREP FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM LN_S AR ac_ct_AR STRIP ac_ct_STRIP RANLIB ac_ct_RANLIB lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK TCLSH_CMD program_prefix VERSION RELEASE VERSION_NUMBER BUILD_CC SQLITE_THREADSAFE XTHREADCONNECT THREADSOVERRIDELOCKS ALLOWRELEASE TEMP_STORE BUILD_EXEEXT SQLITE_OS_UNIX SQLITE_OS_WIN SQLITE_OS_OS2 TARGET_EXEEXT TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIBS TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC HAVE_TCL TARGET_READLINE_LIBS TARGET_READLINE_INC TARGET_HAVE_READLINE TARGET_DEBUG USE_AMALGAMATION LOADEXTENSION_FLAGS USE_GCOV BUILD_CFLAGS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -926,7 +926,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures sqlite 3.5.9 to adapt to many kinds of systems.
+\`configure' configures sqlite 3.6.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -987,7 +987,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of sqlite 3.5.9:";;
+ short | recursive ) echo "Configuration of sqlite 3.6.0:";;
esac
cat <<\_ACEOF
@@ -1137,7 +1137,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-sqlite configure 3.5.9
+sqlite configure 3.6.0
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1151,7 +1151,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by sqlite $as_me 3.5.9, which was
+It was created by sqlite $as_me 3.6.0, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1489,7 +1489,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# The following RCS revision string applies to configure.in
-# $Revision: 1.60 $
+# $Revision: 1.61 $
#########
# Programs needed
@@ -11261,27 +11261,27 @@ else
fi
if test "$TARGET_EXEEXT" = ".exe"; then
if test $OS2_SHELL ; then
- OS_UNIX=0
- OS_WIN=0
- OS_OS2=1
- CFLAGS="$CFLAGS -DOS_OS2=1"
+ SQLITE_OS_UNIX=0
+ SQLITE_OS_WIN=0
+ SQLITE_OS_OS2=1
+ CFLAGS="$CFLAGS -DSQLITE_OS_OS2=1"
if test "$ac_compiler_gnu" = "yes" ; then
CFLAGS="$CFLAGS -Zomf -Zexe -Zmap"
BUILD_CFLAGS="$BUILD_CFLAGS -Zomf -Zexe"
fi
else
- OS_UNIX=0
- OS_WIN=1
- OS_OS2=0
+ SQLITE_OS_UNIX=0
+ SQLITE_OS_WIN=1
+ SQLITE_OS_OS2=0
tclsubdir=win
- CFLAGS="$CFLAGS -DOS_WIN=1"
+ CFLAGS="$CFLAGS -DSQLITE_OS_WIN=1"
fi
else
- OS_UNIX=1
- OS_WIN=0
- OS_OS2=0
+ SQLITE_OS_UNIX=1
+ SQLITE_OS_WIN=0
+ SQLITE_OS_OS2=0
tclsubdir=unix
- CFLAGS="$CFLAGS -DOS_UNIX=1"
+ CFLAGS="$CFLAGS -DSQLITE_OS_UNIX=1"
fi
@@ -12461,7 +12461,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
-This file was extended by sqlite $as_me 3.5.9, which was
+This file was extended by sqlite $as_me 3.6.0, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12524,7 +12524,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-sqlite config.status 3.5.9
+sqlite config.status 3.6.0
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
@@ -13034,9 +13034,9 @@ s,@THREADSOVERRIDELOCKS@,$THREADSOVERRIDELOCKS,;t t
s,@ALLOWRELEASE@,$ALLOWRELEASE,;t t
s,@TEMP_STORE@,$TEMP_STORE,;t t
s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
-s,@OS_UNIX@,$OS_UNIX,;t t
-s,@OS_WIN@,$OS_WIN,;t t
-s,@OS_OS2@,$OS_OS2,;t t
+s,@SQLITE_OS_UNIX@,$SQLITE_OS_UNIX,;t t
+s,@SQLITE_OS_WIN@,$SQLITE_OS_WIN,;t t
+s,@SQLITE_OS_OS2@,$SQLITE_OS_OS2,;t t
s,@TARGET_EXEEXT@,$TARGET_EXEEXT,;t t
s,@TCL_VERSION@,$TCL_VERSION,;t t
s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
View
32 configure.ac
@@ -92,7 +92,7 @@ AC_INIT(sqlite, m4_esyscmd([cat VERSION | tr -d '\n']))
dnl Put the RCS revision string after AC_INIT so that it will also
dnl show in in configure.
# The following RCS revision string applies to configure.in
-# $Revision: 1.45 $
+# $Revision: 1.46 $
#########
# Programs needed
@@ -340,33 +340,33 @@ else
fi
if test "$TARGET_EXEEXT" = ".exe"; then
if test $OS2_SHELL ; then
- OS_UNIX=0
- OS_WIN=0
- OS_OS2=1
- CFLAGS="$CFLAGS -DOS_OS2=1"
+ SQLITE_OS_UNIX=0
+ SQLITE_OS_WIN=0
+ SQLITE_OS_OS2=1
+ CFLAGS="$CFLAGS -DSQLITE_OS_OS2=1"
if test "$ac_compiler_gnu" = "yes" ; then
CFLAGS="$CFLAGS -Zomf -Zexe -Zmap"
BUILD_CFLAGS="$BUILD_CFLAGS -Zomf -Zexe"
fi
else
- OS_UNIX=0
- OS_WIN=1
- OS_OS2=0
+ SQLITE_OS_UNIX=0
+ SQLITE_OS_WIN=1
+ SQLITE_OS_OS2=0
tclsubdir=win
- CFLAGS="$CFLAGS -DOS_WIN=1"
+ CFLAGS="$CFLAGS -DSQLITE_OS_WIN=1"
fi
else
- OS_UNIX=1
- OS_WIN=0
- OS_OS2=0
+ SQLITE_OS_UNIX=1
+ SQLITE_OS_WIN=0
+ SQLITE_OS_OS2=0
tclsubdir=unix
- CFLAGS="$CFLAGS -DOS_UNIX=1"
+ CFLAGS="$CFLAGS -DSQLITE_OS_UNIX=1"
fi
AC_SUBST(BUILD_EXEEXT)
-AC_SUBST(OS_UNIX)
-AC_SUBST(OS_WIN)
-AC_SUBST(OS_OS2)
+AC_SUBST(SQLITE_OS_UNIX)
+AC_SUBST(SQLITE_OS_WIN)
+AC_SUBST(SQLITE_OS_OS2)
AC_SUBST(TARGET_EXEEXT)
##########
View
2  mkdll.sh
@@ -10,7 +10,7 @@ make sqlite3.c
PATH=$PATH:/opt/mingw/bin
TCLDIR=/home/drh/tcltk/846/win/846win
TCLSTUBLIB=$TCLDIR/libtcl84stub.a
-OPTS='-DUSE_TCL_STUBS=1 -DSQLITE_THREADSAFE=1 -DBUILD_sqlite=1 -DOS_WIN=1'
+OPTS='-DUSE_TCL_STUBS=1 -DSQLITE_THREADSAFE=1 -DBUILD_sqlite=1 -DSQLITE_OS_WIN=1'
OPTS="$OPTS -DSQLITE_ENABLE_FTS3=1"
CC="i386-mingw32msvc-gcc -Os $OPTS -Itsrc -I$TCLDIR"
NM="i386-mingw32msvc-nm"
View
2  mkextw.sh
@@ -4,7 +4,7 @@
#
make fts2amal.c
PATH=$PATH:/opt/mingw/bin
-OPTS='-DTHREADSAFE=1 -DBUILD_sqlite=1 -DOS_WIN=1'
+OPTS='-DTHREADSAFE=1 -DBUILD_sqlite=1 -DSQLITE_OS_WIN=1'
CC="i386-mingw32msvc-gcc -O2 $OPTS -Itsrc"
NM="i386-mingw32msvc-nm"
CMD="$CC -c fts2amal.c"
View
4 src/main.c
@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
-** $Id: main.c,v 1.463 2008/06/26 08:29:34 danielk1977 Exp $
+** $Id: main.c,v 1.464 2008/06/26 10:41:19 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -524,7 +524,7 @@ static int sqliteDefaultBusyCallback(
void *ptr, /* Database connection */
int count /* Number of times table has been busy */
){
-#if OS_WIN || (defined(HAVE_USLEEP) && HAVE_USLEEP)
+#if SQLITE_OS_WIN || (defined(HAVE_USLEEP) && HAVE_USLEEP)
static const u8 delays[] =
{ 1, 2, 5, 10, 15, 20, 25, 25, 25, 50, 50, 100 };
static const u8 totals[] =
View
8 src/mutex.h
@@ -19,7 +19,7 @@
** Source files should #include the sqliteInt.h file and let that file
** include this one indirectly.
**
-** $Id: mutex.h,v 1.7 2008/06/19 01:50:09 drh Exp $
+** $Id: mutex.h,v 1.8 2008/06/26 10:41:19 danielk1977 Exp $
*/
@@ -53,15 +53,15 @@
# undef SQLITE_MUTEX_NOOP
# define SQLITE_MUTEX_NOOP_DEBUG
#endif
-#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && OS_UNIX
+#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && SQLITE_OS_UNIX
# undef SQLITE_MUTEX_NOOP
# define SQLITE_MUTEX_PTHREADS
#endif
-#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && OS_WIN
+#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && SQLITE_OS_WIN
# undef SQLITE_MUTEX_NOOP
# define SQLITE_MUTEX_W32
#endif
-#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && OS_OS2
+#if defined(SQLITE_MUTEX_NOOP) && SQLITE_THREADSAFE && SQLITE_OS_OS2
# undef SQLITE_MUTEX_NOOP
# define SQLITE_MUTEX_OS2
#endif
View
6 src/mutex_w32.c
@@ -11,7 +11,7 @@
*************************************************************************
** This file contains the C functions that implement mutexes for win32
**
-** $Id: mutex_w32.c,v 1.10 2008/06/19 16:07:07 drh Exp $
+** $Id: mutex_w32.c,v 1.11 2008/06/26 10:41:19 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -42,7 +42,7 @@ struct sqlite3_mutex {
** WinNT/2K/XP so that we will know whether or not we can safely call
** the LockFileEx() API.
*/
-#if OS_WINCE
+#if SQLITE_OS_WINCE
# define mutexIsNT() (1)
#else
static int mutexIsNT(void){
@@ -55,7 +55,7 @@ struct sqlite3_mutex {
}
return osType==2;
}
-#endif /* OS_WINCE */
+#endif /* SQLITE_OS_WINCE */
#ifdef SQLITE_DEBUG
View
4 src/os.c
@@ -13,7 +13,7 @@
** This file contains OS interface code that is common to all
** architectures.
**
-** $Id: os.c,v 1.117 2008/06/26 08:29:34 danielk1977 Exp $
+** $Id: os.c,v 1.118 2008/06/26 10:41:19 danielk1977 Exp $
*/
#define _SQLITE_OS_C_ 1
#include "sqliteInt.h"
@@ -36,7 +36,7 @@
** sqlite3OsLock()
**
*/
-#if defined(SQLITE_TEST) && (OS_WIN==0)
+#if defined(SQLITE_TEST) && (SQLITE_OS_WIN==0)
#define DO_OS_MALLOC_TEST if (1) { \
void *pTstAlloc = sqlite3Malloc(10); \
if (!pTstAlloc) return SQLITE_IOERR_NOMEM; \
View
65 src/os.h
@@ -17,7 +17,7 @@
** This header file is #include-ed by sqliteInt.h and thus ends up
** being included by every source file.
**
-** $Id: os.h,v 1.104 2008/06/25 17:19:01 danielk1977 Exp $
+** $Id: os.h,v 1.105 2008/06/26 10:41:19 danielk1977 Exp $
*/
#ifndef _SQLITE_OS_H_
#define _SQLITE_OS_H_
@@ -25,44 +25,45 @@
/*
** Figure out if we are dealing with Unix, Windows, or some other
** operating system. After the following block of preprocess macros,
-** all of OS_UNIX, OS_WIN, OS_OS2, and OS_OTHER will defined to either
-** 1 or 0. One of the four will be 1. The other three will be 0.
+** all of SQLITE_OS_UNIX, SQLITE_OS_WIN, SQLITE_OS_OS2, and SQLITE_OS_OTHER
+** will defined to either 1 or 0. One of the four will be 1. The other
+** three will be 0.
*/
-#if defined(OS_OTHER)
-# if OS_OTHER==1
-# undef OS_UNIX
-# define OS_UNIX 0
-# undef OS_WIN
-# define OS_WIN 0
-# undef OS_OS2
-# define OS_OS2 0
+#if defined(SQLITE_OS_OTHER)
+# if SQLITE_OS_OTHER==1
+# undef SQLITE_OS_UNIX
+# define SQLITE_OS_UNIX 0
+# undef SQLITE_OS_WIN
+# define SQLITE_OS_WIN 0
+# undef SQLITE_OS_OS2
+# define SQLITE_OS_OS2 0
# else
-# undef OS_OTHER
+# undef SQLITE_OS_OTHER
# endif
#endif
-#if !defined(OS_UNIX) && !defined(OS_OTHER)
-# define OS_OTHER 0
-# ifndef OS_WIN
+#if !defined(SQLITE_OS_UNIX) && !defined(SQLITE_OS_OTHER)
+# define SQLITE_OS_OTHER 0
+# ifndef SQLITE_OS_WIN
# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__)
-# define OS_WIN 1
-# define OS_UNIX 0
-# define OS_OS2 0
+# define SQLITE_OS_WIN 1
+# define SQLITE_OS_UNIX 0
+# define SQLITE_OS_OS2 0
# elif defined(__EMX__) || defined(_OS2) || defined(OS2) || defined(_OS2_) || defined(__OS2__)
-# define OS_WIN 0
-# define OS_UNIX 0
-# define OS_OS2 1
+# define SQLITE_OS_WIN 0
+# define SQLITE_OS_UNIX 0
+# define SQLITE_OS_OS2 1
# else
-# define OS_WIN 0
-# define OS_UNIX 1
-# define OS_OS2 0
+# define SQLITE_OS_WIN 0
+# define SQLITE_OS_UNIX 1
+# define SQLITE_OS_OS2 0
# endif
# else
-# define OS_UNIX 0
-# define OS_OS2 0
+# define SQLITE_OS_UNIX 0
+# define SQLITE_OS_OS2 0
# endif
#else
-# ifndef OS_WIN
-# define OS_WIN 0
+# ifndef SQLITE_OS_WIN
+# define SQLITE_OS_WIN 0
# endif
#endif
@@ -71,19 +72,19 @@
** reduced API.
*/
#if defined(_WIN32_WCE)
-# define OS_WINCE 1
+# define SQLITE_OS_WINCE 1
#else
-# define OS_WINCE 0
+# define SQLITE_OS_WINCE 0
#endif
/*
** Define the maximum size of a temporary filename
*/
-#if OS_WIN
+#if SQLITE_OS_WIN
# include <windows.h>
# define SQLITE_TEMPNAME_SIZE (MAX_PATH+50)
-#elif OS_OS2
+#elif SQLITE_OS_OS2
# if (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ >= 3) && defined(OS2_HIGH_MEMORY)
# include <os2safe.h> /* has to be included before os2.h for linking to work */
# endif
View
6 src/os_os2.c
@@ -12,12 +12,12 @@
**
** This file contains code that is specific to OS/2.
**
-** $Id: os_os2.c,v 1.46 2008/06/25 17:19:01 danielk1977 Exp $
+** $Id: os_os2.c,v 1.47 2008/06/26 10:41:19 danielk1977 Exp $
*/
#include "sqliteInt.h"
-#if OS_OS2
+#if SQLITE_OS_OS2
/*
** A Note About Memory Allocation:
@@ -1077,4 +1077,4 @@ int sqlite3_os_end(void){
return SQLITE_OK;
}
-#endif /* OS_OS2 */
+#endif /* SQLITE_OS_OS2 */
View
6 src/os_unix.c
@@ -12,10 +12,10 @@
**
** This file contains code that is specific to Unix systems.
**
-** $Id: os_unix.c,v 1.189 2008/06/25 17:19:01 danielk1977 Exp $
+** $Id: os_unix.c,v 1.190 2008/06/26 10:41:19 danielk1977 Exp $
*/
#include "sqliteInt.h"
-#if OS_UNIX /* This file is used on unix only */
+#if SQLITE_OS_UNIX /* This file is used on unix only */
/* #define SQLITE_ENABLE_LOCKING_STYLE 0 */
@@ -2811,4 +2811,4 @@ int sqlite3_os_end(void){
return SQLITE_OK;
}
-#endif /* OS_UNIX */
+#endif /* SQLITE_OS_UNIX */
View
44 src/os_win.c
@@ -12,10 +12,10 @@
**
** This file contains code that is specific to windows.
**
-** $Id: os_win.c,v 1.128 2008/06/25 17:19:01 danielk1977 Exp $
+** $Id: os_win.c,v 1.129 2008/06/26 10:41:19 danielk1977 Exp $
*/
#include "sqliteInt.h"
-#if OS_WIN /* This file is used for windows only */
+#if SQLITE_OS_WIN /* This file is used for windows only */
/*
@@ -66,7 +66,7 @@
** Determine if we are dealing with WindowsCE - which has a much
** reduced API.
*/
-#if defined(OS_WINCE)
+#if defined(SQLITE_OS_WINCE)
# define AreFileApisANSI() 1
#endif
@@ -74,7 +74,7 @@
** WinCE lacks native support for file locking so we have to fake it
** with some code of our own.
*/
-#if OS_WINCE
+#if SQLITE_OS_WINCE
typedef struct winceLock {
int nReaders; /* Number of reader locks obtained */
BOOL bPending; /* Indicates a pending lock has been obtained */
@@ -93,7 +93,7 @@ struct winFile {
HANDLE h; /* Handle for accessing the file */
unsigned char locktype; /* Type of lock currently held on this file */
short sharedLockByte; /* Randomly chosen byte used as a shared lock */
-#if OS_WINCE
+#if SQLITE_OS_WINCE
WCHAR *zDeleteOnClose; /* Name of file to delete when closing */
HANDLE hMutex; /* Mutex used to control access to shared lock */
HANDLE hShared; /* Shared memory segment used for locking */
@@ -132,7 +132,7 @@ static int sqlite3_os_type = 0;
** WinNT/2K/XP so that we will know whether or not we can safely call
** the LockFileEx() API.
*/
-#if OS_WINCE
+#if SQLITE_OS_WINCE
# define isNT() (1)
#else
static int isNT(void){
@@ -144,7 +144,7 @@ static int sqlite3_os_type = 0;
}
return sqlite3_os_type==2;
}
-#endif /* OS_WINCE */
+#endif /* SQLITE_OS_WINCE */
/*
** Convert a UTF-8 string to microsoft unicode (UTF-16?).
@@ -275,7 +275,7 @@ static char *utf8ToMbcs(const char *zFilename){
return zFilenameMbcs;
}
-#if OS_WINCE
+#if SQLITE_OS_WINCE
/*************************************************************************
** This section contains code for WinCE only.
*/
@@ -579,7 +579,7 @@ static BOOL winceLockFileEx(
/*
** End of the special code for wince
*****************************************************************************/
-#endif /* OS_WINCE */
+#endif /* SQLITE_OS_WINCE */
/*****************************************************************************
** The next group of routines implement the I/O methods specified
@@ -604,7 +604,7 @@ static int winClose(sqlite3_file *id){
do{
rc = CloseHandle(pFile->h);
}while( rc==0 && cnt++ < MX_CLOSE_ATTEMPT && (Sleep(100), 1) );
-#if OS_WINCE
+#if SQLITE_OS_WINCE
#define WINCE_DELETION_ATTEMPTS 3
winceDestroyLock(pFile);
if( pFile->zDeleteOnClose ){
@@ -1179,7 +1179,7 @@ static int winOpen(
dwShareMode = 0;
}
if( flags & SQLITE_OPEN_DELETEONCLOSE ){
-#if OS_WINCE
+#if SQLITE_OS_WINCE
dwFlagsAndAttributes = FILE_ATTRIBUTE_HIDDEN;
#else
dwFlagsAndAttributes = FILE_ATTRIBUTE_TEMPORARY
@@ -1204,7 +1204,7 @@ static int winOpen(
NULL
);
}else{
-#if OS_WINCE
+#if SQLITE_OS_WINCE
return SQLITE_NOMEM;
#else
h = CreateFileA((char*)zConverted,
@@ -1236,7 +1236,7 @@ static int winOpen(
memset(pFile, 0, sizeof(*pFile));
pFile->pMethod = &winIoMethod;
pFile->h = h;
-#if OS_WINCE
+#if SQLITE_OS_WINCE
if( (flags & (SQLITE_OPEN_READWRITE|SQLITE_OPEN_MAIN_DB)) ==
(SQLITE_OPEN_READWRITE|SQLITE_OPEN_MAIN_DB)
&& !winceCreateLock(zName, pFile)
@@ -1287,7 +1287,7 @@ static int winDelete(
}while( (rc = GetFileAttributesW(zConverted))!=0xffffffff
&& cnt++ < MX_DELETION_ATTEMPTS && (Sleep(100), 1) );
}else{
-#if OS_WINCE
+#if SQLITE_OS_WINCE
return SQLITE_NOMEM;
#else
do{
@@ -1319,7 +1319,7 @@ static int winAccess(
if( isNT() ){
attr = GetFileAttributesW((WCHAR*)zConverted);
}else{
-#if OS_WINCE
+#if SQLITE_OS_WINCE
return SQLITE_NOMEM;
#else
attr = GetFileAttributesA((char*)zConverted);
@@ -1359,13 +1359,13 @@ static int winFullPathname(
return SQLITE_OK;
#endif
-#if OS_WINCE
+#if SQLITE_OS_WINCE
/* WinCE has no concept of a relative pathname, or so I am told. */
sqlite3_snprintf(pVfs->mxPathname, zFull, "%s", zRelative);
return SQLITE_OK;
#endif
-#if !OS_WINCE && !defined(__CYGWIN__)
+#if !SQLITE_OS_WINCE && !defined(__CYGWIN__)
int nByte;
void *zConverted;
char *zOut;
@@ -1423,7 +1423,7 @@ static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){
if( isNT() ){
h = LoadLibraryW((WCHAR*)zConverted);
}else{
-#if OS_WINCE
+#if SQLITE_OS_WINCE
return 0;
#else
h = LoadLibraryA((char*)zConverted);
@@ -1433,7 +1433,7 @@ static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){
return (void*)h;
}
static void winDlError(sqlite3_vfs *pVfs, int nBuf, char *zBufOut){
-#if OS_WINCE
+#if SQLITE_OS_WINCE
int error = GetLastError();
if( error>0x7FFFFFF ){
sqlite3_snprintf(nBuf, zBufOut, "OsError 0x%x", error);
@@ -1453,7 +1453,7 @@ static void winDlError(sqlite3_vfs *pVfs, int nBuf, char *zBufOut){
#endif
}
void *winDlSym(sqlite3_vfs *pVfs, void *pHandle, const char *zSymbol){
-#if OS_WINCE
+#if SQLITE_OS_WINCE
/* The GetProcAddressA() routine is only available on wince. */
return GetProcAddressA((HANDLE)pHandle, zSymbol);
#else
@@ -1531,7 +1531,7 @@ int winCurrentTime(sqlite3_vfs *pVfs, double *prNow){
100-nanosecond intervals since January 1, 1601 (= JD 2305813.5).
*/
double now;
-#if OS_WINCE
+#if SQLITE_OS_WINCE
SYSTEMTIME time;
GetSystemTime(&time);
SystemTimeToFileTime(&time,&ft);
@@ -1584,4 +1584,4 @@ int sqlite3_os_end(void){
return SQLITE_OK;
}
-#endif /* OS_WIN */
+#endif /* SQLITE_OS_WIN */
View
4 src/shell.c
@@ -12,7 +12,7 @@
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
-** $Id: shell.c,v 1.181 2008/06/23 21:26:05 mihailim Exp $
+** $Id: shell.c,v 1.182 2008/06/26 10:41:19 danielk1977 Exp $
*/
#include <stdlib.h>
#include <string.h>
@@ -1946,7 +1946,7 @@ int main(int argc, char **argv){
}
}
if( i<argc ){
-#if defined(OS_OS2) && OS_OS2
+#if defined(SQLITE_OS_OS2) && SQLITE_OS_OS2
data.zDbFilename = (const char *)convertCpPathToUtf8( argv[i++] );
#else
data.zDbFilename = argv[i++];
View
10 src/test1.c
@@ -13,7 +13,7 @@
** is not included in the SQLite library. It is used for automated
** testing of the SQLite library.
**
-** $Id: test1.c,v 1.306 2008/06/19 02:52:25 drh Exp $
+** $Id: test1.c,v 1.307 2008/06/26 10:41:19 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
@@ -4736,10 +4736,10 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
extern int sqlite3_pager_writedb_count;
extern int sqlite3_pager_writej_count;
extern int sqlite3_pager_pgfree_count;
-#if OS_UNIX && defined(SQLITE_TEST) && SQLITE_THREADSAFE
+#if SQLITE_OS_UNIX && defined(SQLITE_TEST) && SQLITE_THREADSAFE
extern int threadsOverrideEachOthersLocks;
#endif
-#if OS_WIN
+#if SQLITE_OS_WIN
extern int sqlite3_os_type;
#endif
#ifdef SQLITE_DEBUG
@@ -4788,7 +4788,7 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
Tcl_LinkVar(interp, "unaligned_string_counter",
(char*)&unaligned_string_counter, TCL_LINK_INT);
#endif
-#if OS_UNIX && defined(SQLITE_TEST) && SQLITE_THREADSAFE
+#if SQLITE_OS_UNIX && defined(SQLITE_TEST) && SQLITE_THREADSAFE
Tcl_LinkVar(interp, "threadsOverrideEachOthersLocks",
(char*)&threadsOverrideEachOthersLocks, TCL_LINK_INT);
#endif
@@ -4796,7 +4796,7 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
Tcl_LinkVar(interp, "sqlite_last_needed_collation",
(char*)&pzNeededCollation, TCL_LINK_STRING|TCL_LINK_READ_ONLY);
#endif
-#if OS_WIN
+#if SQLITE_OS_WIN
Tcl_LinkVar(interp, "sqlite_os_type",
(char*)&sqlite3_os_type, TCL_LINK_INT);
#endif
View
6 src/test4.c
@@ -11,11 +11,11 @@
*************************************************************************
** Code for testing the the SQLite library in a multithreaded environment.
**
-** $Id: test4.c,v 1.21 2007/08/22 11:41:18 drh Exp $
+** $Id: test4.c,v 1.22 2008/06/26 10:41:19 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
-#if defined(OS_UNIX) && OS_UNIX==1 && SQLITE_THREADSAFE
+#if defined(SQLITE_OS_UNIX) && OS_UNIX==1 && SQLITE_THREADSAFE
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
@@ -713,4 +713,4 @@ int Sqlitetest4_Init(Tcl_Interp *interp){
}
#else
int Sqlitetest4_Init(Tcl_Interp *interp){ return TCL_OK; }
-#endif /* OS_UNIX */
+#endif /* SQLITE_OS_UNIX */
View
6 src/test7.c
@@ -12,7 +12,7 @@
** Code for testing the client/server version of the SQLite library.
** Derived from test4.c.
**
-** $Id: test7.c,v 1.10 2007/10/05 15:04:13 danielk1977 Exp $
+** $Id: test7.c,v 1.11 2008/06/26 10:41:19 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
@@ -22,7 +22,7 @@
** the SQLITE_SERVER option.
*/
#if defined(SQLITE_SERVER) && !defined(SQLITE_OMIT_SHARED_CACHE) && \
- defined(OS_UNIX) && OS_UNIX && SQLITE_THREADSAFE
+ defined(SQLITE_OS_UNIX) && OS_UNIX && SQLITE_THREADSAFE
#include <stdlib.h>
#include <string.h>
@@ -720,4 +720,4 @@ int Sqlitetest7_Init(Tcl_Interp *interp){
}
#else
int Sqlitetest7_Init(Tcl_Interp *interp){ return TCL_OK; }
-#endif /* OS_UNIX */
+#endif /* SQLITE_OS_UNIX */
View
10 src/test_async.c
@@ -10,7 +10,7 @@
**
*************************************************************************
**
-** $Id: test_async.c,v 1.44 2008/06/06 11:11:26 danielk1977 Exp $
+** $Id: test_async.c,v 1.45 2008/06/26 10:41:19 danielk1977 Exp $
**
** This file contains an example implementation of an asynchronous IO
** backend for SQLite.
@@ -117,7 +117,7 @@
** This test uses pthreads and hence only works on unix and with
** a threadsafe build of SQLite.
*/
-#if OS_UNIX && SQLITE_THREADSAFE
+#if SQLITE_OS_UNIX && SQLITE_THREADSAFE
/*
** This demo uses pthreads. If you do not have a pthreads implementation
@@ -1696,7 +1696,7 @@ static int testAsyncWait(
}
-#endif /* OS_UNIX and SQLITE_THREADSAFE */
+#endif /* SQLITE_OS_UNIX and SQLITE_THREADSAFE */
/*
** This routine registers the custom TCL commands defined in this
@@ -1704,7 +1704,7 @@ static int testAsyncWait(
** of this module.
*/
int Sqlitetestasync_Init(Tcl_Interp *interp){
-#if OS_UNIX && SQLITE_THREADSAFE
+#if SQLITE_OS_UNIX && SQLITE_THREADSAFE
Tcl_CreateObjCommand(interp,"sqlite3async_enable",testAsyncEnable,0,0);
Tcl_CreateObjCommand(interp,"sqlite3async_halt",testAsyncHalt,0,0);
Tcl_CreateObjCommand(interp,"sqlite3async_delay",testAsyncDelay,0,0);
@@ -1712,6 +1712,6 @@ int Sqlitetestasync_Init(Tcl_Interp *interp){
Tcl_CreateObjCommand(interp,"sqlite3async_wait",testAsyncWait,0,0);
Tcl_LinkVar(interp, "sqlite3async_trace",
(char*)&sqlite3async_trace, TCL_LINK_INT);
-#endif /* OS_UNIX and SQLITE_THREADSAFE */
+#endif /* SQLITE_OS_UNIX and SQLITE_THREADSAFE */
return TCL_OK;
}
View
4 src/test_config.c
@@ -16,7 +16,7 @@
** The focus of this file is providing the TCL testing layer
** access to compile-time constants.
**
-** $Id: test_config.c,v 1.28 2008/06/25 14:57:54 danielk1977 Exp $
+** $Id: test_config.c,v 1.29 2008/06/26 10:41:19 danielk1977 Exp $
*/
#include "sqliteLimit.h"
@@ -183,7 +183,7 @@ static void set_options(Tcl_Interp *interp){
Tcl_SetVar2(interp, "sqlite_options", "conflict", "1", TCL_GLOBAL_ONLY);
#endif
-#if OS_UNIX
+#if SQLITE_OS_UNIX
Tcl_SetVar2(interp, "sqlite_options", "crashtest", "1", TCL_GLOBAL_ONLY);
#else
Tcl_SetVar2(interp, "sqlite_options", "crashtest", "0", TCL_GLOBAL_ONLY);
View
6 src/test_server.c
@@ -10,7 +10,7 @@
**
******************************************************************************
**
-** $Id: test_server.c,v 1.7 2008/05/16 04:51:55 danielk1977 Exp $
+** $Id: test_server.c,v 1.8 2008/06/26 10:41:19 danielk1977 Exp $
**
** This file contains demonstration code. Nothing in this file gets compiled
** or linked into the SQLite library unless you use a non-standard option:
@@ -208,7 +208,7 @@
** and only if the SQLITE_SERVER macro is defined.
*/
#if defined(SQLITE_SERVER) && !defined(SQLITE_OMIT_SHARED_CACHE)
-#if defined(OS_UNIX) && OS_UNIX && SQLITE_THREADSAFE
+#if defined(SQLITE_OS_UNIX) && OS_UNIX && SQLITE_THREADSAFE
/*
** We require only pthreads and the public interface of SQLite.
@@ -489,5 +489,5 @@ void sqlite3_server_stop(void){
pthread_mutex_unlock(&g.serverMutex);
}
-#endif /* defined(OS_UNIX) && OS_UNIX && SQLITE_THREADSAFE */
+#endif /* defined(SQLITE_OS_UNIX) && OS_UNIX && SQLITE_THREADSAFE */
#endif /* defined(SQLITE_SERVER) */
View
4 tool/omittest.tcl
@@ -1,5 +1,5 @@
-set rcsid {$Id: omittest.tcl,v 1.3 2007/09/14 16:20:01 danielk1977 Exp $}
+set rcsid {$Id: omittest.tcl,v 1.4 2008/06/26 10:41:19 danielk1977 Exp $}
# Documentation for this script. This may be output to stderr
# if the script is invoked incorrectly.
@@ -47,7 +47,7 @@ they do not respect the OPTS variable.
#
proc run_quick_test {dir omit_symbol_list} {
# Compile the value of the OPTS Makefile variable.
- set opts "-DSQLITE_MEMDEBUG=2 -DSQLITE_DEBUG -DOS_UNIX"
+ set opts "-DSQLITE_MEMDEBUG=2 -DSQLITE_DEBUG -DSQLITE_OS_UNIX"
foreach sym $omit_symbol_list {
append opts " -D${sym}=1"
}
View
4 tool/soak1.tcl
@@ -78,7 +78,7 @@ scenario 2 {Everything} {
}
scenario 3 {Customer-1} {
SQLITE_DEBUG=1 SQLITE_MEMDEBUG=1
- THREADSAFE=1 OS_UNIX=1
+ THREADSAFE=1 SQLITE_OS_UNIX=1
SQLITE_DISABLE_LFS=1
SQLITE_DEFAULT_AUTOVACUUM=1
SQLITE_DEFAULT_PAGE_SIZE=1024
@@ -93,7 +93,7 @@ scenario 3 {Customer-1} {
}
scenario 4 {Small-Cache} {
SQLITE_DEBUG=1 SQLITE_MEMDEBUG=1
- THREADSAFE=1 OS_UNIX=1
+ THREADSAFE=1 SQLITE_OS_UNIX=1
SQLITE_DEFAULT_AUTOVACUUM=1
SQLITE_DEFAULT_PAGE_SIZE=1024
SQLITE_MAX_PAGE_SIZE=2048
Please sign in to comment.
Something went wrong with that request. Please try again.