Ticket #825: FILE_APPEND_DATA is not valid on Smartphone/Pocket PC2003 and Windows Mobile 5, so remove the flag when PJ_WIN32_WINCE is set (thanks Robert Cichielo for the suggestion)
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2681 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjlib/src/pj/file_io_win32.c b/pjlib/src/pj/file_io_win32.c
index 3574279..50d416f 100644
--- a/pjlib/src/pj/file_io_win32.c
+++ b/pjlib/src/pj/file_io_win32.c
@@ -59,7 +59,14 @@
if ((flags & PJ_O_WRONLY) == PJ_O_WRONLY) {
dwDesiredAccess |= GENERIC_WRITE;
if ((flags & PJ_O_APPEND) == PJ_O_APPEND) {
+#if !defined(PJ_WIN32_WINCE) || !PJ_WIN32_WINCE
+ /* FILE_APPEND_DATA is invalid on WM2003 and WM5, but it seems
+ * to be working on WM6. All are tested on emulator though.
+ * Removing this also seem to work (i.e. data is appended), so
+ * I guess this flag is "optional".
+ */
dwDesiredAccess |= FILE_APPEND_DATA;
+#endif
dwCreationDisposition |= OPEN_ALWAYS;
} else {
dwDesiredAccess &= ~(FILE_APPEND_DATA);