[Haskell-cafe] Unix gurus, help me please

Eugene Crosser crosser at average.org
Mon Jul 17 10:41:26 EDT 2006

Bulat Ziganshin wrote:

> - I include file io.h, but this particular system has "sys/io.h"
> instead.

Just out of the blue: could it be that you rather need <fcntl.h>?
It's the place where open() and friends are defined.  Maybe(?) windows
have them in <io.h>...

> - mingw supports _commit operation which (as i guess) saves to disk
> buffers of given file. Is that true that regular unixes has fsync
> function to perform the same action? (and what the hell MS don't
> use the same name??)

Not all unixes (unii?) have fsync() syscall, but most of them do.  And
all modern ones, I guess.  If your platform does not have fsync(), it is
recommended to fallback to sync().


More information about the Haskell-Cafe mailing list