1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-06 15:49:35 +03:00

Patches to get things working better for OS2. Ticket #1836. (CVS 3217)

FossilOrigin-Name: 65c6e5e117b9194015e382b1ad9bb9c88704eeb7
This commit is contained in:
drh
2006-06-12 12:57:45 +00:00
parent a75803d968
commit cdb36b7dc9
4 changed files with 17 additions and 13 deletions

View File

@@ -12,7 +12,7 @@
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
** $Id: shell.c,v 1.140 2006/06/08 16:10:15 drh Exp $
** $Id: shell.c,v 1.141 2006/06/12 12:57:46 drh Exp $
*/
#include <stdlib.h>
#include <string.h>
@@ -21,7 +21,7 @@
#include "sqlite3.h"
#include <ctype.h>
#if !defined(_WIN32) && !defined(WIN32) && !defined(__MACOS__)
#if !defined(_WIN32) && !defined(WIN32) && !defined(__MACOS__) && !defined(__OS2__)
# include <signal.h>
# include <pwd.h>
# include <unistd.h>
@@ -37,6 +37,10 @@
# include <Folders.h>
#endif
#ifdef __OS2__
# include <unistd.h>
#endif
#if defined(HAVE_READLINE) && HAVE_READLINE==1
# include <readline/readline.h>
# include <readline/history.h>
@@ -1539,7 +1543,7 @@ static void process_input(struct callback_data *p, FILE *in){
static char *find_home_dir(void){
char *home_dir = NULL;
#if !defined(_WIN32) && !defined(WIN32) && !defined(__MACOS__)
#if !defined(_WIN32) && !defined(WIN32) && !defined(__MACOS__) && !defined(__OS2__)
struct passwd *pwent;
uid_t uid = getuid();
if( (pwent=getpwuid(uid)) != NULL) {
@@ -1559,7 +1563,7 @@ static char *find_home_dir(void){
}
}
#if defined(_WIN32) || defined(WIN32)
#if defined(_WIN32) || defined(WIN32) || defined(__OS2__)
if (!home_dir) {
home_dir = "c:";
}