-#include <sys/stat.h>
-#include <sys/types.h>
-
-#ifdef _WIN32
- #include <windows.h>
- #include <winioctl.h>
- /* To make it compile on NT: extracts from Linux 2.0 *
- * <statbuf.h> and <sys/stat.h> */
- #define __S_IFMT 0170000 /* These bits determine file type. */
- #define __S_IFDIR 0040000 /* Directory. */
- #define __S_IFREG 0100000 /* Regular file. */
- #define __S_IWUSR 0000200 /* Writable for user. */
- #define __S_IWGRP 0000200 /* Writable for group. */
- #define __S_IWOTH 0000200 /* Writable for others. */
-
- #define __S_ISTYPE(mode, mask) (((mode) & __S_IFMT) == (mask))
- #define __S_ISTYPE(mode, mask) (((mode) & __S_IFMT) == (mask))
- /* These bits are defined in Borland C++ 5 but not in MS Visual C++ */
- #ifndef S_ISDIR
- # define S_ISDIR(mode) __S_ISTYPE((mode), __S_IFDIR)
- #endif
- #ifndef S_ISREG
- # define S_ISREG(mode) __S_ISTYPE((mode), __S_IFREG)
- #endif
- #ifndef S_IWUSR
- #define S_IWUSR __S_IWUSR
- #endif
- #ifndef S_IWGRP
- #define S_IWGRP __S_IWGRP
- #endif
- #ifndef S_IWOTH
- #define S_IWOTH __S_IWOTH
- #endif
-
- #include <io.h> /* For open(), lseek() etc. */
- #ifndef HAVE_MODE_T
- typedef int mode_t;
- #endif
-#endif
-