This looks like what is needed to fix the WINCE build. But since I
have no ability to actually compile it, you should probably patch it
over and bounce a review back at me.
-scott
-----------------
Hello gblock,
I'd like you to do a code review. Please execute
g4 diff -c 8288431
or point your web browser to
http://mondrian/8288431
to review the following code:
Change 8288431 by [EMAIL PROTECTED] on 2008/09/16 14:20:48 *pending*
SQLite 3.6.1 os_win.c doesn't guard calls to DeleteFileA(),
CreateFileA(), and GetFileAttributesA() like the older code
did. This appears to cause link errors. This fixes the
problem, as best I can tell.
PRESUBMIT=passed
R=gblock
[EMAIL PROTECTED]
DELTA=15 (15 added, 0 deleted, 0 changed)
OCL=8288431
Affected files ...
...
//depot/googleclient/gears/opensource/third_party/sqlite_google/src/os_win.c#2
edit
15 delta lines: 15 added, 0 deleted, 0 changed
If you can't do the review, please let me know as soon as possible. During
your review, please ensure that all new code has corresponding unit tests and
that existing unit tests are updated appropriately. Visit
http://www/eng/code_review.html for more information.
This is a semiautomated message from "g4 mail". Complaints or suggestions?
Mail [EMAIL PROTECTED]
Change 8288431 by [EMAIL PROTECTED] on 2008/09/16 14:20:48 *pending*
SQLite 3.6.1 os_win.c doesn't guard calls to DeleteFileA(),
CreateFileA(), and GetFileAttributesA() like the older code
did. This appears to cause link errors. This fixes the
problem, as best I can tell.
Affected files ...
...
//depot/googleclient/gears/opensource/third_party/sqlite_google/src/os_win.c#2
edit
====
//depot/googleclient/gears/opensource/third_party/sqlite_google/src/os_win.c#2
-
/home/shess/googlesrc/gears_import/googleclient/gears/opensource/third_party/sqlite_google/src/os_win.c
====
# action=edit type=text
--- googleclient/gears/opensource/third_party/sqlite_google/src/os_win.c
2008-09-15 15:33:03.000000000 -0700
+++ googleclient/gears/opensource/third_party/sqlite_google/src/os_win.c
2008-09-16 14:12:36.000000000 -0700
@@ -1234,6 +1234,10 @@
NULL
);
}else{
+#if SQLITE_OS_WINCE
+ free(zConverted);
+ return SQLITE_NOMEM;
+#else
h = CreateFileA((char*)zConverted,
dwDesiredAccess,
dwShareMode,
@@ -1242,6 +1246,7 @@
dwFlagsAndAttributes,
NULL
);
+#endif
}
if( h==INVALID_HANDLE_VALUE ){
free(zConverted);
@@ -1316,12 +1321,17 @@
&& (cnt++ < MX_DELETION_ATTEMPTS)
&& (Sleep(100), 1) );
}else{
+#if SQLITE_OS_WINCE
+ free(zConverted);
+ return SQLITE_NOMEM;
+#else
do{
DeleteFileA(zConverted);
}while( ( ((rc = GetFileAttributesA(zConverted)) !=
INVALID_FILE_ATTRIBUTES)
|| ((error = GetLastError()) == ERROR_ACCESS_DENIED))
&& (cnt++ < MX_DELETION_ATTEMPTS)
&& (Sleep(100), 1) );
+#endif
}
free(zConverted);
OSTRACE2("DELETE \"%s\"\n", zFilename);
@@ -1347,7 +1357,12 @@
if( isNT() ){
attr = GetFileAttributesW((WCHAR*)zConverted);
}else{
+#if SQLITE_OS_WINCE
+ free(zConverted);
+ return SQLITE_NOMEM;
+#else
attr = GetFileAttributesA((char*)zConverted);
+#endif
}
free(zConverted);
switch( flags ){