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

Use macro __DARWIN__ rather than __MACOS__ for conditional

compilation of MacOSX specific features.  Ticket #2780. (CVS 4561)

FossilOrigin-Name: d0a4c2a36385c03dfadbb844823d0ed2458bf619
This commit is contained in:
drh
2007-11-26 22:54:27 +00:00
parent f998b730dd
commit 454ad58c3f
4 changed files with 13 additions and 31 deletions

View File

@@ -1,5 +1,5 @@
C Additional\sout-of-memory\stesting.\s\sFix\sbugs\scaused\sby\smalloc\sfailures\sin\nwhere.c.\s\sTickets\s#2794,\s#2795,\s#2796,\sand\s#2797.\s(CVS\s4560) C Use\smacro\s__DARWIN__\srather\sthan\s__MACOS__\sfor\sconditional\ncompilation\sof\sMacOSX\sspecific\sfeatures.\s\sTicket\s#2780.\s(CVS\s4561)
D 2007-11-26T13:36:00 D 2007-11-26T22:54:27
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7 F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
F Makefile.in 35396fd58890420b29edcf27b6c0e2d054862a6b F Makefile.in 35396fd58890420b29edcf27b6c0e2d054862a6b
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -131,10 +131,10 @@ F src/printf.c 96c8d55315a13fc53cb3754cb15046f3ff891ea2
F src/random.c 4a22746501bf36b0a088c66e38dde5daba6a35da F src/random.c 4a22746501bf36b0a088c66e38dde5daba6a35da
F src/select.c 7c0ab94b8f287eb94fdb1eb101be603832ecfc34 F src/select.c 7c0ab94b8f287eb94fdb1eb101be603832ecfc34
F src/server.c 087b92a39d883e3fa113cae259d64e4c7438bc96 F src/server.c 087b92a39d883e3fa113cae259d64e4c7438bc96
F src/shell.c 5b950381f6fb030f123fcd41ae3fdf431c9b0689 F src/shell.c c97be281cfc3dcb14902f45e4b16f20038eb83ff
F src/sqlite.h.in 75ae0863db3a0b074868a6157e34b646dbe143dd F src/sqlite.h.in 75ae0863db3a0b074868a6157e34b646dbe143dd
F src/sqlite3ext.h a93f59cdee3638dc0c9c086f80df743a4e68c3cb F src/sqlite3ext.h a93f59cdee3638dc0c9c086f80df743a4e68c3cb
F src/sqliteInt.h 4e6fdeb5630ead97bcec60b941e7a72203c64b9e F src/sqliteInt.h 4498ab4210ee3481a0a785e5e9020a412f7d1156
F src/sqliteLimit.h 15ffe2116746c27ace2b428a26a4fcd6dba6fa65 F src/sqliteLimit.h 15ffe2116746c27ace2b428a26a4fcd6dba6fa65
F src/table.c 1aeb9eab57b4235db86fe15a35dec76fb445a9c4 F src/table.c 1aeb9eab57b4235db86fe15a35dec76fb445a9c4
F src/tclsqlite.c 9923abeffc9b3d7dad58e92b319661521f60debf F src/tclsqlite.c 9923abeffc9b3d7dad58e92b319661521f60debf
@@ -592,7 +592,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
P 94f25fc1129c7fb8697a67e509ab9de54a173a58 P 5e02dbabcfa42173adff234c086df1e962824c92
R 6d662c50cad0936ec8482eb8accdbc47 R 48a06aa36c83561109ee0fdfde0fed78
U drh U drh
Z c43df1a7af430a19f4c80905dfdc39c8 Z 6e81ebc36d92b688936576124ed71082

View File

@@ -1 +1 @@
5e02dbabcfa42173adff234c086df1e962824c92 d0a4c2a36385c03dfadbb844823d0ed2458bf619

View File

@@ -12,7 +12,7 @@
** This file contains code to implement the "sqlite" command line ** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases. ** utility for accessing SQLite databases.
** **
** $Id: shell.c,v 1.169 2007/11/12 21:09:11 chw Exp $ ** $Id: shell.c,v 1.170 2007/11/26 22:54:27 drh Exp $
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@@ -22,22 +22,13 @@
#include <ctype.h> #include <ctype.h>
#include <stdarg.h> #include <stdarg.h>
#if !defined(_WIN32) && !defined(WIN32) && !defined(__MACOS__) && !defined(__OS2__) #if !defined(_WIN32) && !defined(WIN32) && !defined(__OS2__)
# include <signal.h> # include <signal.h>
# include <pwd.h> # include <pwd.h>
# include <unistd.h> # include <unistd.h>
# include <sys/types.h> # include <sys/types.h>
#endif #endif
#ifdef __MACOS__
# include <console.h>
# include <signal.h>
# include <unistd.h>
# include <extras.h>
# include <Files.h>
# include <Folders.h>
#endif
#ifdef __OS2__ #ifdef __OS2__
# include <unistd.h> # include <unistd.h>
#endif #endif
@@ -1767,7 +1758,7 @@ static int process_input(struct callback_data *p, FILE *in){
static char *find_home_dir(void){ static char *find_home_dir(void){
char *home_dir = NULL; char *home_dir = NULL;
#if !defined(_WIN32) && !defined(WIN32) && !defined(__MACOS__) && !defined(__OS2__) && !defined(_WIN32_WCE) #if !defined(_WIN32) && !defined(WIN32) && !defined(__OS2__) && !defined(_WIN32_WCE)
struct passwd *pwent; struct passwd *pwent;
uid_t uid = getuid(); uid_t uid = getuid();
if( (pwent=getpwuid(uid)) != NULL) { if( (pwent=getpwuid(uid)) != NULL) {
@@ -1775,11 +1766,6 @@ static char *find_home_dir(void){
} }
#endif #endif
#ifdef __MACOS__
char home_path[_MAX_PATH+1];
home_dir = getcwd(home_path, _MAX_PATH);
#endif
#if defined(_WIN32_WCE) #if defined(_WIN32_WCE)
/* Windows CE (arm-wince-mingw32ce-gcc) does not provide getenv() /* Windows CE (arm-wince-mingw32ce-gcc) does not provide getenv()
*/ */
@@ -1919,10 +1905,6 @@ int main(int argc, char **argv){
int i; int i;
int rc = 0; int rc = 0;
#ifdef __MACOS__
argc = ccommand(&argv);
#endif
Argv0 = argv[0]; Argv0 = argv[0];
main_init(&data); main_init(&data);
stdin_is_interactive = isatty(0); stdin_is_interactive = isatty(0);

View File

@@ -11,7 +11,7 @@
************************************************************************* *************************************************************************
** Internal interface definitions for SQLite. ** Internal interface definitions for SQLite.
** **
** @(#) $Id: sqliteInt.h,v 1.618 2007/11/12 09:50:26 danielk1977 Exp $ ** @(#) $Id: sqliteInt.h,v 1.619 2007/11/26 22:54:27 drh Exp $
*/ */
#ifndef _SQLITEINT_H_ #ifndef _SQLITEINT_H_
#define _SQLITEINT_H_ #define _SQLITEINT_H_
@@ -115,7 +115,7 @@
** **
** See also ticket #2741. ** See also ticket #2741.
*/ */
#if !defined(_XOPEN_SOURCE) && !defined(__MACOS__) && SQLITE_THREADSAFE #if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && SQLITE_THREADSAFE
# define _XOPEN_SOURCE 500 /* Needed to enable pthread recursive mutexes */ # define _XOPEN_SOURCE 500 /* Needed to enable pthread recursive mutexes */
#endif #endif