Bulat Ziganshin wrote:
Hello cvs-ghc,


i'm now starring at the following definition:


INLINE int __hscore_open(char *file, int how, mode_t mode) {
#ifdef mingw32_HOST_OS
        if ((how & O_WRONLY) || (how & O_RDWR) || (how & O_APPEND))
          return _sopen(file,how,_SH_DENYRW,mode);
        else
          return _sopen(file,how,_SH_DENYWR,mode);
#else
        return open(file,how,mode);
#endif
}


why so special treatment for mingw? as i just tested, simple 'open'
works great, allowing just to read (in other processes) any files
being updated and read/write (in other processes) files that are only
read by Haskell process

at least i want to use 'open' instead of __hscore_open in my own
Streams library. are there some traps here?

I haven't seen this code before, but I wonder if it's an attempt to implement the single-writer multiple-reader locking semantics in the Haskell 98 IO library?

Cheers,
        Simon
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to