summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pjlib/src/pj/file_io_win32.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/pjlib/src/pj/file_io_win32.c b/pjlib/src/pj/file_io_win32.c
index 35742798..50d416ff 100644
--- a/pjlib/src/pj/file_io_win32.c
+++ b/pjlib/src/pj/file_io_win32.c
@@ -59,7 +59,14 @@ PJ_DEF(pj_status_t) pj_file_open( pj_pool_t *pool,
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);