+#endif /* mingw32_HOST_OS */
+
+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
+}