flushing files to disk

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

flushing files to disk

Pedro Bulach Gapski
Dear mingwers,

in article http://support.microsoft.com/kb/148505 there are references
to a method of flushing files to disk using std c and c++ libs.

These methods, however, rely on linking with an obj file named
Commode.obj, which supposedly does the magic to trigger the flush of
system buffers when the stdlib flush is called.

Are there references for achieving the same results with mingw as a
cross-compiler, which afaik has no such magical obj file?

regards,

Pedro

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

_______________________________________________
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.

Most annoying abuses are:
1) Top posting
2) HTML/MIME encoded mail
3) Improper quoting
4) Improper trimming
Reply | Threaded
Open this post in threaded view
|

Re: flushing files to disk

Tor Lillqvist
> in article http://support.microsoft.com/kb/148505 there are references
> to a method of flushing files to disk using std c and c++ libs.

_commit(), declared in <io.h>, is what you want. Looking in the C
runtime sources, what commode.obj does is effectively make each
write() cause _commit() to be called. And what _commit() does is call
FlushFileBuffers().

Nothing mingw-specific here.

--tml

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

_______________________________________________
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.

Most annoying abuses are:
1) Top posting
2) HTML/MIME encoded mail
3) Improper quoting
4) Improper trimming