Fossil SCM

Back out [9b3aa63940] because it doesn't work on an Ubuntu->windows cross-compile. The only solution is to dirty-up the SQLite shell.c code.

drh 2014-02-28 19:31 trunk
Commit 3d7eaeda866cc831d59abe2b1ddf15184aa14c4a
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -153,11 +153,11 @@
153153
}
154154
155155
# Options used to compile the included SQLite shell on Windows.
156156
#
157157
set SHELL_WIN32_OPTIONS $SHELL_OPTIONS
158
-lappend SHELL_WIN32_OPTIONS -D_access=win32_access
158
+lappend SHELL_WIN32_OPTIONS -Daccess=win32_access
159159
lappend SHELL_WIN32_OPTIONS -Dgetenv=fossil_getenv
160160
lappend SHELL_WIN32_OPTIONS -Dfopen=fossil_fopen
161161
162162
# Name of the final application
163163
#
164164
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -153,11 +153,11 @@
153 }
154
155 # Options used to compile the included SQLite shell on Windows.
156 #
157 set SHELL_WIN32_OPTIONS $SHELL_OPTIONS
158 lappend SHELL_WIN32_OPTIONS -D_access=win32_access
159 lappend SHELL_WIN32_OPTIONS -Dgetenv=fossil_getenv
160 lappend SHELL_WIN32_OPTIONS -Dfopen=fossil_fopen
161
162 # Name of the final application
163 #
164
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -153,11 +153,11 @@
153 }
154
155 # Options used to compile the included SQLite shell on Windows.
156 #
157 set SHELL_WIN32_OPTIONS $SHELL_OPTIONS
158 lappend SHELL_WIN32_OPTIONS -Daccess=win32_access
159 lappend SHELL_WIN32_OPTIONS -Dgetenv=fossil_getenv
160 lappend SHELL_WIN32_OPTIONS -Dfopen=fossil_fopen
161
162 # Name of the final application
163 #
164
+3 -1
--- src/shell.c
+++ src/shell.c
@@ -63,11 +63,13 @@
6363
#endif
6464
6565
#if defined(_WIN32) || defined(WIN32)
6666
# include <io.h>
6767
#define isatty(h) _isatty(h)
68
-#define access(f,m) _access((f),(m))
68
+#ifndef access
69
+# define access(f,m) _access((f),(m))
70
+#endif
6971
#undef popen
7072
#define popen _popen
7173
#undef pclose
7274
#define pclose _pclose
7375
#else
7476
--- src/shell.c
+++ src/shell.c
@@ -63,11 +63,13 @@
63 #endif
64
65 #if defined(_WIN32) || defined(WIN32)
66 # include <io.h>
67 #define isatty(h) _isatty(h)
68 #define access(f,m) _access((f),(m))
 
 
69 #undef popen
70 #define popen _popen
71 #undef pclose
72 #define pclose _pclose
73 #else
74
--- src/shell.c
+++ src/shell.c
@@ -63,11 +63,13 @@
63 #endif
64
65 #if defined(_WIN32) || defined(WIN32)
66 # include <io.h>
67 #define isatty(h) _isatty(h)
68 #ifndef access
69 # define access(f,m) _access((f),(m))
70 #endif
71 #undef popen
72 #define popen _popen
73 #undef pclose
74 #define pclose _pclose
75 #else
76
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -1712,11 +1712,11 @@
17121712
17131713
SHELL_OPTIONS = -Dmain=sqlite3_shell \
17141714
-DSQLITE_OMIT_LOAD_EXTENSION=1 \
17151715
-DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \
17161716
-DSQLITE_SHELL_DBNAME_PROC=fossil_open \
1717
- -D_access=win32_access \
1717
+ -Daccess=win32_access \
17181718
-Dgetenv=fossil_getenv \
17191719
-Dfopen=fossil_fopen
17201720
17211721
$(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c $(SRCDIR)/../win/Makefile.mingw.mistachkin
17221722
$(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
17231723
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -1712,11 +1712,11 @@
1712
1713 SHELL_OPTIONS = -Dmain=sqlite3_shell \
1714 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
1715 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \
1716 -DSQLITE_SHELL_DBNAME_PROC=fossil_open \
1717 -D_access=win32_access \
1718 -Dgetenv=fossil_getenv \
1719 -Dfopen=fossil_fopen
1720
1721 $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c $(SRCDIR)/../win/Makefile.mingw.mistachkin
1722 $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
1723
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -1712,11 +1712,11 @@
1712
1713 SHELL_OPTIONS = -Dmain=sqlite3_shell \
1714 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
1715 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \
1716 -DSQLITE_SHELL_DBNAME_PROC=fossil_open \
1717 -Daccess=win32_access \
1718 -Dgetenv=fossil_getenv \
1719 -Dfopen=fossil_fopen
1720
1721 $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c $(SRCDIR)/../win/Makefile.mingw.mistachkin
1722 $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
1723

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button