Hi,
this attached fix should take care of providing fsync()/fdatasync()
functionliaty. For now it's a straight call to FlushFileBuffers().
Thanks,
Pawel.
On Fri, Aug 29, 2008 at 11:07 AM, Danny Backx <[EMAIL PROTECTED]> wrote:
[ skipped ]
> If you have corrections/submissions of this kind, please send in a
> patch !
>
> Danny
> --
> Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
>
>
--
With best of best regards
Pawel S. Veselov
Index: src/newlib/newlib/libc/sys/wince/io.c
===================================================================
--- src/newlib/newlib/libc/sys/wince/io.c (revision 1168)
+++ src/newlib/newlib/libc/sys/wince/io.c (working copy)
@@ -99,6 +99,21 @@
LeaveCriticalSection(&critsect);
}
+int fsync(int fd) {
+ WCETRACE(WCE_IO, "syncing descriptor %d", fd);
+ FDCHECK(fd);
+ if (FlushFileBuffers(_fdtab[fd].hnd)) {
+ errno = _winerr2errno(GetLastError());
+ WCETRACE(WCE_IO, "FlushFileBuffers(%d): errno=%d oserr=%d\n", fd, errno, GetLastError());
+ return -1;
+ }
+ return 0;
+}
+
+int fdatasync(int fd) {
+ return fsync(fd);
+}
+
void
_initfds()
{
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Cegcc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cegcc-devel