OS/2 build bustage in SQLITE due to move to 3.3.4 - #283316 - patch from Daniel Kruse

This commit is contained in:
mkaply%us.ibm.com 2006-03-09 20:04:34 +00:00
Родитель 54a95cf45d
Коммит 36abd0488c
3 изменённых файлов: 691 добавлений и 436 удалений

Просмотреть файл

@ -54,6 +54,14 @@
#if OS_WIN #if OS_WIN
# include <windows.h> # include <windows.h>
# define SQLITE_TEMPNAME_SIZE (MAX_PATH+50) # define SQLITE_TEMPNAME_SIZE (MAX_PATH+50)
#elif OS_OS2
# define INCL_DOSDATETIME
# define INCL_DOSFILEMGR
# define INCL_DOSERRORS
# define INCL_DOSMISC
# define INCL_DOSPROCESS
# include <os2.h>
# define SQLITE_TEMPNAME_SIZE (CCHMAXPATHCOMP)
#else #else
# define SQLITE_TEMPNAME_SIZE 200 # define SQLITE_TEMPNAME_SIZE 200
#endif #endif
@ -79,7 +87,7 @@
#endif #endif
/* /*
** Define the interfaces for Unix and for Windows. ** Define the interfaces for Unix, Windows and OS/2.
*/ */
#if OS_UNIX #if OS_UNIX
#define sqlite3OsOpenReadWrite sqlite3UnixOpenReadWrite #define sqlite3OsOpenReadWrite sqlite3UnixOpenReadWrite
@ -125,6 +133,28 @@
#define sqlite3OsFree sqlite3GenericFree #define sqlite3OsFree sqlite3GenericFree
#define sqlite3OsAllocationSize sqlite3GenericAllocationSize #define sqlite3OsAllocationSize sqlite3GenericAllocationSize
#endif #endif
#if OS_OS2
#define sqlite3OsOpenReadWrite sqlite3Os2OpenReadWrite
#define sqlite3OsOpenExclusive sqlite3Os2OpenExclusive
#define sqlite3OsOpenReadOnly sqlite3Os2OpenReadOnly
#define sqlite3OsDelete sqlite3Os2Delete
#define sqlite3OsFileExists sqlite3Os2FileExists
#define sqlite3OsFullPathname sqlite3Os2FullPathname
#define sqlite3OsIsDirWritable sqlite3Os2IsDirWritable
#define sqlite3OsSyncDirectory sqlite3Os2SyncDirectory
#define sqlite3OsTempFileName sqlite3Os2TempFileName
#define sqlite3OsRandomSeed sqlite3Os2RandomSeed
#define sqlite3OsSleep sqlite3Os2Sleep
#define sqlite3OsCurrentTime sqlite3Os2CurrentTime
#define sqlite3OsEnterMutex sqlite3Os2EnterMutex
#define sqlite3OsLeaveMutex sqlite3Os2LeaveMutex
#define sqlite3OsInMutex sqlite3Os2InMutex
#define sqlite3OsThreadSpecificData sqlite3Os2ThreadSpecificData
#define sqlite3OsMalloc sqlite3GenericMalloc
#define sqlite3OsRealloc sqlite3GenericRealloc
#define sqlite3OsFree sqlite3GenericFree
#define sqlite3OsAllocationSize sqlite3GenericAllocationSize
#endif
/* /*
** If using an alternative OS interface, then we must have an "os_other.h" ** If using an alternative OS interface, then we must have an "os_other.h"

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,57 +0,0 @@
/*
** 2004 May 22
**
** The author disclaims copyright to this source code. In place of
** a legal notice, here is a blessing:
**
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely, never taking more than you give.
**
******************************************************************************
**
** This header file defined OS-specific features for OS/2.
*/
#ifndef _SQLITE_OS_OS2_H_
#define _SQLITE_OS_OS2_H_
/*
** standard include files.
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
/*
** The OsFile structure is a operating-system independing representation
** of an open file handle. It is defined differently for each architecture.
**
** This is the definition for Unix.
**
** OsFile.locktype takes one of the values SHARED_LOCK, RESERVED_LOCK,
** PENDING_LOCK or EXCLUSIVE_LOCK.
*/
typedef struct OsFile OsFile;
struct OsFile {
unsigned long h; /* The file descriptor (LHANDLE) */
int locked; /* True if this user holds the lock */
int delOnClose; /* True if file is to be deleted on close */
char *pathToDel; /* Name of file to delete on close */
unsigned char locktype; /* The type of lock held on this fd */
unsigned char isOpen; /* True if needs to be closed */
unsigned char fullSync;
};
/*
** Maximum number of characters in a temporary file name
*/
#define SQLITE_TEMPNAME_SIZE 200
/*
** Minimum interval supported by sqlite3OsSleep().
*/
#define SQLITE_MIN_SLEEP_MS 1
#endif /* _SQLITE_OS_OS2_H_ */