mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
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)
FossilOrigin-Name: cdd4cf4ce2ab363ddc3f27c5e44896e17269a161
This commit is contained in:
65
src/os.h
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
|
||||
|
Reference in New Issue
Block a user