summaryrefslogtreecommitdiff
path: root/data/sqlite3/tempdir.diff
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2009-06-15 06:24:23 +0000
committerJay Freeman <saurik@saurik.com>2009-06-15 06:24:23 +0000
commita334118154bc7ab0ae0ed078f4b89a61f63cca6b (patch)
tree4d6bee17602c3efbb3c5e737721396c0d69cfa1f /data/sqlite3/tempdir.diff
parentaa3c53331ee9464d20a6792c6ab4a61780373d2c (diff)
Stage 1 of SVN sqlite3 remap.
git-svn-id: http://svn.telesphoreo.org/trunk@615 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/sqlite3/tempdir.diff')
-rw-r--r--data/sqlite3/tempdir.diff70
1 files changed, 0 insertions, 70 deletions
diff --git a/data/sqlite3/tempdir.diff b/data/sqlite3/tempdir.diff
deleted file mode 100644
index fb862fb1a..000000000
--- a/data/sqlite3/tempdir.diff
+++ /dev/null
@@ -1,70 +0,0 @@
-diff -ru sqlite-3.5.9/Makefile.in sqlite-3.5.9+iPhone/Makefile.in
---- sqlite-3.5.9/Makefile.in 2008-05-12 17:10:26.000000000 +0000
-+++ sqlite-3.5.9+iPhone/Makefile.in 2008-08-01 08:21:45.000000000 +0000
-@@ -413,10 +413,12 @@
-
- libsqlite3.la: $(LIBOBJ)
- $(LTLINK) -o $@ $(LIBOBJ) $(TLIBS) \
-+ -framework CoreFoundation -framework Foundation \
- ${ALLOWRELEASE} -rpath "$(libdir)" -version-info "8:6:8"
-
- libtclsqlite3.la: tclsqlite.lo libsqlite3.la
- $(LTLINK) -o $@ tclsqlite.lo \
-+ -framework CoreFoundation -framework Foundation \
- $(LIBOBJ) @TCL_STUB_LIB_SPEC@ $(TLIBS) \
- -rpath "$(libdir)/sqlite" \
- -version-info "8:6:8"
-diff -ru sqlite-3.5.9/src/os_unix.c sqlite-3.5.9+iPhone/src/os_unix.c
---- sqlite-3.5.9/src/os_unix.c 2008-05-13 12:51:29.000000000 +0000
-+++ sqlite-3.5.9+iPhone/src/os_unix.c 2008-08-01 08:18:14.000000000 +0000
-@@ -75,6 +75,10 @@
- */
- #define MAX_PATHNAME 512
-
-+#ifdef __APPLE__
-+#import <CoreServices/CoreServices.h>
-+#endif
-+
-
- /*
- ** The unixFile structure is subclass of sqlite3_file specific for the unix
-@@ -2497,6 +2501,7 @@
- static int unixGetTempname(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
- static const char *azDirs[] = {
- 0,
-+ 0,
- "/var/tmp",
- "/usr/tmp",
- "/tmp",
-@@ -2509,6 +2514,12 @@
- int i, j;
- struct stat buf;
- const char *zDir = ".";
-+#ifdef __APPLE__
-+ void *pool;
-+ CFStringRef cfstr;
-+ CFIndex maxsize;
-+ char *cstr;
-+#endif
-
- /* It's odd to simulate an io-error here, but really this is just
- ** using the io-error infrastructure to test that SQLite handles this
-@@ -2516,6 +2526,18 @@
- */
- SimulateIOError( return SQLITE_ERROR );
-
-+#ifdef __APPLE__
-+ if (azDirs[1] == NULL) {
-+ pool = NSPushAutoreleasePool(0);
-+ cfstr = (CFStringRef) NSTemporaryDirectory();
-+ maxsize = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfstr), kCFStringEncodingUTF8) + 1;
-+ cstr = malloc(maxsize);
-+ CFStringGetCString(cfstr, cstr, maxsize, kCFStringEncodingUTF8);
-+ azDirs[1] = cstr;
-+ NSPopAutoreleasePool(pool);
-+ }
-+#endif
-+
- azDirs[0] = sqlite3_temp_directory;
- for(i=0; i<sizeof(azDirs)/sizeof(azDirs[0]); i++){
- if( azDirs[i]==0 ) continue;